We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
in arm development studio,
debugging with base model for a53 single core,
config timer sp804 at address 0x001C110000,
// SP804 base addr volatile unsigned int* const TIMER0_BASE = (unsigned int*)0x001C110000; // SP804 registers offset #define TIMER0_LOAD_OFFSET 0x00 #define TIMER0_CONTROL_OFFSET 0x08 void init_timer() { // init value TIMER0_BASE[TIMER0_LOAD_OFFSET] = 0x2000; // cfg control reg unsigned int control = 0; // control |= (1 << 7); // enable interrupt control |= (1 << 6); // up count control |= (1 << 1); // periodical control |= (1 << 0); // enable timer TIMER0_BASE[TIMER0_CONTROL_OFFSET] = control; }
read current Current Value Register, TimerXValue more than 2 times,
no change was observed
why?
It is not obvious from the above code snippet what the issue could be. Does the disassembly show that the write(s) occured?
Try importing the startup_Cortex-A53x1 example supplied with Arm Development Studio. There is sp804_timer.c source therein that configures the timer that you can use as comparison with your code.
It works! There must be something wrong with my project attr I guess. thanks very much.