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

How to fix UART behavior in segger?

Still playing with my app. Since RTT (or whatever it was, when printf was printing info to segger debug console) was ruining the debug process, I just switched off RTT and disabled uart module. But now I need some way to print out some debug info. So, I connected an rx pin of my usb-serial interface to pin9 of 51822. However, printf still prints out to segger debug console, not to my usb-uart, and probably still causing crashes when run not in debug mode. Is there a way to check what could be wrong?

Parents
  • It's nRF5_SDK_11.0.0_89a8197. To disable RTT, I did righ-click on my project in the project tree, then Edit Options (for some reason it's different than when I do Project-Edit Options from the main menu). Debug-Debugger, RTT Enabled - No. However, even without uart_config() and with RTT disabled, I still can see printf to segger console - how could that be? And that was your example - custom characteristic. It's not that I need UART - the task is completed, the project seems to be working just fine (though, I'll have to look at power consumption and to check if an attacker can drain the battery somehow). I just got curios, how to track that uart issue. It seems it keeps restarting on uart_config(); all I did I remapped the CTS pin first to pin0, then to pin7, no effect. By the way, what are the minimum pins needed for uart (i connected just tx pin and ground to my uart->usb converter) could it be that what I see in segger debug console is actually the nrf_logs or something different? I just commented out the include app_uart and uart_config(), and it still recompiles and displays printf - weird.

Reply
  • It's nRF5_SDK_11.0.0_89a8197. To disable RTT, I did righ-click on my project in the project tree, then Edit Options (for some reason it's different than when I do Project-Edit Options from the main menu). Debug-Debugger, RTT Enabled - No. However, even without uart_config() and with RTT disabled, I still can see printf to segger console - how could that be? And that was your example - custom characteristic. It's not that I need UART - the task is completed, the project seems to be working just fine (though, I'll have to look at power consumption and to check if an attacker can drain the battery somehow). I just got curios, how to track that uart issue. It seems it keeps restarting on uart_config(); all I did I remapped the CTS pin first to pin0, then to pin7, no effect. By the way, what are the minimum pins needed for uart (i connected just tx pin and ground to my uart->usb converter) could it be that what I see in segger debug console is actually the nrf_logs or something different? I just commented out the include app_uart and uart_config(), and it still recompiles and displays printf - weird.

Children
No Data
Related