cancel
Showing results for 
Search instead for 
Did you mean: 

SWV working on Nucleo-F446ZE but not on Nucleo-F767ZI or STM32F769-Disco

CCorb.1
Associate II

I've created three (nearly) identical test projects, one for a Nucleo-446Ze, one for Nucleo-767Ze and one for a STM32F769-Disco. They are all nearly identical:

1) Trace Asynchronous SW

2) FreeRTOS

3) A single task created for each user LED to blink them at different rates

4) _write overwritten in main.c to direct output to ITM_SendChar(*ptr++);

5) SWV enabled and core clock speed set accordingly in debug configuration.

6) SWV ITM Data Console is displayed, port 0 selected

7) Each LED task has a "printf("LED foo toggling! \r\n); line after the toggle

All three project compile with no errors and when run, the LEDs blink exactly as expected for all three projects. A break point shows the overwritten -write function is being called correctly. And the output is being displayed correctly for the F7556ZE part.

However, for both the Nucleo-F767 and the STM32F769-Disco, the "Start Trace" remains greyed out and (obviously), there is no output on the console.

I've gone through many different "How to get SWV console working" tutorials and vidoes and nothing seems to work. I have deleted the projects and recreated them to make sure I didn't mess something up while troubleshooting and I always end up with the same (failed) results.

Any ideas why the F4 would work the first time and both F7 boards would be telling me to kiss off?

Thanks!

Clint

8 REPLIES 8

Well looks like you've covered all the bases.

Test with STM32 Cube Programmer, F7 probably also supported via older ST-LINK Utilities

Clock consistency between debugger and target are critical for "baud rate" computations.

Physically SWV / PB3 pin must route, watch for Solder Bridges

Watch HSE_VALUE, the DISCO has a 25 MHz clock

Check PLL settings are consistent.

I tend to use UART's also, and print CPU, AHB and APB clocks, as perceived internally, via the console.

Use ITM_SendChar directly as a test.

Perhaps check running via HSI

Pretty sure I've used SWV on both these boards.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

>>Any ideas why the F4 would work the first time and both F7 boards would be telling me to kiss off?

CM7 needs registers unlocked via LAR in respective units.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
CCorb.1
Associate II

Thanks for the pointer Telsa!

Are you referring to unlocking the ITM or the DWT (or both?) registers? I've been digging through the STM reference manual as well as core_cm7.h file. I've found several examples, but they are all working with DWT and not the ITM registers.

MM..1
Chief II
CCorb.1
Associate II

Well, after more digging than I though would be required, I did finally get it working on the F756 Nucleo board. Still not working on F767ZI Nucleo or F769NI Disco. I'm going to pull up the datasheets side by side and see if I can find the differences between these boards later this evening.

Piranha
Chief II

By the way, on STM32F769I-DISCO board by default the SWO pin is not connected because the respective pin is connected to uSD card socket. It can be reconfigured by swapping R92 and R93 resistors. On the NUCLEO-F767ZI board by default the SWO pin is connected and should work.

I found the resistor "issue" on the Disco board Saturday night and swapped the 0 ohm resistor from R93 to R92. No change unfortunately. I didn't see anything else in the schematic that would indicate there is something else blocking it. What is extra irritating about this is this is the board I need to get the debug print working for as I am TRYING to use it in a project right now.

I'm still scratching my head on the Z756ZG board (working) vs. my Z767ZI board (NOT working). I've build identical projects (CPU differences aside) for them with identical code. The Z756ZG board works every single time and the Z767ZI board never works. I've checked the datasheets between them and the ITM sections are identical and they are on identical MB1137 PCBs as well, even the same PCB revision, B-02. I've visually verified all the solder bridges (especially SB110) are in place as well as the other resistors just in case I modified one the boards in the past. No differences that I can tell.

What irritates me the most is I KNOW it will be something stupidly obvious and simple...

CCorb.1
Associate II

Well, I finally have the STM32F769i-Disco working with SWO and printf. The root cause of why I could get it to work on my Nucleo-F756ZG is actually simple: When I swapped the 0 ohm resistor from R93 to R92, I didn't get a good solder joint on one pad! After looking at it under a magnifying lamp (one step hooking it up to a logic analyzer), I noticed that it didn't look like there was ANY solder between the pad and the resistor.. There wasn't.

Given this, I think I might need to verify that signal path is actually complete on that F767ZI.

Thanks for all the help folks! It is appreciated. And needed...

Regards,

Clint