One-shot Counter/Timer operation on LPC1347

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

One-shot Counter/Timer operation on LPC1347

509件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mathseng on Fri Dec 05 01:58:40 MST 2014
I am trying to find out how to use the Counter/Timer on the LPC1347 as a one-shot, and cannot find the references in the User Manual.

Specifically, I have a signal on the CT16B1CAP0 input, and want to use the timer in one-shot mode.

I have tried using the standard ISR model, capturing edges and interrupting, however, this consumes far too much CPU for higher (200KHz) signal frequencies.

Can anyone assist, please?

For the interested:
The scenario is to measure the duty cycle of a 200KHz signal. The first code developed was for a 20KHz signal, with both Rising and Falling edges captured in an ISR and retrieved using a task under FreeRTOS. Even at 20KHz, some edges were missed in an application with FreeRTOS, USB_HID, I2C  and ADC interrupts all running at the same time.
The revised hardware now uses a 200KHz PWM signal. The old algorithm just doesn't work. A fiddle and another algorithm allows PWM calculations for higher frequencies (tested at up to 2MHz signal (accuracy between 3 - 10% @ 2MHz)), but there are lots of assumptions, so results are approximate.
ラベル(1)
0 件の賞賛
0 返答(返信)