Using a CTIMER with FreeRTOS on LPC546xx

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Using a CTIMER with FreeRTOS on LPC546xx

ソリューションへジャンプ
1,742件の閲覧回数
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,604件の閲覧回数
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,605件の閲覧回数
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,604件の閲覧回数
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 件の賞賛
返信