SCT timer capture

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

SCT timer capture

984 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mattes on Fri Mar 21 20:14:53 MST 2014
Created SCT functionality that  simply counts up. On input signal low an SCT interrupt is created, which then can do the calculation of the signal period.  I like to do in a way that the counter is autoreset and continues counting in the background. This way the time spent in IRQ is not delaying the measuring of the next period.

The only thing i found is the LIMIT register, which resets the counter to 0. And then my count sample is gone.
The alternative is to halt the counter, but this interferes again with measuring the next signal.
Or I don't reset the counter (no limit) and it keeps counting. But again by the time I read the counter, it already advanced
and it fudges the result.

I think it is possible with the 'older' timer 16/32 bit. But this is for an lpc810, which for my understanding
does not offer support it.

Is that possible with SCT to 'autobackup' the counter?

I looked at the manual, but the complexity of the SCT offers a lot and I fear that I just overlooked something.

thanx for any advice

0 项奖励
回复
2 回复数

809 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mattes on Mon Mar 24 08:04:14 MST 2014

Quote: mc

..... LPC800 cookbook at below link
http://www.lpcware.com/content/nxpfile/lpc80-sct-cookbook-and-tutorial-code-examples



Thank you very much for the pointers. I actually came to realize what I was missing. The example
rc5_receive actually was valuable on how to configure REGMODE and CAPCTRL properly,
to get the desired result.

Thumbs up for SCT flexibility.
0 项奖励
回复

809 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Sun Mar 23 22:01:28 MST 2014
Hi Mattes,
If you want to measure input signal period you can use capture register to capture time between two rising,two falling or between rising and falling. Please look into page 30 and 35 of LPC800 cookbook at below link
http://www.lpcware.com/content/nxpfile/lpc80-sct-cookbook-and-tutorial-code-examples
0 项奖励
回复