ADC DMA Example doesn't work

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

ADC DMA Example doesn't work

1,991 Views
simon98
Contributor III

Hi,

 

i'm developing a project on S32K3X8EVB-Q289 using MBDT v1.5

 

i'm trying to implement ADC with DMA and after some effort i found this ticket online:

https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/DMA-enabling-in-MBDT/m-p/1819674

 

based on this i tried to implent all the instructions that @Irina_Costachescu gave.

 

The prolem comes up when i try to build... matlab give me this error:

simon98_0-1750087663761.png

 

I don't know how to solve this problem... could someone tell me how to fix that or if i'm missing something?

 

thanks

 

Simon

 

0 Kudos
Reply
3 Replies

1,282 Views
dragostoma
NXP Employee
NXP Employee

Hi, @simon98,

The latest NXP Model-Based Design Toolbox for S32K3 version 1.8.0 includes an updated model example that uses ADC and DMA: s32k344_pwm_adc_dma_s32ct in adc folder. You can use this model as a reference for your application.

 

Hope this helps,

Dragos

0 Kudos
Reply

352 Views
simon98
Contributor III

Hi @dragostoma,

I was only now able to test the ADC with DMA example from MBDT version 1.8.

At first, I encountered the same issue: the callback was executed, but in FreeMASTER I couldn’t see the value of the variable ADC_POT0 updating (the same behavior I had in version 1.6).

After several attempts, I tried adding the following MCL blocks to check whether the DMA was actually working correctly:

2.png

To investigate further, I opened the project with S32DS 3.6. While debugging, I can see that ADC_POT0 changes according to the potentiometer position even if the MCL blocks in Simulink are commented out. However, in FreeMASTER, ADC_POT0 does not update.

Therefore, I was wondering what causes this behavior and whether it is possible to fix FreeMASTER’s behavior in some way.

Attached you will find the project I used for these tests.

I look forward to your kind feedback.

Thank you,
Simon

0 Kudos
Reply

1,946 Views
simon98
Contributor III
I've made a little step forward importing the configuration from the example provided nut i'm stil stuck with this problem:

https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/ADC-DMA-Example-doesn-t-work-with-my-S3...
0 Kudos
Reply