关于SK32F144 LPIT使用的问题

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

关于SK32F144 LPIT使用的问题

Jump to solution
568 Views
hong9424
Contributor I

你好,我在使用LPIT作为串口接收不定长数据超时处理,每当接收到一个字节的数据时,就立刻使计数器清空重新计时,请问该使用哪个函数来清空计数器。

Tags (1)
0 Kudos
1 Solution
518 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @hong9424,

In this 32-bit periodic counter (compare mode) that you chose.

It can be cleared either by disabling and enabling the timer or using an input trigger as shown below.

danielmartynek_0-1679486033144.png

 

 

BR, Daniel

View solution in original post

0 Kudos
5 Replies
549 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @hong9424,

Is the LPIT in the 32-bit trigger capture mode?

If so, this is probably the configuration you are looking for:

danielmartynek_0-1679065637185.png

 

Regards,

Daniel

 

0 Kudos
523 Views
hong9424
Contributor I
HI,丹尼尔马丁内克
请查看下面的回复,期待你的回复。
0 Kudos
524 Views
hong9424
Contributor I

这是我的配置,使用的是32 位触发器,目前是通过LPIT_DRV_StopTimerChannels(INST_UART_TIMEOUT_LPIT1, 1U << 0);
LPIT_DRV_StartTimerChannels(INST_UART_TIMEOUT_LPIT1, 1U << 0);
来重启清空计数器,请问是否有函数直接清空计数器,不需要重启定时器

S32定时器问题.pngS32定时器.png

0 Kudos
519 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @hong9424,

In this 32-bit periodic counter (compare mode) that you chose.

It can be cleared either by disabling and enabling the timer or using an input trigger as shown below.

danielmartynek_0-1679486033144.png

 

 

BR, Daniel

0 Kudos
515 Views
hong9424
Contributor I
谢谢你
0 Kudos