Tick from RTC on RT1170

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

Tick from RTC on RT1170

2,323件の閲覧回数
JayCao
Contributor III

Hello Support team,

Our project wants to use a tick from RTC but SDK doesn't support the get tick function.

So we would like to get a tick via register same as getting second value.

JayCao_0-1701736270855.jpegJayCao_0-1701736270855.jpeg

It looks like we have to read it via HPRTCMR and HPRTCLR registers.

The second value will be obtained from bits 31-16, and the tick value can be obtained from 15 -0 bit, am I right?

If I am right, could you guide me on the way to get the tick from bit 15-0?

JayCao_1-1701736652762.pngJayCao_1-1701736652762.png

Thanks for your support!

 

ラベル(2)
0 件の賞賛
返信
3 返答(返信)

2,297件の閲覧回数
JayCao
Contributor III

Hello Gavin,

Thanks for your response.

We were considered to use systick but our system is using FreeRTOS along with many tasks.

Is it possible to use systick in this case?

Best regards,

0 件の賞賛
返信

2,288件の閲覧回数
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @JayCao ,

Yes, it is possible to use systick in this case. And if there are enough hardware resources, using a hardware timer is also a method.

 

Best regards,

Gavin

0 件の賞賛
返信

2,305件の閲覧回数
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @JayCao ,

Thanks for your interest in NXP I.MX RT series.

It depends on the resolution of the RTC tick. But on Cortex-M, RTC resolution is 1s, so it can't generate the tick you need.
a) Systick is used by default
b) for low power, it depends what can wake me up from low power (depending on the mode). If Systick wakes me up (basically any interrupt), systick can be used
d) if Systick is not an exit from low power mode,  a low power timer (which usually has a 1 ms resolution which is good enough) is recommended.
e) if you need to go deeper in low power, you could use the RTC. That usually means that the RTC alarm interrupt is the only thing which can wake me up, so the low power timer does not help. But typically the RTC has a resolution of 1 sec which is not appropriate for most cases. 

 

I hope this helps.

Best regards,

Gavin

0 件の賞賛
返信