Hello,
I am using MBDT for s32k344.
I am trying out following example.
As per the adc configuration it is one-shot. Ideally in one shot the conversion should take place once and value should be saved in 'Channel X' variable in the model. After that even if voltage on the respective pin is changed value should not get updated like that happens in scan mode(Continuously updating the variable, as continuous conversion is happening.
But in this case on Freemaster I can see that value is continuously getting updated i.e. it is behaving like a continuous mode.
Please can you help me with this. And please explain me how to make it one-shot adc model in MATLAB.
Regards
Hi, @avinashstarkenn,
The example used has the Adc_StartGroupConversion block in the main canvas. This means that the function is called at each model step and restarts the group conversion. The group that has the Group Conversion Mode set to ONESHOT will return only one value as expected but at the next step the conversion is restarted.
Hence, the Adc_StartGroupConversion should be placed in a one-time call subsystem. Here are some examples that might help:
Cheers,
Victor