LPC546XX CTIMER configuration question

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

LPC546XX CTIMER configuration question

跳至解决方案
329 次查看
abdel12312
Contributor I

Hello NXP Community,

I'm working with an LPC546xx and need to know if a single CTIMER can simultaneously:

  1. Use channels 0 and 1 for input capture
  2. Use a match register (MR0) for interrupt generation on counter overflow without affecting any pins

My current setup:

  • CTIMER1 channels 0-1: Input capture
  • CTIMER1 channels 2-3: Timeout interrupts

I need to add timer overflow detection using a match register on the same timer. My though was to use Channels 0 or 1 MRs to be able to count number of overflows.

Since MCR (match control), CCR (capture control), and EMR (pin output) are separate registers, I believe they can be configured independently.

Can someone from NXP confirm if using match interrupts alongside input capture is supported?

0 项奖励
回复
1 解答
210 次查看
Habib_MS
NXP Employee
NXP Employee

Hello @abdel12312, sorry for the late reply.
Yes, you can configure a channel in Input Capture/Match mode and utilize the match register simultaneously. However, the SDK does not provide an example demonstrating both functionalities together. As a reference, you can modify the example named lpcxpresso54628_ctimer_match_interrupt_example, which already includes the match functionality. This thread may also help guide your implementation.

BR
Habib.

在原帖中查看解决方案

0 项奖励
回复
1 回复
211 次查看
Habib_MS
NXP Employee
NXP Employee

Hello @abdel12312, sorry for the late reply.
Yes, you can configure a channel in Input Capture/Match mode and utilize the match register simultaneously. However, the SDK does not provide an example demonstrating both functionalities together. As a reference, you can modify the example named lpcxpresso54628_ctimer_match_interrupt_example, which already includes the match functionality. This thread may also help guide your implementation.

BR
Habib.

0 项奖励
回复