This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF_LOG_BACKEND_SERIAL_UART_BAUDRATE documentation of baudrate is incorrect

Hello, It seems that NRF_LOG_BACKEND_SERIAL_UART_BAUDRATE has wrong documentation. In sdk_config.h it says:

// <o> NRF_LOG_BACKEND_SERIAL_UART_BAUDRATE  - Default Baudrate
// <251658240=> 921600 baud 
// <268435456=> 57600 baud 

But if I measure the speed I see:

 251658240 = 957 854 baud
 268435456 = 1 008 064 baud

Also even though with 957 854 baud I see often the correct text (with documented speed 921600 I saw always nothing) sometimes it happens that text is corrupted.

Expected and often got text:

APP:INFO:Helo world
SDH:INFO:sd_ble_enable: RAM START at 0x20003000
SDH:WARNING:sd_ble_enable: app_ram_base should be adjusted to 0x20002128
SDH:WARNING:ram size should be adjusted to 0xded8
APP:INFO:Heart Rate Sensor Start!
APP:INFO:Fast Adverstising

Sometimes in ~30% of cases I get corrupted text - for example:

APP:INFO:Helo world
SDH:INFO:sd_ble_enable: RAM START at 0x20003000
Sa▒:▒*▒▒'.▒%1+  1▒
                  ▒▒%5%▒!=▒1
                            )▒▒▒"=▒▒
                                    ▒▒!▒:▒*▒▒'.%▒!=▒1▒
                                                      ▒▒▒▒▒▒▒▒▒▒▒�▒▒▒▒e▒▒▒'jr▒▒U9▒=▒▒▒%▒▒▒'▒
            ▒▒▒▒%▒%95

Also interesting is that when I use highest speed rate (268435456 = 1 008 064 baud) I never get garbled text...

So my questions are:

  1. Will you correct documentation?

  2. Why you do use ugly numbers (like 268435456) in sdk_config.h comments if you could use defined macro (like UART_BAUDRATE_BAUDRATE_Baud1M) from file nrf52_bitfileds.h: ?

  3. Just out of curiosity - why the mode 251658240 = 957 854 baud does not work sometimes?