External timer capture reset for LPC43xx

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

External timer capture reset for LPC43xx

600件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rolanddixon on Mon Jan 26 10:17:47 MST 2015
Hi, I am writing this because I have experience with STM32 ARM cortex-M4 microcontrollers am just starting out with the LPC microcontrollers and have noticed a bit less functionality in some areas (maybe it is just my inexperience).

On the STM32 MCUs there is such a thing as timer slave reset, i.e. an external device can reset the timer's counter on an external low/high transition without having to use any interrupts at all. So as an example... A GPS module continually sends strings of ASCII TTL data at a specified frequency. These strings of data are not necessarily the same length each time. So one technique is to use the DMA+UART to capture the strings and a timer in slave reset mode to detect beginning and ends of UART transmission. If the timer reaches its match value, it will interrupt and you know that the GPS has not been transmitting and you can determine the string size from checking the first 12 bits on the DMA control register, then reset the DMA control register and wait for the UART to reset the timer again. If the timer does not interrupt, you know that the external signal is always resetting it.

This basically avoids any need for interrupts on the UART Tx channels during GPS transmission and avoids having to check for the end of a GPS string on a very large DMA buffer. So it is a very handy tool for capturing UART strings of unknown length. The closest thing, as far as I can tell, in the LPC MCUs is configuring timer capture registers and continually checking then to see if there has been a change in value (resource consuming!).

Is this functionality available in the LPC products, if it is how do I go about implementing it?
ラベル(1)
0 件の賞賛
返信
3 返答(返信)

538件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rolanddixon on Thu Jan 29 06:23:21 MST 2015
Yeah, the SCT does the trick! Thank you, that is one awesome peripheral!
0 件の賞賛
返信

538件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rolanddixon on Wed Jan 28 04:14:46 MST 2015
Awesome, thank you for the reply. Will have a look at it.
0 件の賞賛
返信

538件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by starblue on Tue Jan 27 03:26:28 MST 2015
The SCT can do that (and much more).

You can define an event that is triggered by some external input and acts as a limit event for a counter, i.e. resets it to zero.
0 件の賞賛
返信