Οn which documentation file can one find the address mapping for the ARM registers on topic?
I didn't mess wit DWT myself yet, just left it to the debugger.
But I'm pretty sure you need to enable it the same way as other peripherals. Perhaps you missed that ?
ARM has Technical Reference Manuals for their cores.
ST has a Reference Manuals for the peripheral registers they add to their designs.
Since I'm talking about memory address mapping, only ST can give the location those registers are mapped, which is not being discussed in their reference manuals.
DWT belongs to the core space, the peripheral address is thus defined by ARM. Like the SysTick counter, it is the same on every device - if the vendor chooses to implement it (DWT is optional).
For some reasons whatsoever ST forgoes to document the core space peripherals. Others do/did not.
Thanks for the clarification.
I wasn't aware that memory mapping for core peripherals is defined by ARM. I was under the impression that ST could reallocate the memory to better suit their design.
In any case, I wasn't able to read DWT_CYCCNT @ 0xE0001004, so I'll have to research it a bit further.
In any case, I wasn't able to read DWT_CYCCNT @ 0xE0001004, ...
As said, the implementation is optional, i.e. left to the vendor.
Not only that, ARM states that not all DWT registers might be present in all implementations.
You might need to check the Ref. Manual of the device you are using, what it actually implements.
The device is STM32F303CC which does implement it (RM0316, ch33.13), it just that the pointer (volatile uint32_t *DWT_CYCCNT = (uint32_t *)0xE0001004;) I've declared doesn't seem to report sane values. Thanks for the help.
Yeap, that was it.
DWT needs to be enabled before one can read DWT_CYCCNT, as waclawek.jan's link shows.
Retrieving data ...