Is it possible to monitor the program counter (PC) at runtime through GPIOs (STM32F429 MCU)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-15 8:28 AM
Hi, I'm using STM32F429 microcontroller and I would like to program a subset of GPIOs for automatically shadowing the value of the program counter (PC) at every clock cycle WITHOUT interrupting the CPU activity, maybe exploiting the bus matrix connections, the debug circuitry of the Cortex-M4 or something like that. Is there a way to do that? Thanks in advance.
- Labels:
-
STM32F4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-15 8:38 AM
No, you can't shadow it. Not something you can use DMA with either. You could perhaps use the SysTick interrupt to periodically output the value it sees on LR upon entry.
Your other alternative is to better instrument your code to report flow and control data, so you can understand what is happening.
Another is to invest $1000-1500 in a TRACE pod and use that to generate execution data in the manner you have described.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-15 8:53 AM
Impractical unless you run your code on external parallel memory using FMC and you use a logic analyser to monitor the adress bus values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-04-15 10:52 PM
You can extract the PC via the debug interface.
