Hello to all,
In order to measure the current variation due to instruction address location. I filled the memory with NOP instructions and tried to observe the variation in the current consumption due to change in the instruction address, although the instruction is throughout same.
And as a result, I have got the current consumption, but from the captured current consumption for multiple times, I think there is some periodic behaviour is occurring, but couldn't find the instruction address on which it's beginning and on which it ends. Since the frequency of measurement is 12MHz and target processor is ARM Cortex-M4. Is there any way to find out the least current consumption on which instruction address???
Thanking you,
Regards,
Himanshu
Regarding using external oscillator:
Assumed that you know exactly when the processor come out of reset, able to track the instruction execution timing, it might be possible to tell the PC (program counter). However, the reset circuit in microcontrollers are often fairly complicated, and the wait state of the memory system is hard to tell - many microcontrollers have embedded flash that are optimized for lower power, but relatively slow in term of access time. So many microcontroller vendors added some forms of flash cache or flash pre-fetch circuit, and it often make it impossible to tell if the processor pipeline is stalled while waiting for the flash. For small loops, it is likely that there is no cache miss and the access could be done immediately. But for running larger benchmarks there are often cache misses.
Using SWD or trace doesn't provide accurate timing as by the time the PC samples are received the actual PC possible already advanced several hundreds of time.