Using a CTIMER with FreeRTOS on LPC546xx

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

Using a CTIMER with FreeRTOS on LPC546xx

跳至解决方案
1,747 次查看
anealca
Contributor II

I have FreeRTOS running on my 54628 dev board (OM13098) and can use the LCD, TCP/IP and SD features.

I am using MCUXpresso v10

What I want to do is add a timer to drive 2 GPIO pins (a synchronized set of pulses).

I can use the 4 match setpoints of the timer for the synchonization and reset the TC on the last match.

I should be able to do it with 1 timer (#2) set for Match mode and let my IRQ handler manage the pin output logic.

Attached is my initialization and IRQ logic.

This code compiles without error or warning...

BUT

I cannot seem to get it to work?

It will not stop in the IRQ when debugging it?

 And I don't see the outputs?

Please help...

标签 (3)
1 解答
1,609 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Adrian,

Regarding your question, I have checked your code, your problem is that you CAN NOT enter CTimer interrupt hadler .

I have changed your code, I attach it here,  but I do not try to compile/link, pls have a try.

BR

XiangJun Rong

在原帖中查看解决方案

2 回复数
1,610 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Adrian,

Regarding your question, I have checked your code, your problem is that you CAN NOT enter CTimer interrupt hadler .

I have changed your code, I attach it here,  but I do not try to compile/link, pls have a try.

BR

XiangJun Rong

1,609 次查看
anealca
Contributor II

xiangjunrong

YES I was missing the timer start TCR event...

Thanks for that...

I have hard coded my IRQ into the interrupt vectors (in g_pfnVectors[]) because I can't figure out how to dynamically replace the weak definition of CTIMER2_IRQHandler to my IRQ.

I shouldn't need the clocks on the digital outputs...

I have configured the pins using the configuration tool...

So they should work OK...

My other configured output pins are working...

I am now getting interrupts...

Thankyou... 

Adrian.

0 项奖励
回复