RTEMS: Working with AFE

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Working with AFE
Board Support Packages » ARM » Atmel/Microchip SAM E70, S70, V70 and V71 » Contributed Code

The AFE driver provides the interface to configure and use the AFE peripheral.
It converts the analog input to digital format. The converted result could be 12bit or 10bit. The AFE supports up to 16 analog lines.

To Enable a AFE conversion,the user has to follow these few steps:

- Select an appropriate reference voltage on ADVREF
- Configure the AFE according to its requirements and special needs,which could be broken down into several parts:
  1. Select the resolution by setting or clearing AFEC_MR_LOWRES bit in AFEC_MR (Mode Register)
  2. Set AFE clock by setting AFEC_MR_PRESCAL bits in AFEC_MR, the clock is calculated with AFEClock = MCK / ((PRESCAL+1) * 2)
  3. Set Startup Time,Tracking Clock cycles and Transfer Clock respectively in AFEC_MR.
- Start conversion by setting AFEC_CR_START in AFEC_CR.

For more accurate information, please look at the AFE section of the Datasheet.

Related files :
afec.c
afec.h
afe_dma.c
afe_dma.h