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.

CC2530: Using lower than 9600 baud rate

Part Number: CC2530


I'm trying to use the UART driver which comes with zstack but the lowest baud rate defined is 9600.
I need to use 2400 so If I wanted to set it would I have to do it after opening the port with the zstack functions?
By that I mean initialising with 

initUart0(halUARTCBack_t pf)

here: sunmaysky.blogspot.com/.../how-to-use-two-uart-ports-in-cc2530-z.html
then these statements after:

// Initialize bitrate (U0BAUD.BAUD_M, U0GCR.BAUD_E)
U0BAUD = uartBaudM;
U0GCR = (U0GCR&~0x1F) | uartBaudE; 

  • UART0 using ISR it is enough to just change the BAUD_E bits of U0GCR to 6, U0BAUD stays the same (59) between 2400/4800/9600 (Table 17-1 of the Device User's Guide). For UART1 using DMA you must also consider the dmaCfg which logs the txTick value depending on the baud rate. You can refer to the HalUARTOpenISR/HalUARTOpenDMA functions in _hal_uart_isr.c/_hal_uart_dma.c, respectively, for more information.

    Regards,
    Ryan