Hi All,
I am not able to access PIT timer base address(0x40084000) in Linux tried both absolute address and remapping. Any suggestions, Please let me know. The kernel just hangs on read also. Thanks.
Solved! Go to Solution.
Hi @Miguel04 Thanks, I got it working. What should be the value for Load register to get 5 micro sec resolution interrupts, using OSC clk (24Mhz) Thanks.
Hi @sbabu
Can you provide more details please.
Which linux distribution are you using?
Are you getting a HardFault when trying to access the address?
Are you using MCUXpresso IDE? Is it a custom project?
Best Regards, Miguel.
Hi @Miguel04 We are using ucLinux customized for RT1024. Not using mcuXpresso. There is not crash messages or panic, it just hangs.
Hi @sbabu
The i.MXRT crossover MCUs are not made to run linux, so we do not support this type of questions.
However I can recommend you to look into this post.
Also, verify what are you trying to do on the PIT address and if the module's clock is enabled, if the clock is not enabled this can cause the MCU to get a hardfault.
Best Regards, Miguel.
Hi @Miguel04 Thanks, I got it working. What should be the value for Load register to get 5 micro sec resolution interrupts, using OSC clk (24Mhz) Thanks.
Hi @sbabu
I'm glad you have your project working.
You can see the PIT driver example on the SDK.
It uses the next formula to calculate the value:
count = us*clockFreqInHz / 1000000
and the value is written on the register:
base->CHANNEL[channel].LDVAL = count - 1U;
I recommend you to look into the SDK example.
Best Regards, Miguel.
@Miguel04 Thanks. Even If I set the LDVAL to generate interrupt at 10 or 70 microsecond, Its trigerred at fixed 40 micro seconds. Any pointers?