AnsweredAssumed Answered

Reading CPU registers

Question asked by luke ludington on Jun 28, 2019
Latest reply on Jul 1, 2019 by Mark Butcher

I want to get the value of a register on the CPU, I looked on the spec sheet and found the address (0xE000E014) and I want to name the variable I store the value in "subticks_per_tick"

This is on a TWR-K65F180M running FreeRTOS.

register uint64_t 0xE000E014 asm ("subticks_per_tick");register uint64_t subticks_per_tick asm ("0xE000E014");

first line gets: error: expected identifier or '(' before numeric constant

second line gets: invalid register name for 'subticks_per_tick'

 

Any other ways of accessing hardware tick would also be super helpful

Outcomes