Chibios ADC setup for ATSAM3S
Moderators: RoccoMarco, lbednarz, tfAteba
-
admatthews
- Posts: 1
- Joined: Wed Mar 13, 2019 1:49 am
Chibios ADC setup for ATSAM3S
This is my first attempt at using ChibiOS (any RTOS for that matter), so please bare with me. I am looking for support on how to get the ADC configured to simply read the voltage of a proximity sensor. I am using a Matrix Creator board, which contains a ATSAM3S2C MCU running ChibiOS (kernel 2.4.2). I have been digging through the source files and found the adc_lld template files. Do I need to write my ads_lld.c file for my specific MCU? Or Does ChibiOS already have some code developed to setup the ADC? Any help is greatly appreciated!
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: Chibios ADC setup for ATSAM3S
Hi,
That is a quite old ChibiOS version, currently there is no support for SAM3S and I was not aware that somebody created a port.
Creating an HAL is a non trivial effort but you are correct, you need to provide the LLDs to make driver works. There are templates under /os/hal/templates, you may use the STM32 port as a reference /os/hal/ports/STM32/LLD.
Giovanni
That is a quite old ChibiOS version, currently there is no support for SAM3S and I was not aware that somebody created a port.
Creating an HAL is a non trivial effort but you are correct, you need to provide the LLDs to make driver works. There are templates under /os/hal/templates, you may use the STM32 port as a reference /os/hal/ports/STM32/LLD.
Giovanni