ESP32 as a SWD debugger (and maybe JTAG)
Posted: Wed Nov 15, 2017 9:39 pm
I would like to use the ESP32 as a debugger to read and write memory/registers and maybe debug other connected processors.
I see different ways of achieving this, depending on what the peripherals of the ESP32 allow and here I would like to have your feedback.
I see different ways of achieving this, depending on what the peripherals of the ESP32 allow and here I would like to have your feedback.
- SWD has its similarities to SPI (see https://www.arm.com/files/pdf/Serial_Wire_Debug.pdf page 6) and to me it looks like I can use an SPI master to talk SWD effectively, using only command, read and write phase (see https://esp-idf.readthedocs.io/en/v2.0/ ... aster.html)
If the SPI master is not suitable for this task, could it be possible to use CPU1 and bit bang the protocol using GPIO while CPU0 is handling network protocols? Or are there synchronisation issues with the GPIOs that will slow down CPU0 a lot or delay the GPIOs.
Other options of course include searching for an external peripheral that does the fast processing and then connecting that using any of the ESP32's buses.
Now second question, I have seen there are JTAG pins on the processor, is there a peripheral behind it that allows to act as JTAG master?