2025-01-21 02:27 AM - last edited on 2025-01-21 02:29 AM by Andrew Neil
Hi,
with the BLE_p2pServer example for STM32WBA55, i want to change the interface from USART1 to USART2. How can i use the trace information like
with USART2?
2025-01-21 02:31 AM
If it's using printf, the process is described here:
2025-01-21 02:46 AM
Hi Andrew,
Thanks for the information, but this is not what I want to do. I am using the BLE_p2pServer example for WBA55 and there is already a lot of log information here that I want to use and which is handled in stm32_adv_trace.c for example. This works for USART1, but I want to output this information to USART2. There must be a definition somewhere where I can define the interface for the output.
2025-01-21 03:03 AM
@ledi7 wrote:there is already a lot of log information here that I want to use and which is handled in stm32_adv_trace.c .
So the question was: does that handling use printf ?
If it does, then the link shows you how that works and, thus, how to change it to a different output device.
If not, then just look at the stm32_adv_trace.c code to see where it does handle its UART, and change that ...
2025-01-21 03:11 AM
No, printf is not used here. I tried to find some hints in stm32_adv_trace.c or log_module.c but unfortunately without success.
2025-01-21 03:35 AM
According to the readme.txt,
@note Debug traces can be enabled/disabled in app_conf.h To get the traces, you have to enable CFG_USB_INTERFACE_ENABLE, with CFG_DEBUG_BLE_TRACE for BLE services traces or with CFG_DEBUG_APP_TRACE for application traces. On the PC side: - open a terminal window with the following settings: baud rate of 115200 Byte size of 8 Parity None Stop bits 1 Data Flow Control None Available Wiki pages: - https://wiki.st.com/stm32mcu/wiki/Connectivity:BLE_overview For more details refer to the Application Note: AN5289 - Building a Wireless application
So there's some things to look into ...
2025-01-21 03:41 AM
Hello @ledi7
To send the trace information to USART2 instead of USART1 in the BLE_P2PServer app for the Nucleo-WBA55CG you have to:
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.