cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Wire debug Nucleo-WL55 JC1 SWO

LEdou.1
Associate III

Hi,

I trying to debug on nucleo-WL55 with serial wire debug via SWO.

I have enable "Serial Wire Viewer (SWV)" in debug config, and add SWV ITM Data console (Config 0).

Even add this code :

int _write(int file, char *ptr, int len)
{
  /* Implement your write code here, this is used by puts and printf for example */
  int i=0;
  for(i=0 ; i<len ; i++)
    ITM_SendChar((*ptr++));
  return len;
}

With this line : printf("HelloWorld");

Did you know why it doesn't work? Is that possible to have serial wire on WL-55 ? I have all jumper on JP8 as we receive the nucleo-WL55.

My config :

0693W00000WKERiQAP.png0693W00000WKESHQA5.png 

0693W00000WKERxQAP.png 

Thanks

17 REPLIES 17
Wijeden RHIMI
ST Employee

Hello,

It is stilling not worked? so let's try to make those suggestions:

Could you please open SWV trace (just enable sampling PC) and check:

  • if the data are shown in this view >>> the issue is related to printf function (you make some errors in your printf function)
  • if you don't get the data >>> the issue is related to the configuration in the ioc.file : maybe you set up the pin of SWO to another alternate function, so the board doesn't routing the pin to the link.

Wijeden,

LEdou.1
Associate III

Still nothing, Are we agree that we don't have to modify nucleo-WL to have serial wire ? And use it as we receive it ?

Wijeden RHIMI
ST Employee

Hello @LEdou.1 ,

Let's try to make those suggestions:

Could you please open SWV trace (there just enable pc sampling)

  • If the data are shown in this view, then the issue is related to printf function: you make some errors in printf function.
  • If you don't get the data, then the issue is related to another thing: you are using the pin of SWO to configure another alternate function in IOC.file, and maybe the board doesn't routing the pin to the link.

Wijeden,

Wijeden RHIMI
ST Employee

Hello,

It is stilling not worked? so let's try to make those suggestions:

Could you please open SWV trace (just enable sampling PC) and check:

  • If the data are shown in this view >>>> the issue is related to the printf function (you make some errors in this function).
  • If you don't get the date >>>the issue is related to the configuration in the ioc.file : maybe, you set up the pin of SWO to another alternate function, so the board doesn't routing the pin to the link.

Wijeden,

LEdou.1
Associate III

Still not working...

Nothing on SWV Data Trace and nothing on SWV ITM Data Console.

Like you said, I have add "ITM_SendChar((*ptr++));" and "#include "stm32wlxx.h"" on syscalls.c

I don't understand why it dosen't work. Did you have a exemple project, which work ?

Wijeden RHIMI
ST Employee

Hi,

You could see this example in the screenshot bellow using CubeIDE 1.10.1 and NUCLEO-F429ZI.

0693W00000WL6ylQAD.png 

Wijeden,

LaurentL
ST Employee

Hello,

I am pretty sure you have to look at the schematic of the nucleo, there is a solder bridge to set or to remove.

I don't have the board here to look but I am sure I did a hardware modification for the swo pin to be redirected to the STLink.

I just looked on the schematics, so it will depends on the hardware version you have, you can see the PB3/SWO pin has a DNF (Do Not Fit) solder bridge SB8 for SWO.

So, you must unsolder the SB31 that is set for ARD_PB3 and put it in place on SB8 for SWO.

Or, if not using the ARD_PB3 pin on Morpho connector, you can let the solder bridge SB31 and add one on the DNF (SB8) to have T_SWO connected.

SB numbers can vary on the hardware versions.

Rgds,

Laurent

Thanks @LaurentL​  ans @Wijeden RHIMI​, my bad effectively, it was SB8 ! From de beginning I confused between SWDIO and SWO ... Sorry ! Tanks a lot again !