Is example LPIT’s “MBD_S32K14x_Config_Information” module deffident from others?

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

Is example LPIT’s “MBD_S32K14x_Config_Information” module deffident from others?

1,083 次查看
binqin
Contributor III

If I use this module generate  code,the clock was not 80M,and this was 100M.But if Iuse the a new “MBD_S32K14x_Config_Information” module from S32K library ,the clock was 80M,but the LED result wasn't right.

1.jpg2.png

0 项奖励
回复
3 回复数

849 次查看
Daniel_Popa
NXP Employee
NXP Employee

Hi binqin‌,

The processor works @80MHz or @112MHz

The initialization for the System Clock is computed starting from the CPU frequency value and sets the appropriate timers with the pre-computed value.

So there is no problem that you see the 

/* Initialize system timer */
UpdateSystickConfig(10000000);

Furthermore, i do not understand what you say by "the clock was 80M,but the LED result wasn't right."

I've tested the application and the LED is controlled correctly based on the PIT settings: 500ms and 250ms respectively

These are the oscilloscope wave-forms.

(upper signal) CH1 = RED LED @500ms changing rate

Capture.PNG

(lower signal) CH2 = BLUE LED @250ms changing rate

Capture.PNG

As you can see the results are OK.

Can you share what you are seeing ?

Hope this helps!

Daniel

0 项奖励
回复

849 次查看
binqin
Contributor III

Hi Daniel,

I've found the result was right.Is this module display 80M wrong?But the generated code was 100M right?

Regards,

Tony

0 项奖励
回复

849 次查看
Daniel_Popa
NXP Employee
NXP Employee

Hi binqin‌,

There is nothing wrong. The processor is set to work @80MHz but the UpdateSystickConfig() is using the

Frequency->Ticks transformation, to set the RVR register to 10 000 000 ticks. This will in set up the MCU to operate at 80MHz.

Best regards,

Daniel

0 项奖励
回复