cancel
Showing results for 
Search instead for 
Did you mean: 

What peripherals can we control with SWD?

Patrick Morwald
Associate II
Posted on March 29, 2018 at 16:02

Hello,

for debugging our systems in production where the firmware is not yet flashed on the chip, we want to control attached peripheral devices only with SWD. 

So far we can switch GPIOs successfully with SWD. This gives us the ability to control ON/OFF type peripheral devices via SWD. 

Now we want to control PWM (STM32 timer) and I2C devices directly via SWD. Is that even possible and if so, how is it done?

We also need a scripting system to automate such peripheral tests via SWD. What solution is there?

Best regards,

Patrick

#debug #stm32f4 #swd
6 REPLIES 6
Uwe Bonnes
Principal III
Posted on March 29, 2018 at 16:26

You can write to any register via SWD, so as long  as you don't cut of the SWD connection by reusing the SWD pins, you can do anything.

Patrick Morwald
Associate II
Posted on March 29, 2018 at 17:25

I think handling a protocol like I2C via the SWD register write will pose quite some manual effort though. Are there any host computer programs or scripts which already offer this functionality via SWD?

Andrew Neil
Evangelist III
Posted on March 29, 2018 at 17:52

I'm not sure I see the point in doing this? Do you think it likely that your suppliers will be shipping you large numbers of defective chips?

:(

Rather than have huge amounts of SWD traffic trying to manually run these tests, wouldn't it be easier to just download some test firmware?

Or include the tests in the standard firmware?

Patrick Morwald
Associate II
Posted on March 29, 2018 at 18:12

Hi,

yes we thought that too. We could flash a test firmware for testing the peripherals and in the end of production flash the customer firmware.

Regards,

Patrick

Posted on March 29, 2018 at 18:18

I still don't see why you feel the need to test the peripherals?

Posted on March 29, 2018 at 18:32

There's also boundary scan if you want to check external connectivity.

From the debugger connection injecting small test applets into RAM is another means of testing/probing functionality.

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