1. Introduction
SemiDrive provides MCAL that complies with the AUTOSAR standard, enabling drivers for hardware such as microcontrollers, storage, communication, and I/O. SemiDrive also offers AUTOSAR demo programs to showcase the invocation of these basic modules in predefined application scenarios. However, specific usage of certain modules is not explained in the demo programs. For example, the demo program for the ADC module uses the interrupt mode, but the usage of the DMA mode is not mentioned. This article aims to introduce the configuration and usage of the ADC's DMA mode, supplementing the usage methods of some modules.
2. Hardware and Software
Hardware platform: SemiDrive E3640 SD103_E3_GATEWAY_A02_043 development board
Software platform: SemiDrive_E3_MCAL_PTG3.0
3. DMA Overview
The E3 series includes three DMA controllers: DMA_SF0, DMA_SF1, and DMA_AP. DMA_SF0 and DMA_SF1 each have 24 channels (16 channels for the E3206/E3205/E3106/E3104 series), while DMA_AP has 8 channels. DMA_SF0 and DMA_SF1 support Lockstep mode. DMA supports multicore and static channel configuration, and it automatically registers interrupts based on the channel information assigned to each core.
Notes: The ADC supports data transfer via DMA. The ADC unit associated with the DMA group can only configure one group, and AdcStreamingNumSamples must be set to 1. Additionally, the DMA mode only supports software triggering.
4. Configuration Process
-
Configure the corresponding PORT to link the pins to the ADC module.
-
Use ADC1 as the unit. Each unit can only have one group in DMA mode.
-
Allocate FIFO3 in the DMA module for ADC data transfer.
-
Add configuration code.
5. EB Configuration
- ADC configuration is as follows:


-
DMA configuration:


Adc_StartGroupConversion(AdcConf_AdcGroup_Adc1Group_0);

5. DMA configuration is as follows:

6. ADC usage

7. DMA transfer verification is as follows:
Set breakpoint 1
Set breakpoint 2

At the specified address, you can see that ADC sampling data is transferred to the designated address.

6. Conclusion
This article introduced the configuration process for ADC triggering combined with DMA for data transfer.
7. Reference Documents
1. "SemiDrive_E3_MCAL_User_Guide_Rev03.00"
2. "E3400_E3600_MCU_TRM_Rev01.00"
