The GPADC driver provides API for safety monitoring of the inputs, such as the temperature sensor, voltage regulators to the device.
Features Supported
- 10-bit ADC
- Supports Inter Frame Monitoring Mode(IFM)
- Software command mechanism to trigger the conversion – Storage of min, max, and sum of the samples captured per channel
SysConfig Features
- Note
- It is strongly recommend to use SysConfig where it is available instead of using direct SW API calls. This will help simplify the SW application and also catch common mistakes early in the development cycle.
- Selection of Channel read mode
- Set Channel index number to read from
- Set Channel Bitmap
- Option to set the conversion mode
- Set Channel Configuration values
Features NOT Supported
Continous Time Monitoring Mode(CTM)
Example Usage
Include the below file to access the APIs
GPADC Single Buffer Read
uint16_t gpadc_result = 0;
uint16_t channelCount;
for(channelCount=0; channelCount<CONFIG_GPADC_CHANNEL_NUM_INSTANCES; channelCount++)
{
}
GPADC Group Buffer Read
uint16_t gpadc_result[9];
uint8_t index =0;
uint32_t adcInMv;
{
adcInMv = (gpadc_result[index] * (UPPER_REFERENCE -LOWER_REFERENCE))/
(1<<ADC_DEF_CHANNEL_RESOLUTION);
}
GPADC Temperature Sensor Read
int32_t convRes;
uint8_t numAverageSamples;
numAverageSamples = 5U;
API
APIs for GPADC