cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F3 discovery board Serial Wire debug not working

Zaeem-Ahmed
Associate

Hello STM community, I am new here. I recently decide to learn embedded systems and I bought STM32F3 discovery board having the STM32F303VCT6 chip on it.
But I am facing the issue in serial wire debug. In the SYS, when I try to choose the Serial wire in the debug tab it gives me an error in the TSC.
I don't know about TSC and why is it giving me an error since I disabled it. But it is showing me a pin-conflict error.
This error goes away if I choose the disable option in debug tab.
My objective is to use the serial wire debug or serial wire viewer option in stm32 cube ide to monitor my variables and printf statements during the debugging.

My questions are, 

  1. If I choose disable in debug tab , would I still be able to use serial wire viewer?
  2. I tried to choose disable in debug tab then How was I succeeded in debug the controller since I didn't selected the ST link pins
  3. Which option should I choose under debug tab to use the Serial Wire Console.
  4. Should I just ignore the TSC error?
  5. I also came accross some information on the internet that there is some SB port, I think SB 10 will be connected to use SWD, how can I confirm this thing there are many jumpers and pins on the board how can I know the purpose of each port/connector?

One thing I want to mention here that when I try to write the code on my own without CUBE MX, I am able to use the printf function to print the data in console using the Semi-hosting (open OCD). But still unable to use the Serial Wire Monitor. I don't have much knowledge about these  GDB server and semi-hosting But I am following an embedded systems course from Udemy and they are using a different controller.
Again I am new to this field, may be I am asking some silly thing But I need to fix my issue.
Best regards.
Zaeem Ahmed.WhatsApp Image 2024-09-21 at 8.20.08 PM.jpegWhatsApp Image 2024-09-21 at 8.17.21 PM.jpeg

2 REPLIES 2

Check the pins involved, and which and how many conflict, the Data Sheet should list all the pins and usage details.

There is a SB related to the PB3/SWO pin used to provide the Serial Wire Viewer, the comms channel used by ITM_SendChar()

 

If you're not familiar with the hardware, then even more reason to spend some time reviewing the documentation, and looking at the schematics. See under "CAD Resources" tab for the product page.

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

1+2) SWD pins are in the SWD state by default, so while selecting "disable" fails to initialize them as SWD, they are still connected unless you initialize them as something else. So you can still connect using SWD and view SWO output.

3) Choose Trace Asynchronous Sw, if you want to use SWO.

4) Yes. The TSC "error" is just information, not an error. It is letting you know you cannot select TSC since the pin is already in use, but it is not something that needs corrected.

5) By reviewing documentation, how else? The user manual for the discovery board has all of this information.

If you feel a post has answered your question, please click "Accept as Solution".