Hi,
i'm trying the ADC-DMA Example on S32K3X8EVB-Q289.
I've tried to configure the ADC module by myself based on the S32CT configuration given with the example ( all seems the same on S32CT).
When i download my application on the board the adc callback it's executed correctly because i've put a toggle-led block inside it and i could see the led blinking.
The problem is that it does not do the conversion....
I've also tried to import the example's configuration of the ADC and RM modules in my configuration file (.mex)... Surprisingly it converts only one time after the initialization but not continuously...
Confronting the 2 .mex file i could see that the differences seems to be some parts of the ADC module that are written in different places in the .mex files .... i don't know why....
I'd need some help to understand and fix this thing as i don't want to fall on it again in the future... I attach my model with both the files, the one created by me and the other with the mudels imported from the example...
Thanks,
Simon
Hey Simon, sounds like you’re really close — the fact that the callback is triggering and the LED is blinking means the DMA and interrupt are wired up correctly. If you're only seeing one conversion after init, it's likely that the ADC isn’t set to continuous or periodic mode.
Make sure to double-check:
The conversion trigger source — it should be set to continuous or linked to a timer trigger.
DMA configuration — it might be set to stop after one transfer unless it’s explicitly looped or retriggered.
Also look at the ADC command list settings in the .mex file. Sometimes those subtle differences can affect the behavior.
Sometimes importing configs from an example can override or misplace settings — so comparing the two .mex files is a smart move. You might also try regenerating the peripheral drivers after import to make sure nothing is stuck in a stale state.
Let us know if you find anything — happy to take a quick look at the files if you want a second pair of eyes!
Hi,
i have questions on all three points you've mentioned:
1) the conversion trigger source is SW and it's been done every 10 ms by Adc_StartGroupConversion.
2)"DMA configuration — it might be set to stop after one transfer unless it’s explicitly looped or retriggered." where i'm a able to see if DMA configuration is doing that? cause i screened all madules of the DMA example and confronted with mine .mex and there's literally no difference...
3)what do you mean with ADC command list?
It is not clear yet how is that the .mex configured by meworks differently from a .mex with imported configuration from the DMA example...
Could you please check the project attached if presents the same behavior with both .mex?
thanks,
Simon
I've found out that using the configuration imported form the example .mex, if i start the communication with my FreeMASTER project it works correctly showing me the adc output value changing while moving the potentiometer on the board...
I don't understand this behavior... could someone help?
I attach my FreeMASATER project
Thanks,
Simon