Embedded Freaks..

August 16, 2009

LPC1766 Not So Reliable UART0 Loopback

Filed under: Cortex-M — Tags: — kunilkuda @ 1:35 pm

Let’s continue the last post with the real interrupt based program: UART0 interrupt-based loopback. The program example will echoing anything that is sent to the serial port, but since it’s not checking whether the TX FIFO is empty or not during the loopback, some data may be lost if you sent a file (or sending a lot of data).

The whole application can be downloaded here.

(more…)

August 14, 2009

Cortex-M3 Interrupt/Exception Control

Filed under: Cortex-M — Tags: — kunilkuda @ 9:18 pm

Cortex-M3 has NVIC (Nested Vector Interrupt Controller), a kind of peripheral, to support up to 255 interrupts.

Other than that, it also has WIC (Wakeup Interrupt Controller), which similar to NVIC, but it doesn’t need any clock to run. Hence it can be used to detect any interrupt during sleep mode without burning energy (no need to have any clock running on system at all).

Since WIC is only available on rev2 Cortex-M3 (currently only LPC17xx that have it), this post will only discuss the NVIC control. (more…)

August 10, 2009

Cortex-M3 SysTick peripheral

Filed under: Cortex-M — Tags: — kunilkuda @ 5:10 pm

The interesting part of Cortex-M3 is SysTick, an additional timer, provided by ARM, to switch the process context on RTOS. ARM was hoping that by using SysTick, most of RTOS will be portable from vendor to vendors.

But I’m a bit curious on how to use it. Hence, here’s the simple demo on how to use SysTick on Cortex-M3. (more…)

Older Posts »

Blog at WordPress.com.