Exactly timed pulse on i.MX8M Plus

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

Exactly timed pulse on i.MX8M Plus

1,568 次查看
flobue
Contributor II

What is the best/or a better way to generate an exactly (<50ns) timed pulse (at a GPIO) on the i.MX 8M Plus?

The pulse should be executed at a given time of the RTC, e.g.: at 12:00:00.

The current concept is to use the auxiliary CM7, which then will poll the RTC. And then controls the pulse. This however is neither clean nor very exact.

I'm sure, that there are better ways to do this, but I don't know how.

Other ideas, which I had, but don't seem to be possible (At least as far I can tell):

  • Use the PTP PPS. This would be very nice, but since the PPS is controlled by the PTP time, which can only be used, when there is a PTP connection active, it is not feasible.
  • Use an interrupt on the RTC. The RTC cannot be used as an interrupt source (at least for the CM7).
0 项奖励
回复
5 回复数

1,533 次查看
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @flobue ,

I hope you are doing well.
 
Can you please clarify if you want to generate just one pulse of <50ns or a continuous pulse from the GPIO?
 
Thanks & Regards
Sanket Parekh
 
0 项奖励
回复

1,526 次查看
flobue
Contributor II

Hello @Sanket_Parekh
Thanks for the answer.

The pulse should be repeated about every 500ms. It would be nice, if the period would be exactly 500ms, but that's not really important.
Important is, that the time of the pulse is exactly known. Preferably, before the pulse actually happens.

Regards

0 项奖励
回复

1,491 次查看
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @flobue ,

I hope you are doing well.
Please accept my apologies for delayed answer.
 
To generate a 500ms pulse you could use PWM.
you should not access lprtc registers while it is active on the A53 core.
 
you could use the below-mentioned methods to generate a pulse on the RTC alarm.
1. Set an alarm for LPRTC from the A53 core and use rpmsg to communicate between M4 and A53 when an interrupt occurs.
    one can refer to examples at imx-test/tree/test/mxc_rtc 
2. Use an external RTC connected to the M4 i2c bus and generate a PWM signal on the alarm interrupt.
 
Thanks & Regards,
Sanket Parekh

1,469 次查看
flobue
Contributor II

Thanks for the answer.

I think, that the RTC interrupt for the CM7 could do the job.
Somehow I didn't find this interrupt...

Thanks for the tipp and Regards
flobue

0 项奖励
回复

1,455 次查看
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @flobue ,

I hope you are doing well.
 
Cortex-M7 does have an interrupt for SNVS RTC (SRTC Consolidated Interrupt. Non-TZ. ), one can look at  7.1.3 CM7 Interrupts in i.MX 8M Plus Applications Processor Reference Manual
However, SNVS RTC driver support is not available in SDK_2_12_1_EVK-MIMX8MP
 
One can refer to SDK_2_12_1_EVK-MCIMX7ULP to get more idea about SNVS RTC implementation.
 
Thanks & Regards,
Sanket Parekh

0 项奖励
回复