ADC-DMA Doesn't work on S32K358 Example

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

ADC-DMA Doesn't work on S32K358 Example

356 Views
simon98
Contributor III

Hi,

Currently i'm using XS32K3X8EVB-Q289 on MBDT 1.8 and i'm trying the ADC-DMA example provided.

The problem that i have is the same mentioned in this my previous ticket:

https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/ADC-DMA-Example-doesn-t-work/m-p/211706...

In the application operation I see, on freemaster, that ADC_POT0 value is updated only once by the ADC: if I change the position of the potentiometer and reset the board the new value of ADC_POT0 is set, but nomore update.

When i enter in debug on S32DS, if i set a breakpoint on Adc_StartGroupConversion call i could see, in the Expressions tab, that ADC_POT0 changes its value accordigly with the potentiometer position:

Screenshot 2026-03-12 170212.png

If i let the program running without breakpoints, on freemaster ADC_POT0 value doesn't update.

I thought that this behaviour was linked to freemaster, which, for some unknown reason, couldn't update the value of ADC_POT0, but if i set a breakpoint on the first line of the Hardware Interrupt Callback ADC_POT0 value doesn't update either in debug mode doing some Resume:

Screenshot 2026-03-12 170854.png

 

I've also tried to add a simple If in simulink where, if i got an adc value greater than 10000, flips the RGBLED0_BLUE. This, to work around the hypothetical freemaster problem but neither in this case worked... so freemaster doesn't cause the problem. 

Screenshot 2026-03-12 172136.png

I'm out of ideas, can anyone help me with this problem?

I attach the project updated.

 

Thanks,

Simon

 

 

 

0 Kudos
Reply
0 Replies
%3CLINGO-SUB%20id%3D%22lingo-sub-2331625%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EADC-DMA%20Doesn't%20work%20on%20S32K358%20Example%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2331625%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3ECurrently%20i'm%20using%26nbsp%3BXS32K3X8EVB-Q289%20on%20MBDT%201.8%20and%20i'm%20trying%20the%20ADC-DMA%20example%20provided.%3C%2FP%3E%3CP%3EThe%20problem%20that%20i%20have%20is%20the%20same%20mentioned%20in%20this%20my%20previous%20ticket%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FModel-Based-Design-Toolbox-MBDT%2FADC-DMA-Example-doesn-t-work%2Fm-p%2F2117066%23M10292%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FModel-Based-Design-Toolbox-MBDT%2FADC-DMA-Example-doesn-t-work%2Fm-p%2F2117066%23M10292%3C%2FA%3E%3C%2FP%3E%3CP%3EIn%20the%20application%20operation%20I%20see%2C%20on%20freemaster%2C%20that%20ADC_POT0%20value%20is%20updated%20only%20once%20by%20the%20ADC%3A%20if%20I%20change%20the%20position%20of%20the%20potentiometer%20and%20reset%20the%20board%20the%20new%20value%20of%26nbsp%3BADC_POT0%20is%20set%2C%20but%20nomore%20update.%3C%2FP%3E%3CP%3EWhen%20i%20enter%20in%20debug%20on%20S32DS%2C%20if%20i%20set%20a%20breakpoint%20on%20Adc_StartGroupConversion%20call%20i%20could%20see%2C%20in%20the%20Expressions%20tab%2C%20that%20ADC_POT0%20changes%20its%20value%20accordigly%20with%20the%20potentiometer%20position%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202026-03-12%20170212.png%22%20style%3D%22width%3A%20661px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screenshot%202026-03-12%20170212.png%22%20style%3D%22width%3A%20661px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F379122iE4789BB11DC0D684%2Fimage-dimensions%2F661x375%3Fv%3Dv2%22%20width%3D%22661%22%20height%3D%22375%22%20role%3D%22button%22%20title%3D%22Screenshot%202026-03-12%20170212.png%22%20alt%3D%22Screenshot%202026-03-12%20170212.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EIf%20i%20let%20the%20program%20running%20without%20breakpoints%2C%20on%20freemaster%20ADC_POT0%20value%20doesn't%20update.%3C%2FP%3E%3CP%3EI%20thought%20that%20this%20behaviour%20was%20linked%20to%20freemaster%2C%20which%2C%20for%20some%20unknown%20reason%2C%20couldn't%20update%20the%20value%20of%26nbsp%3BADC_POT0%2C%20but%26nbsp%3Bif%20i%20set%20a%20breakpoint%20on%20the%20first%20line%20of%20the%20Hardware%20Interrupt%20Callback%26nbsp%3BADC_POT0%20value%20doesn't%20update%20either%20in%20debug%20mode%20doing%20some%20Resume%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202026-03-12%20170854.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screenshot%202026-03-12%20170854.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F379124i6E0A8B7CC9FB3DCE%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Screenshot%202026-03-12%20170854.png%22%20alt%3D%22Screenshot%202026-03-12%20170854.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI've%20also%20tried%20to%20add%20a%20simple%20If%20in%20simulink%20where%2C%20if%20i%20got%20an%20adc%20value%20greater%20than%2010000%2C%20flips%20the%20RGBLED0_BLUE.%20This%2C%20to%20work%20around%20the%20hypothetical%20freemaster%20problem%20but%20neither%20in%20this%20case%20worked...%20so%20freemaster%20doesn't%20cause%20the%20problem.%E2%80%83%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202026-03-12%20172136.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screenshot%202026-03-12%20172136.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F379126i4BA5590EE2A19014%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Screenshot%202026-03-12%20172136.png%22%20alt%3D%22Screenshot%202026-03-12%20172136.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI'm%20out%20of%20ideas%2C%20can%20anyone%20help%20me%20with%20this%20problem%3F%3C%2FP%3E%3CP%3EI%20attach%20the%20project%20updated.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3ESimon%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CP%3E%E2%80%83%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E