2017-05-18 02:40 AM
Οn which documentation file can one find the address mapping for the ARM registers on topic?
Solved! Go to Solution.
2017-05-19 01:38 AM
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 ?
2017-05-18 07:24 AM
ARM has Technical Reference Manuals for their cores.
ST has a Reference Manuals for the peripheral registers they add to their designs.
2017-05-18 10:12 PM
Hi Clive,
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.
2017-05-19 01:29 AM
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.
2017-05-19 01:38 AM
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 ?
2017-05-19 02:48 AM
Hi AvaTar,
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.
2017-05-19 02:52 AM
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.
2017-05-19 03:07 AM
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.
2017-05-19 03:43 AM
,
,
,2017-05-19 04:24 AM
Yeap, that was it.
DWT needs to be enabled before one can read DWT_CYCCNT, as waclawek.jan's link shows.