MIMXRT1024 Not able to access PIT base address in Linux

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MIMXRT1024 Not able to access PIT base address in Linux

跳至解决方案
1,088 次查看
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 项奖励
回复
1 解答
909 次查看
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 项奖励
回复
6 回复数
1,047 次查看
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 项奖励
回复
1,008 次查看
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 项奖励
回复
969 次查看
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 项奖励
回复
910 次查看
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 项奖励
回复
891 次查看
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 项奖励
回复
802 次查看
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 项奖励
回复