Hi, thanks for the quick response.
I’ve run the code you provided and the result is 0. I’ve also waded through the Arm V6-M architecture reference manual and the registers you reference don’t seem to be implemented for these chips – the whole of the cortex M0, M0+ and M1 range!
Hopefully you are able to get it working – what is the minor adjustment required?