MIMXRT1024 Not able to access PIT base address in Linux

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MIMXRT1024 Not able to access PIT base address in Linux

ソリューションへジャンプ
1,647件の閲覧回数
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 解決策
1,468件の閲覧回数
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,606件の閲覧回数
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,567件の閲覧回数
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 件の賞賛
返信
1,528件の閲覧回数
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 件の賞賛
返信
1,469件の閲覧回数
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 件の賞賛
返信
1,450件の閲覧回数
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 件の賞賛
返信
1,361件の閲覧回数
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 件の賞賛
返信