I have an SoC which has dual Cortex-M7 CPUs, and CPU0/CPU1 is attached to the AHB Access Port0/1. When I connect to CPU0 using Jlink (JTAG interface), how can I read the registers of CPU1? Can I simply switch AP using APSEL and then access the CPU1’s resgisters using DCRSR and DCRDR?
What I have tried using Jlink is:
- WriteDP 2, 0x01000000 // select AP1
- Write to the address of DCRSR register
- read the data from the address of DCRDR register
What I got is always the register of CPU0 instead of the CPU1