Skip to main content
Microstar
Associate III
September 28, 2017
Solved

How to debug when TSSOP-14 MCU's SWD pins is needed for SPI1?

  • September 28, 2017
  • 3 replies
  • 971 views
Posted on September 28, 2017 at 11:25

MCU: STM32L011D3

Using for wireless comunication, SPI is needed.

#l0 #stm32 #debug
This topic has been closed for replies.
Best answer by waclawek.jan
Posted on September 28, 2017 at 12:58

Or use an 'emulation processor' (ie. one in bigger package) and a reduction pod. You may then need to remap the SPI to other pins, and maybe other remaps, so it's not a 1:1 emulation, but may be a useful approach if extensive debugging is needed.

JW

3 replies

waclawek.jan
Super User
September 28, 2017
Posted on September 28, 2017 at 12:43

Use the good old staring at the code.

Blink LEDs, excercise pins observed by LA/oscilloscope, use externally connected device to output debug messages.

Be inventive.

JW

waclawek.jan
waclawek.janBest answer
Super User
September 28, 2017
Posted on September 28, 2017 at 12:58

Or use an 'emulation processor' (ie. one in bigger package) and a reduction pod. You may then need to remap the SPI to other pins, and maybe other remaps, so it's not a 1:1 emulation, but may be a useful approach if extensive debugging is needed.

JW

AvaTar
Senior III
September 28, 2017
Posted on September 28, 2017 at 13:40

Or, if it's applicable in your case, use another SPI with slave select (i.e. multiple slaves on one line).

On a device without debug support, I used to write a number of pulses to a GPIO pin (actually the TX pin of a slow-speed UART line) at max speed.

This requires a scope for debugging, but can output several states in chronological context.

Microstar
MicrostarAuthor
Associate III
September 28, 2017
Posted on September 28, 2017 at 14:24

I select STM32L011F3 for design, then replace it.

Or as far as I can see, USE a software controlled SPI.