Hi everyone,
I am looking for an example project for the S32K358 to read ADC values from an arbitrary pin using the MATLAB MBDT platform. Specifically, I need an example that uses software-triggered one-shot conversion mode, with data conversion updated by an interrupt.
So far, I’ve tried:
Unfortunately, neither attempt was successful.
If anyone has a working example or guidance, I’d greatly appreciate your help!
Thanks in advance!
Hello @avenkat
Could you please share with us what errors you encountered while trying to run the MBDT application example?
As an alternative, you could also start from the s32k3xx_adc_single_read_s32ct.mdl application, which converts the Adc0Group_0, which is configured, in the associated configuration project, for SW triggered single shot conversion.
For customizing this model for S32K358, please note that you would need to change its Hardware Part parameter, as the application is configured as default for the S32K344 MCU. For a guide on how this could be achieved, please check the model's help file.
Based on this new selection, a new configuration project, targeting S32K358 will be used in conjunction with the model for ensuring an initial enablement of the on-board peripherals, pins, and clocks. After making sure that those settings are in accordance to the hardware setup that you are using, you should be able to generate code from the model, and deploy it on your evaluation board.
For more information on how to configure and use ADC with MBDT for S32K3, you could also check the following article on our NXP Community.
Please let us know if this helps,
Irina
Hi @Irina_Costachescu
I tried the same above but the model is not building and the code is not deployed to the board.
Hello @Kalcorpse
I see from your attached model screenshot, that you are using Simulink for academic use. I am not sure if your Simulink installation contains the mandatory MathWorks tools needed for being able to generate code from models, and for using MBDT. The prerequisites for using our toolbox are represented by the following MathWorks products, as described on our NXP MBDT website:
Could you please check on this? Also, based on this assumption, is this error something that you are facing when building other MBDT example applications as well?
Thanks,
Irina
HI @Irina_Costachescu
I have tried using BMS example projects and they work fine for me but the s32k3xx doesn't seem to work, I also have the necessary libraries and plugins for the examples to work.
I couldn't find 358 specific examples in the s32k3xx tried to change the board config each time, still didn't seem to work. Please help with this issue.
These are the addons
Hello @Kalcorpse
From the attached Add-Ons screenshot, I notice that you are using MBDT for BMS version 1.1.0. Our recommendation would be to install the latest available release, MBDT for BMS version 1.2.0, which officially supports MATLAB 2024b, for you to benefit of the latest available features and functionalities enabled inside the toolbox.
Could you please migrate your setup to the latest release and let us know if you still encounter the same errors?
Thanks,
Irina
Hi @Irina_Costachescu
I have tried using the latest version of the software and still it doesn't seem to work fine, it still has the same problem, do you have any alternative solution for this problem. Also, bms 1.2 wouldnt affect s32k3xx examples, right?