Skip to main content
JWieb
Associate III
December 24, 2021
Solved

Struggling to get UART debug printer to work with fresh MX Build.

  • December 24, 2021
  • 1 reply
  • 742 views

I build a new application with a custom GATT and would like to use the UART debug features that can be seen in the examples. I configured my IOC as follows and verifid the UART is working with the following code:

 char msg[] = "Begin1\n";
 HAL_UART_Transmit_DMA(&huart1, msg, sizeof(msg));

However no debug messages are getting printed properly.. I have attached a screenshot and my complete example project. Working with the STM32WB5M-DK

0693W00000HpiYqQAJ.png

This topic has been closed for replies.
Best answer by JWieb

AH yes. Now i can rest.. the MX did not add a call to APPD_Init()

Within app_entry.C

/* USER CODE BEGIN APPE_Init_1 */
 APPD_Init(); //Add this
 UTIL_LPM_SetOffMode(1 << CFG_LPM_APP, UTIL_LPM_DISABLE); //This disables OFF mode for the LPM
/* USER CODE END APPE_Init_1 */

Merry Christmas!

1 reply

JWieb
JWiebAuthorBest answer
Associate III
December 25, 2021

AH yes. Now i can rest.. the MX did not add a call to APPD_Init()

Within app_entry.C

/* USER CODE BEGIN APPE_Init_1 */
 APPD_Init(); //Add this
 UTIL_LPM_SetOffMode(1 << CFG_LPM_APP, UTIL_LPM_DISABLE); //This disables OFF mode for the LPM
/* USER CODE END APPE_Init_1 */

Merry Christmas!