S32k344 PIT Timer example using SDK peripherals drivers

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

S32k344 PIT Timer example using SDK peripherals drivers

2,575 次查看
Omkar9903
Contributor III

Hi,

I am using the S32K344 microcontroller and would like to configure the PIT timer without generating interrupts. Are there any examples available in the NXP community that I can refer to? I'm using SDK peripherals and SDK drivers for this purpose

Thanks.

0 项奖励
回复
3 回复数

2,540 次查看
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Omkar9903,

By "SDK" I am assuming you are referring to the Real-Time Drivers (RTD) package, since there is no RTM version similar to S32K1 for the S32K3.

 The RTD includes the "Pit_Gpt_Ip_Example_S32K344" project, which triggers a notification:

Julin_AragnM_0-1729183315190.png

You can also look at the PIT and STM with RTD training, which features GPT PIT overview, how to configure and an example.

There are also some existing examples in community you can use as reference: 

Best regards,
Julián

0 项奖励
回复

2,499 次查看
Omkar9903
Contributor III

I’m trying to understand whether I need to configure the BCTU or TriggerMux for polling. I’m not clear on how to monitor when my timer has ended. Could you clarify this for me?

0 项奖励
回复

2,478 次查看
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Omkar9903,

I'm not sure if I understand your end goal.

The Body Cross Triggering Unit (BCTU) is a module that is used to trigger the on-chip ADCs. TRGMUX is a flexible mechanism for connecting various trigger sources to multiple peripherals.

So, for example, when a timer output asserts a BCTU trigger, BCTU passes the trigger to an ADC input and stores the trigger assertion until the corresponding ADC begins the requested conversion.

You can flexibly route any trigger from input to any output (e.g.  PWM->TRGMUX->BCTU).

However, the PIT module does not support polling (hence the name, Periodic Interrupt Timer). If you need to poll until enough time has passed, you can set a flag on any PIT interrupt and poll by application until the flag is set, or simply use a delay function (such as osif_delay) to wait until enough time has passed.

Best regards,
Julián

 

0 项奖励
回复