S32K3XX periodic interrupt

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

S32K3XX periodic interrupt

跳至解决方案
227 次查看
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 项奖励
1 解答
173 次查看
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 项奖励
1 回复
174 次查看
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 项奖励