Page 1 of 1

Chibios ADC setup for ATSAM3S

Posted: Wed Mar 13, 2019 2:03 am
by admatthews
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!

Re: Chibios ADC setup for ATSAM3S

Posted: Wed Mar 13, 2019 8:31 am
by Giovanni
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