2018-03-29 07:02 AM
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 #swd2018-03-29 07:26 AM
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.
2018-03-29 08:25 AM
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?
2018-03-29 08:52 AM
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?
2018-03-29 09:12 AM
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
2018-03-29 11:18 AM
I still don't see why you feel the need to test the peripherals?
2018-03-29 11:32 AM
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.