AnsweredAssumed Answered

Reading PIT registers with C code

Question asked by Michael Worster on Oct 4, 2013
Latest reply on Oct 11, 2013 by Timesys Support

I'm trying to read one of the PIT (Perioditic Interrupt Timers) registers. For now, I don't really care which one I just want to run a test read from a Linux module. I've tried two methods:

 

    unsigned int PIT_MCR = 0;

    //Attempt one:

    //PIT_MCR = *((unsigned int *)(void *)(0x40037000));

    //Attempt two:

    PIT_MCR = __raw_readl(0x40037000);

    printk("PIT_MCR(0x4003_7000): %u\n", PIT_MCR);

 

Both of these attempts to access the register fail in the same way. An "Oops" message stating the memory can't be reached:

 

"Unable to handle kernel paging request at virtual address 40037000"

 

Is there anything special that has to be done in order to access/read from these registers?

Outcomes