关于SK32F144 LPIT使用的问题

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

关于SK32F144 LPIT使用的问题

跳至解决方案
653 次查看
hong9424
Contributor I

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

标记 (1)
0 项奖励
1 解答
603 次查看
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 项奖励
5 回复数
634 次查看
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 项奖励
608 次查看
hong9424
Contributor I
HI,丹尼尔马丁内克
请查看下面的回复,期待你的回复。
0 项奖励
609 次查看
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 项奖励
604 次查看
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 项奖励
600 次查看
hong9424
Contributor I
谢谢你
0 项奖励