Page 1 of 1

ADC support for Olimex SAM7EX256 board

Posted: Sun Feb 24, 2013 8:59 am
by Losi
Hi there,

I'm quite new with ChibiOS, but I found it great. The board that I'm using is an Olimex SAM7EX256 and as the Feature Matrix shows it is not fully supported yet... however I realized that some new HAL extension was commited a several days ago to the devel project:

https://github.com/ChibiOS-Upstream/ChibiOS-RT/tree/master/os/hal/platforms/AT91SAM7

My question is that is this already usable? Because it seems to be complete except the sampling rate and ADC input channel macros. Unfortunately I was not able to fit the STM32Fx demo projects to the SAM7EX256 board. Could anybody show me a sample how to configure the ADC HAL in order to get e.g. Temperature and/or TRIM potentiometer values?

Re: ADC support for Olimex SAM7EX256 board

Posted: Sun Feb 24, 2013 9:46 am
by inmarket
Yes it is complete however it is possible that a header file or board file modification has been missed in the upload. What symbols are you missing and I will verify they are where they should be?

An example of the ADC being used on the Olimex SAM7EX256 board can be found in the ChibiOS-GFX examples (an addon library for LCD and other sub-systems) under demos/modules/gadc.
It demonstrates the dial, temperature sensor and the microphone ADC inputs being used all at once and the result displayed on the LCD on this board.

Much of the development in the GFX addon library (chibios-gfx.org) is occuring on this excellant and very inexpensive board.

Re: ADC support for Olimex SAM7EX256 board

Posted: Mon Feb 25, 2013 6:40 am
by Losi
Thanks! This project contains some new information for me about AT91SAM7 and ADC. Now I'm a bit busy, but I'll describe how it is going.