S32k344 PIT Timer example using SDK peripherals drivers

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32k344 PIT Timer example using SDK peripherals drivers

1,902 Views
Omkar9903
Contributor II

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 Kudos
Reply
3 Replies

1,867 Views
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 Kudos
Reply

1,826 Views
Omkar9903
Contributor II

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 Kudos
Reply

1,805 Views
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 Kudos
Reply