How to configure the DMA in ADC and how to use ASYNC API in ADC .please provide any sample example code for ASYNC ADC and ADC DMA
How to configure the DMA in ADC and how to use ASYNC API in ADC .please provide any sample example code for ASYNC ADC and ADC DMA
What SDK are you using, nRF5_SDK or nRF Connect SDK?
DMA is always enabled for the SAADC peripheral.
DMA is always enabled for the SAADC peripheral. Where i can get the DMA related driver code in which file ?I want to understand the flow of the code where the DMA is enabled . Do we need to add extra config for Enabling DMA?
jyoti yadav said:Where i can get the DMA related driver code in which file ?
I'll try to create a sample. I'll need to time create, debug, and test it before I can share it.
jyoti yadav said:Do we need to add extra config for Enabling DMA?
No, the SAADC can only be used with DMA.
You can find the example at https://github.com/haakonsh/NCS_SAADC_example/tree/master.
You can find the example at https://github.com/haakonsh/NCS_SAADC_example/tree/master.
Hi, this is the exact example I wanted for nrf5340. I tried to run your example. But get a list of errors related to PPI packages. I am using ncs1.8. Should I change those ppi to dppi in nrfx_ppi.h ? Please help!
In file included from C:\Users\info\ncs\v1.8.0\modules\hal\nordic\nrfx\drivers\include\nrfx_ppi.h:38, from c:\Users\info\ncs\firmware_v3\NCS_SAADC_example-master\src\main.c:10: C:\Users\info\ncs\v1.8.0\modules\hal\nordic\nrfx\hal\nrf_ppi.h:54:25: error: 'PPI_CHEN_CH0_Pos' undeclared here (not in a function); did you mean 'DPPIC_CHEN_CH0_Pos'? 54 | NRF_PPI_CHANNEL0 = PPI_CHEN_CH0_Pos, /**< Channel 0. */ | ^~~~~~~~~~~~~~~~ | DPPIC_CHEN_CH0_Pos C:\Users\info\ncs\v1.8.0\modules\hal\nordic\nrfx\hal\nrf_ppi.h:58:25: error: 'PPI_CHEN_CH4_Pos' undeclared here (not in a function); did you mean 'DPPIC_CHEN_CH4_Pos'? 58 | NRF_PPI_CHANNEL4 = PPI_CHEN_CH4_Pos, /**< Channel 4. */ | ^~~~~~~~~~~~~~~~ | DPPIC_CHEN_CH4_Pos
You need to open up a new ticket on this subject.