This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

cc2540 serial communication issue

Other Parts Discussed in Thread: CC2540, CC2541

Hi Guys,

i'm quite new and i hope someone can help me. i just need a running serial transmit and receive for the cc2540. this is what i'm using at the moment but only the transmit works the receive doesn't.

//serial send
void serial_send(unsigned char send){
    U1DBUF = send;
    while (!(U1CSR & 0x02));
    }

//serial receive
unsigned char serial_receive(){
 
  while(!(U1CSR & 0x04));
     return U1DBUF;
    }

thx

  • 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,

  • thx for the answer so far. the ble-wiki page does not work however.?!?

    i downloaded the examples but i could not compile witout getting lots of errors. i working on that.

    thx.

    regards, Odin