S32K3 ADC Optimize DMA Streaming

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K3 ADC Optimize DMA Streaming

52 Views
Jason22
Contributor III

Hello,

When the adc group has only one channel and the Adc Enable Optimize DMA Streaming Groups configuration item is checked, a hard fault occurs when the Adc_Ipw_SetupTcdSingleAdcChannelMajorLink function is executed.

In the case of a single channel, if the Adc Group Without Interrupts configuration item is checked and ACCESS_MODE_STREAMING, Select Adc Streaming Dma Channel is enabled. Otherwise, the number of the dma channel in the configuration file is 255, which is reasonable here. But what I don't understand is why when ADC_ENABLE_GROUP_STREAMING_RESULTS_RORDER or ADC_OPTIMIZE_DMA_STREAMING_GROUPS is STD_ON, instead of STD_ON==GroupPtr ->AdcWithoutInterrupt, the Adc_Ipw_SetupTcdSingleAdcChannelMajorLink function will be called. This seems unreasonable, and also because the call to this function leads to hard fault.

Jason22_0-1785831767968.png

BR,

Jason

 

Tags (3)
0 Kudos
Reply
1 Reply

18 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Jason22

Please do not use your QQ email account next time; please use your company email account instead.

I tested this, but I didn't find any problems.

I have attached my test project and test result for your reference.

 

Also, i check your code and i found some error in your code.

1.clock init is wrong, your code can't not run successfully,

Senlent_0-1785915417329.png

 

2."adc_group0_val" should be attribute to "no-cacheable area"

 

also:

The usage instructions for Optimize DMA streaming groups are clearly explained in the user manual.

RTD_ADC_UM.pdf

Senlent_0-1785915908665.png

 

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2401712%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K3%20ADC%20Optimize%20DMA%20Streaming%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2401712%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EWhen%20the%20adc%20group%20has%20only%20one%20channel%20and%20the%20Adc%20Enable%20Optimize%20DMA%20Streaming%20Groups%20configuration%20item%20is%20checked%2C%20a%20hard%20fault%20occurs%20when%20the%20Adc_Ipw_SetupTcdSingleAdcChannelMajorLink%20function%20is%20executed.%3C%2FP%3E%3CP%3EIn%20the%20case%20of%20a%20single%20channel%2C%20if%20the%20Adc%20Group%20Without%20Interrupts%20configuration%20item%20is%20checked%20and%20ACCESS_MODE_STREAMING%2C%20Select%20Adc%20Streaming%20Dma%20Channel%20is%20enabled.%20Otherwise%2C%20the%20number%20of%20the%20dma%20channel%20in%20the%20configuration%20file%20is%20255%2C%20which%20is%20reasonable%20here.%20But%20what%20I%20don't%20understand%20is%20why%20when%20ADC_ENABLE_GROUP_STREAMING_RESULTS_RORDER%20or%20ADC_OPTIMIZE_DMA_STREAMING_GROUPS%20is%20STD_ON%2C%20instead%20of%20STD_ON%3D%3DGroupPtr%20-%26gt%3BAdcWithoutInterrupt%2C%20the%20Adc_Ipw_SetupTcdSingleAdcChannelMajorLink%20function%20will%20be%20called.%20This%20seems%20unreasonable%2C%20and%20also%20because%20the%20call%20to%20this%20function%20leads%20to%20hard%20fault.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Jason22_0-1785831767968.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Jason22_0-1785831767968.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F393695iC527C3587CC928FC%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Jason22_0-1785831767968.png%22%20alt%3D%22Jason22_0-1785831767968.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EBR%2C%3C%2FP%3E%3CP%3EJason%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2402033%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K3%20ADC%20Optimize%20DMA%20Streaming%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2402033%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%40%3CSPAN%3EJason22%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EPlease%20do%20not%20use%20your%20QQ%20email%20account%20next%20time%3B%20please%20use%20your%20company%20email%20account%20instead.%3C%2FP%3E%0A%3CP%3EI%20tested%20this%2C%20but%20I%20didn't%20find%20any%20problems.%3C%2FP%3E%0A%3CP%3EI%20have%20attached%20my%20test%20project%20and%20test%20result%20for%20your%20reference.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EAlso%2C%20i%20check%20your%20code%20and%20i%20found%20some%20error%20in%20your%20code.%3C%2FP%3E%0A%3CP%3E1.clock%20init%20is%20wrong%2C%20your%20code%20can't%20not%20run%20successfully%2C%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Senlent_0-1785915417329.png%22%20style%3D%22width%3A%20682px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Senlent_0-1785915417329.png%22%20style%3D%22width%3A%20682px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F393751i7E6E8548013A9DBF%2Fimage-dimensions%2F682x236%3Fv%3Dv2%22%20width%3D%22682%22%20height%3D%22236%22%20role%3D%22button%22%20title%3D%22Senlent_0-1785915417329.png%22%20alt%3D%22Senlent_0-1785915417329.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E2.%22%3CSPAN%3Eadc_group0_val%3C%2FSPAN%3E%22%20should%20be%20attribute%20to%20%22no-cacheable%20area%22%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3Ealso%3A%3C%2FP%3E%0A%3CP%3EThe%20usage%20instructions%20for%20Optimize%20DMA%20streaming%20groups%20are%20clearly%20explained%20in%20the%20user%20manual.%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ERTD_ADC_UM.pdf%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Senlent_0-1785915908665.png%22%20style%3D%22width%3A%20910px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Senlent_0-1785915908665.png%22%20style%3D%22width%3A%20910px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F393752i34F2576F2464C29D%2Fimage-dimensions%2F910x701%3Fv%3Dv2%22%20width%3D%22910%22%20height%3D%22701%22%20role%3D%22button%22%20title%3D%22Senlent_0-1785915908665.png%22%20alt%3D%22Senlent_0-1785915908665.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E