SWCU193A April 2023 – August 2024 CC2340R2 , CC2340R5 , CC2340R5-Q1
The bootloader provides a method to automatically detect the UART baud rate used to communicate with it.
To synchronize with the host, the bootloader must receive 2 bytes with the value of 0x55. If synchronization succeeds, the bootloader returns an acknowledge consisting of 2 bytes with the values of 0x00 and 0xCC.
If synchronization fails, the bootloader waits for synchronization attempts.
In the automatic-detection function, the UART0 RX pin is monitored for edges using GPIO interrupts. When enough edges are detected, the bootloader determines the ratio of baud rate and frequency needed to program the UART.
The UART module system clock must be at least 16 times the baud rate; thus, the maximum baud rate can be no higher than 3Mbaud (48MHz divided by 16). The maximum baud rate is restricted to 1.6Mbaud because of the firmware function that detects the transfer rate of the host.