cancel
Showing results for 
Search instead for 
Did you mean: 

Why SBSFU debug prints are not working on LPUART1?

Brajp.1
Associate II

We have ported SBSFU project for Nucleo L4R5ZI-P dev-board.

All debug prints (TRACE) are working when configured USART2 but when configured LPUART1 which is used as virtual com port by ST-LINK usb connector then not getting any prints.

5 REPLIES 5
Jocelyn RICARD
ST Employee

Hello,

The LPUART is going through GPIO port G.

This GPIO port is powered by VDDIO2 so you need to enable this power by calling HAL_PWREx_EnableVddIO2()

Best regards

Jocelyn

Yes you are right but I have already enabled power of port G, but it is still not working. If l'll config LPUART1 on other pins then it is working. It is not working only on the pins (PG7,PG8)​ which is used by stlink connector too.

Jocelyn RICARD
ST Employee

So, I understand that when setting UART on GPIO you can get on the board you have a UART to USB converter connected and get the traces there?

Then on PG7 and PG8 you use the direct USB connection to STLINK (no external UART/USB converter) ?

On my side I made a quick test on this Nucleo L4R5ZI-P using STM32CubeMX, initialise the board with default peripherals, add just a printf and the function

int __io_putchar(int ch)

{

 HAL_UART_Transmit(&hlpuart1, (uint8_t *)&ch, 1, 0xFFFF);

 return ch;

}

And I get my string on the terminal connected to the STLink Com port.

So, I guess this is just a matting of configuration.

Best regards

Jocelyn

Again you are right, I am also getting prints using STlink com port in normal projects, but i am facing this issue in SBSFU sample project only, which i have ported from other L series sample project.​

Jocelyn RICARD
ST Employee

Hello,

Well in that case, this can only be related to the setup in SBSFU.

One way to find what is wrong is to use debugger, put a breakpoint on the first trace and check

  • GPIO settings
  • PWR setting
  • LPUART settings

They should exactly match settings that are working with a normal project.

Best regards

Jocelyn