LPC17xx HAL_LLD, GPT, PAL, RTC, SERIAL drivers

ChibiOS public support forum for topics related to the NXP LPC family of Cortex-M micro-controllers.
Post Reply
marcinj7
Posts: 13
Joined: Wed Apr 17, 2013 10:08 am

LPC17xx HAL_LLD, GPT, PAL, RTC, SERIAL drivers

Post by marcinj7 »

Hi,

Zip file contain LPC17xx drivers:
hal_lld
gpt
pal
rtc - not supported counter increment interrupt
serial - only uart0, not supported dma

Testhall for rtc and irq_storm.
I've made some changes in chrtclib.c for LPC17xx RTC.
Tested on LPC1766.
Attachments
LPC17xx_drivers_ChibiOS_2.5.2.zip
(61.98 KiB) Downloaded 1226 times
marcinj7
Posts: 13
Joined: Wed Apr 17, 2013 10:08 am

Re: LPC17xx HAL_LLD, GPT, PAL, RTC, SERIAL drivers

Post by marcinj7 »

Update
Available drivers:
adc -> dma only support 1 adc channel
dac
dma
serial -> not supported dma
spi -> not supported dma
i2c
pal
rtc -> not supported counter increment interrupt
mac
gpt

Demos:
EA LPCXpresso LPC1769
EA LPCXpresso LPC1769 LWIP

Code is now available on my git repository:
https://github.com/marcinj/ChibiOS-RT/tree/lpc_dev
theShed
Posts: 50
Joined: Tue Feb 26, 2013 3:43 pm

Re: LPC17xx HAL_LLD, GPT, PAL, RTC, SERIAL drivers

Post by theShed »

Thanks Marcin,
I'll try and get that in the main branch soon.

--
mike
theShed
Posts: 50
Joined: Tue Feb 26, 2013 3:43 pm

Re: LPC17xx HAL_LLD, GPT, PAL, RTC, SERIAL drivers

Post by theShed »

Finally got around to merging these drivers into the main tree.
Also includes a LPC17xx CAN driver...
Thanks to Marcin for his work on these.

--
mike
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: LPC17xx HAL_LLD, GPT, PAL, RTC, SERIAL drivers

Post by Giovanni »

Excellent work, there is some impressive support for LPC17xx now.

Have you considered porting the code to version 3.0? I am going to switch the trunk to the 3.0 branch in a couple weeks, the new code could be officially released in 3.0.

One interesting thing in 3.0 is that the HAL is able to work with both RT and Nil kernels but potentially also without an RTOS (bare metal mode) or potentially with other RTOSes complete enough to implement the OSAL layer. This feature alone makes an HAL implementation even more valuable.

Giovanni
theShed
Posts: 50
Joined: Tue Feb 26, 2013 3:43 pm

Re: LPC17xx HAL_LLD, GPT, PAL, RTC, SERIAL drivers

Post by theShed »

I was hoping to use the move to 3.0 to re-structure the LPC tree, something like the way the STM32 tree is arranged.
Do you have any notes on the changes required to port to V3.0?

--
mike
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: LPC17xx HAL_LLD, GPT, PAL, RTC, SERIAL drivers

Post by Giovanni »

Good point, I will write a small 3.0 porting guide before switching the repository.

Giovanni
Post Reply