cancel
Showing results for 
Search instead for 
Did you mean: 

STM32N657: CubeMX shows SWO on PB3; Datasheet says PB5

kadam
Associate II

Hello Team,

 

We are developing a custom board based on the STM32N657 MCU. During pin assignment in the CubeMX tool, PB3 is shown with the JTDO_SWO function. However, the datasheet indicates that the SWO functionality is associated with PB5.

Could you please confirm which pin actually supports the SWO function?

kadam_0-1780568138372.pngkadam_1-1780568192964.png

Thanks

3 REPLIES 3
Pavel A.
Super User

If you click on PB5 will you see SWO there? 

 

 

AScha.3
Super User

Hi,

you did/have to choose in Cube   :

AScha3_0-1780573147064.png

..then the needed pins swd, sdc, swo are set/used for this.

On other cpu, here H743 :

AScha3_1-1780573754610.png

But from ds it is PB5 on N657.

If wrong pin is set by Cube ...found a bug.

sidekick telling:

If you are seeing PB3 assigned as SWO in CubeMX, it may be a tool configuration issue or a recent update not reflected in the current documentation.

+

Are you using latest version/update of the tools ?

+

Gemini tells:

The correct SWO (Serial Wire Output) pin on the STM32N657 is PB5. [1, 2]
The behavior you are seeing is a known bug in STM32CubeMX. The tool incorrectly defaults to assigning the SWO functionality to PB3. However, on the STM32N6, PB3 is reserved for the trace clock (TRACECLK), and measuring it with an oscilloscope will show that it remains inactive. [1, 2, 3]
If you are laying out a custom PCB or connecting an external ST-LINK, ensure you route the trace directly to PB5. [1, 2]
If you feel a post has answered your question, please click "Accept as Solution".
Andrew Neil
Super User

The User Manual for the NUCLEO-N657X0-Q (MB1940) shows SWO as PB5:

AndrewNeil_0-1780574139995.png

via: https://www.st.com/en/evaluation-tools/nucleo-n657x0-q.html#documentation

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.