Realization of S32K344 ADC immediate read and buffer read function

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Realization of S32K344 ADC immediate read and buffer read function

1,008件の閲覧回数
chuansun
Contributor I

In the ADC routine of EB, two ADC groups are configured, each group has two ADC channels, one group uses interrupt transmission, and the other group uses DMA transmission. After successfully running the routine, modify the configuration of EB to realize the ADC. Immediate read and buffer read functions. My development is S32K344.
1. Modification of interrupt transmission of EB:
Adc Group Access Mode: ADC_ACCESS_MODE_STREAMING
Adc Group Conversion Mode: ADC_CONV_MODE_CONTINUOUS
Adc Group Notification: Notification_0
Adc Group Streaming Buffer Mode: ADC_STREAM_BUFFER_CIRCULAR
Adc Group Streaming Number Samples: 6
2, My goal: the buffer size can accommodate two group conversions (one group has two ADC channels), I want to do 6 group conversions, so the buffer is overwritten repeatedly.
3. The problem encountered: After executing the function Adc_StartGroupConversion(AdcGroupSoftwareOneShot), the while loop waits for 6 times to complete, and then Adc_ReadGroup(AdcGroupSoftwareOneShot, AdcReadGroupResult); under GDB debugging, the CPU will be restarted. When I break the point in Notification_0, I can see To ADC conversion, when the 6 conversions are completed, it cannot jump out of Notification_0.
4. I have the same problem about DMA. In the EB routine, I don’t see the configuration of the DMA source address and destination address (the value of SCATTER-GATHE in EB is 0), but the routine runs successfully.
5. Thank you very much for your patience and time, I am a beginner, so I have a lot of questions, thank you again for your help

0 件の賞賛
返信
1 返信

955件の閲覧回数
cuongnguyenphu
NXP Employee
NXP Employee

Hi,
I cannot check your main.c in the attached file. Please check it and share again

0 件の賞賛
返信