I previously write this post on how to use a BeagleBoneBlack as a JTAG (SWD) programmer. It was fun but really slow. I port my code on RaspberryPI and now what was taken 5-8 hours is a couple of minutes.
To connect the SWD connector to the PI use the following schema
I use this peace of code to reflash my TD1204 and TD1208 based both on EFM32 when bricked after unsuccessful update…
Here is the python file to interact with SWD : https://github.com/disk91/PySWD/blob/master/RpiGPIO.py
I hop it will be soon integrated in the main PySWD project as the previous one.
You should check or modify flashEFM32.py file
import array from PirateSWD import * from RpiGPIO import * from SWDCommon import * [...] def main(): busPirate = RpiSWD("", vreg = True) debugPort = DebugPort(busPirate) efm32 = EFM32(debugPort)
To run the Flash program, just launch
# ./flashEFM32.py ../myProgram.bin
Hi,
It worked for me! It took about 20min to flash my .bin.
However I don’t receive messages on Sigfox portal anymore: I’ve tested it with the basic sigfox.c (RF_Examples). The LED does turn on and then off after a moment (after Sigfox message should be sent) but I get nothing on the portal. Is it possible that the ID while flashing with RaspberryPI? Do you have any idea for the reasons I don’t get my messages anymore?
Thank you,
PS: I tried to check the ID using Putty and the command ATI7 but I can’t establish a serial connexion.
No the ID does not changed when falshing (I never had a such problem) Are you sure your antenna is correctly connected (I had some trouble when soldered the antenna pins and get a shortcup between these pins)
I was thinking of trying this project, but does it really take 20mn to process?
At least…
Using openocd and SWD config files, the programming time is < 1 minute. See https://movr0.com/2016/09/02/use-raspberry-pi-23-as-a-jtagswd-adapter/
I didn't try this particular one, but something similar a while ago. YMMV.