This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

armds base model sp804 init issues

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?

Parents
  • 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.

Reply
  • 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.

Children