Fabiano Junqueira

Programming the LPC1857 using another microcontroller via SWD

Discussion created by Fabiano Junqueira on May 11, 2020
Latest reply on Jul 29, 2020 by Carlos_Mendoza

I need to program the LPC1857 via SWD using another microcontroller. I cannot use UART for this, it has to be via SWD.


I have no doubts about the SWD protocol, so much so that I can already reset JTAG-TO-SWD, read the LPC1857 IDCode and perform other transactions through the SWD.


Using the NXP LPC-link, I programed LPC1857. During programming, I perform the communication sniffer. For this program I use a known .hex.


Using the data obtained in the sniffer, I copied and saved everything that the NXP LPC-Link sent to the LPC1857 until the start of sending the .hex.


Using the documents: UM10430 (LPC1857 reference manual), Cortex: tm: -M3 - Technical Reference Manual and CoreSight: tm: Components - Technical Reference Manual (where you have the information about the SWD), I tried to understand the values obtained in the sniffer, but I couldn't find the following addresses in any of these documents:


- 0xE000ED88
- 0xE00FFFBC
- 0xE00FF000
- 0xE000EFBC
- 0xE0001FBC
- 0xE0002FBC
- 0xE0000FBC
- 0xE0040FBC
- 0xE0041FBC


I know that the values listed above are addresses, as they are written in the TAR register of the SWD.


Some of these values can be found in the documentation for Cotex-M4, Cotex-M7 and Cortex-M33, but as the LPC1857 is a Cortex-M3, I imagine that I cannot use this information found in these documents.


I need a document that explains how to record the LPC1857 via SWD, or at least a documentation that has an explanation of the addresses listed above.


Thank you.