lpcware

External timer capture reset for LPC43xx

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
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?

Outcomes