MIMXRT1024 Not able to access PIT base address in Linux

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MIMXRT1024 Not able to access PIT base address in Linux

Jump to solution
922 Views
sbabu
Contributor III

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.

0 Kudos
Reply
1 Solution
743 Views
sbabu
Contributor III

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.

View solution in original post

0 Kudos
Reply
6 Replies
881 Views
Miguel04
NXP TechSupport
NXP TechSupport

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.

0 Kudos
Reply
842 Views
sbabu
Contributor III

Hi @Miguel04 We are using ucLinux customized for RT1024. Not using mcuXpresso. There is not crash messages or panic, it just hangs.

0 Kudos
Reply
803 Views
Miguel04
NXP TechSupport
NXP TechSupport

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.

Linux on a i.MXRT1160

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.

0 Kudos
Reply
744 Views
sbabu
Contributor III

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.

0 Kudos
Reply
725 Views
Miguel04
NXP TechSupport
NXP TechSupport

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.

 

0 Kudos
Reply
636 Views
sbabu
Contributor III

@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?

0 Kudos
Reply