cancel
Showing results for 
Search instead for 
Did you mean: 

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

Microstar
Associate III
Posted on September 28, 2017 at 11:25

MCU: STM32L011D3

Using for wireless comunication, SPI is needed.

#l0 #stm32 #debug
1 ACCEPTED SOLUTION

Accepted Solutions
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

View solution in original post

4 REPLIES 4
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

AvaTar
Lead
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
Associate III
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. 

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