S32K3XX periodic interrupt

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

S32K3XX periodic interrupt

179 Views
Alfredo_Rubio
Contributor II

I' m trying to implement a periodic interrupt by means of the PIT timer.

I have started from the S32K344_pwm_led_ebt example.

From what I understand in this example, the Gpt_PitNotificationis hanging from PIT0 device.

The problem is that the notification is being generated at a 250mHz, no matter the frequency that I configure in the GptChannelTickFrequency (S32 configuration tool) or the Gpt_start_timer Simulink block.

How do you change the timer periode?

 

Thanks in advance.

0 Kudos
1 Reply

125 Views
Irina_Costachescu
NXP Employee
NXP Employee

Hello @Alfredo_Rubio 

The GptChannelTickFrequency parameter corresponds to the frequency of the clock being used for the specific timer channel, selected by the GptChannelClkSrcRef configuration parameter. Hence, for changing the value of the GptChannelTickFrequency, a new source clock must be selected for the specific Gpt channel, or the frequency value for the already selected clock must be edited inside the Clocks Tool.

The Gpt Simulink block allows the specification of a time-out period (in number of ticks), for the selected Channel, after which a notification should occur. Hence, changing the Value parameter of the Simulink block should also vary the period of execution for the notification function associated to that channel.

Could you please let us know what Gpt channel are you using inside your model? Is it the GptChannelConfiguration_0 already enabled inside the configuration project associated to that model or have you configured a different one?
Also, what is the action being executed inside that subsystem, i.e how do you measure the 250 mHz for the notification period?

For reference, please check the Gpt examples that our toolbox provides, found inside the <toolbox_root>/S32K3_Examples/gpt folder, for seeing more details on how these functions are used inside a Simulink model.

Thank you,
Irina

0 Kudos