Hello Odin,
Welcome to the Forum!
To start, you should visit the www.ti.com/BLE-wiki page. There is a serialApp that can provide you with some guidance if you are using BLE and the UART. There is also a recent post that may be of interest to you. http://e2e.ti.com/support/low_power_rf/f/538/t/260237.aspx. Also, you can do a further search of the forum for more posts on the UART with the CC2540.
If you are not using BLE and just experimenting with the hardware, you can download the CC2541/43/44 software examples swrc257.zip
The examples cover the CC2541, but can be applied to the CC2540 except of course the i2c code.
Thanks,