External timer capture reset for LPC43xx

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

External timer capture reset for LPC43xx

410 Views
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?
Labels (1)
0 Kudos
3 Replies

348 Views
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 Kudos

348 Views
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 Kudos

348 Views
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 Kudos