I am using the S32K344 MBDT PSMS example for MCSPTE1AK344. I can successfully compile and deployed into the board. Based on AN13902, the RGBLED0_GREEN should stay on after application is deployed on target. But on my site, I didn't see RGBLED0_GREEN light up and cannot run successfully in FreeMaster.
I also found that the initialization block of MBDT PMSM example is different compare with AN13902.
How can make the MBDT PSMS demo run successfully? Are there any changes required to make?
Solved! Go to Solution.
Hi JiaNa,
Thank you for using the S32K344 MBDT PSMS example for MCSPTE1AK344,
Indeed there are a few updates in Model-Based Design Toolbox for S32K3xx version 1.4.0
Based on this , after flashing the S32K344 board the RGBLED0 will turn to solid Green color , and when pressing the On/Off or USER_SW0 buttons the RGBLED0_GREEN will start toggling indicating the motor is spinning.
Second, regarding the initialization block, there are also changes, the ADC config and PWM init functions have been moved to the board configurtion page, to see this, open Hardware Settings, go to Hardware Implementation - Hardware board settings - Target hardware resources - Hardware - Configure Board Initialization:
This option will open the Board Initialization window:
In the list above are the Adc_EnableCtuControlMode(AdcHwUnit_0) , Adc_EnableCtuControlMode(AdcHwUnit_1) and the Pwm_Init(&Pwm_Config) functions, each with a proper priority in order to enable the AdcHwUnit_0, AdcHwUnit_1 to be proper enabled before the PWM initialization.
There are no changes needed to be made, the updated PMSM model has been successfully tested on the MCSPTE1AK344,
I recommend a small cleanup of the PMSM folder, by deleting the old generated files, leaving the following files intact:
And you should be able to build, flash the board and run the motor using FreeMASTER with no issues:
Hope this clarifies the differences you've found in between the MBDT version 1.4.0 S32K344 PMSM model and the AN13884
Hi JiaNa,
Thank you for using the S32K344 MBDT PSMS example for MCSPTE1AK344,
Indeed there are a few updates in Model-Based Design Toolbox for S32K3xx version 1.4.0
Based on this , after flashing the S32K344 board the RGBLED0 will turn to solid Green color , and when pressing the On/Off or USER_SW0 buttons the RGBLED0_GREEN will start toggling indicating the motor is spinning.
Second, regarding the initialization block, there are also changes, the ADC config and PWM init functions have been moved to the board configurtion page, to see this, open Hardware Settings, go to Hardware Implementation - Hardware board settings - Target hardware resources - Hardware - Configure Board Initialization:
This option will open the Board Initialization window:
In the list above are the Adc_EnableCtuControlMode(AdcHwUnit_0) , Adc_EnableCtuControlMode(AdcHwUnit_1) and the Pwm_Init(&Pwm_Config) functions, each with a proper priority in order to enable the AdcHwUnit_0, AdcHwUnit_1 to be proper enabled before the PWM initialization.
There are no changes needed to be made, the updated PMSM model has been successfully tested on the MCSPTE1AK344,
I recommend a small cleanup of the PMSM folder, by deleting the old generated files, leaving the following files intact:
And you should be able to build, flash the board and run the motor using FreeMASTER with no issues:
Hope this clarifies the differences you've found in between the MBDT version 1.4.0 S32K344 PMSM model and the AN13884