Hi NXP team and fellow members,
I have recently ordered MPC5744P DevKit and received the Rev E DevKit. I tried to compile and download the code from Simulink model-based toolbox example by following the quick start guide which came with the MBD toolbox. I have flash some example promgramme in mbd tool,such as “gpio_mpc574x","rw_register_mpc574x", but the LEDs only turn the green led on and off very quickly , the result is not like what the programmes describe.
Could you kindly guide me to solve this problem?
Thanks.
Yes,it's the D7 RGB LED.
Hello m15871781742@163.com,
The RGB led is directly controlled by the MCU so this means that it is up an running.
Were you able to flash the RappId Bootloader on the board? Is the program sending you the mot to the flash?
Just for testing the generated code, you can flash the generated elf/mot on the board using S32DS, and after that flash the bootloader again to be able to download it directly from simulink.
Hope this helps,
Marius
Hello Marius,
Thanks for your reply, I have tried what you told me.
I can flash the Bootloader(MPC574xP_S32DS_UART0_CAN0_OpenSDA_RevE.rbf) on the board.I can see the process (Earsing - APP0%-APP100%) when i download the generated code directly from simulink.
Then i flash the generated elf file on the board using S32DS and the result is same with download the generated code directly from simulink.
I think the promble might be the generated code , because i have tired another code writted in S32DS , and the RGB LED can work correctly.
Now, i still don't know where the problem is.
Hello Marius,
Thanks for your reply, I have tried what you told me.
I can flash the Bootloader(MPC574xP_S32DS_UART0_CAN0_OpenSDA_RevE.rbf) on the board.I can see the process (Earsing - APP0%-APP100%) when i download the generated code directly from simulink.
Then i flash the generated elf file on the board using S32DS and the result is same with download the generated code directly from simulink.
I think the promble might be the generated code , because i have tired another code writted in S32DS , and the RGB LED can work correctly.
Now, i still don't know where the problem is.
Hello m15871781742@163.com,
because i have tired another code writted in S32DS , and the RGB LED can work correctly.
What code have you tried? It was using the external or the internal oscillator for clock source?
I am asking this because lately I found a board when it looks like the external clock was not working. The MBDT is using the external clock in order to run the core at maximum 200MHz.
Please import the pit_periodic_interrupt_mpc5744p SDK example to see if the board is running well. This example is using the external clock oscillator.
The attached image shows where to find the example that I am referring to.
Waiting for your response,
Marius
Hello m15871781742@163.com,
My apologies! From the first message I understand that the generated code is not running at all on your board, so you can ignore my previous message.
The code and the model you sent me seems to have the correct settings and the code seems to be generated correctly.
I also generated and tested the model that you mentioned and the description looks to be correct: SW1 toggles the RED LED while the SW2 enables or disable the SW1 interrupt. I also attached the mot file generated so we can test on the same mot file.
Marius
Hello Marius,
Thanks for your reply. I have tried the elf file and mot file that you provided. The result is different with before. The RGB LED toggles the Green LED, and looks like unstable(flash too fast).When i press the SW1 or SW2 ,the RGB LED did not change,the color is still green.
I unzip the two files and put them in the Desktop. Then i flash the elf file using S32DS software.The result was describled as above. Then i flash the mot file using S32DS software.The result was the same.
SHAO Jianbo