@mariuslucianand,I installed trial of MATLAB and NXP MDBT for MC56F83000-EVK.
But when I opened a PWM example on simulink, there are lots of errors.
And the PWM block is labelled as "???"
Even if I chose a PWM Block, it still has errors
How can I solve this issue?
Solved! Go to Solution.
Hello, @juneanthony
This problem looks like a bug on our side. Sorry for this inconvenience. To solve this issue, open the mex MCUXpresso ConfigTools file attached to the model and go to PIT configuration.
There you will see an error regarding to the timer Modulo value. Change that value to 1, as shown in the picture below.
Save this configuration file, go to Simulink, delete all files in the current folder without the mdl and mex files and then build your model again. It should build with no errors now.
Best regards,
Stefan.
hi @stefancinipeanu and @mariuslucianand its me again. the fixed for the STEP TIMER issue
that requires PIT modulo to be "1" works with the PWM center aligned example.
However when I save the work and reopen it, the code no longer builds and deploys on the hardware
Hi, @juneanthony
Could you send me your model? It looks like some data store memory variables no longer exist in your model.
Regards,
Stefan.
Update: The Failure in set_default_target(0) error disappeared after closing and reopening MATLAB and I am able to open the example.
When I try to build and deploy, this error happens.
tick_counter = (uint16_t)(STEP_TIMER_COUNTER_CLK_SOURCE_FREQ_HZ * gModelBaseRate); >undefined identifier 'STEP_TIMER_COUNTER_CLK_SOURCE_FREQ_HZ'
Hello, @juneanthony
This problem looks like a bug on our side. Sorry for this inconvenience. To solve this issue, open the mex MCUXpresso ConfigTools file attached to the model and go to PIT configuration.
There you will see an error regarding to the timer Modulo value. Change that value to 1, as shown in the picture below.
Save this configuration file, go to Simulink, delete all files in the current folder without the mdl and mex files and then build your model again. It should build with no errors now.
Best regards,
Stefan.
Thank you very much @stefancinipeanu. I hope you can give me a user manual explaining each blocks in MDBT.
I will explore more.
Unfortunately, there is no user manual for each MBDT DSC block, but when you double-click on a block, you should find a Help button which will open a MATLAB documentation for that specific block. You should find information about every parameter of that block, every input and output port and multiple examples on how to use it in simple applications. Also, keep in mind that every peripheral block was developed on the basis of MCUXpresso SDK v2.7.3 for DSC. You should find in every help documentation block which SDK API functions were used and also the link for the SDK official documentation.
Hope this helps.
Regards,
Stefan.
Hi, @juneanthony
Usually, this issue appears if the toolbox files are not included in the MATLAB path. Does this problem reproduce just for the PWM blocks or for any other NXP MBDT DSC toolbox block? Did you run the mbd_dsc_path.m script?
If you are using a MATLAB trial, You might have not access to other Add-Ons that NXP MBDT DSC relay on, for example Embedded Coder for ARM Cortex-M Processors. Even if DSC is not an ARM based target, the custom device registration is using MATLAB API that comes with the Embedded Coder for ARM Cortex-M add-on.
Regards,
Stefan.
hi @stefancinipeanu, almost all peripherals are not working. also where can i locate this mbd_dsc_path.m. I am currently asking MATLAB to also give me trial version of Embedded Coder for ARM Cortex-M add-on to make this work. I hope to use the MDBT for a SMPS project
Hi, @juneanthony
To open the NXP MBDToolbox for DSC installation folder, the simplest way is to go on Add-Ons tab -> Manage Add-Ons and it will pop-up a window with all your installed toolboxes. You should find the NXP MBDToolbox for DSC, as shown in the below picture.
Click on those 3 dots from the right side of the toolbox and then click Open Folder. Now, the current folder will be the toolbox installation foler.
Regards,
Stefan.
@stefancinipeanu , i have the matlab coder, embedded coder, simulink coder and the arm cortex-m support already installed but the same error still persists.
What seems to be missing?
Here is another error I get.
Failure in set_default_target(0) : The second argument passed to 'setTargetHardware' has an invalid value. The second argument must be 'None' or the name of a registered hardware board. To register a hardware board, install its support package.
Failure in set_default_target(0) : The second argument passed to 'setTargetHardware' has an invalid value. The second argument must be 'None' or the name of a registered hardware board. To register a hardware board, install its support package.