the video attached explains the problem I faced while trying to program a MPC5744P Dev Kit Board (REV E1) using MATLAB Simulink 2020.
Using S32 Design Studio for Power Architecture it works for simple examples as shown in the video.
Do I miss something while uploading the model from Simulink?
Can you please tell me what Example I may try at the beginning?
Thank you in advance
I see nothing wrong with your approach that might cause the program not running as expected.
The mention I have is that you can flash the bootloader only once. In order to force the board to enter the bootloader for the newly generated code, you have to check the BAM Restart Request. This will show a popup asking you to manually reset the MPC board and then, within 5 seconds you have to press the ok button in the popup.
I've checked the model on the MPC5744P eval board and the blue led is blinking. Can you send me the generated code folder to give it a try on my end?
Hello @tl007 ,
I've tested the generated mot file on my controller and it works. The blue LED blinks as expected. You have generated the code to be written in SRAM.
The BAM selection that I was mentioned in my previous response is used only to let you know when to restart the board. So I was not expecting this to make the code work.
Since the generated code works on my end, it is very hard to debug this on your end. The next step, in this case, would be to debug the generated code on the faulty board to see where exactly the code stops. My guess is that the problem is related to the oscillator on the board or with the external clock.
I've seen in your video that you have already tried to test the board with your own code, probably a blinker developed in the S32DS with a bare-metal code in which you were writing directly the device registers. MBDT generates code on top of the S32SDK for Power but the main difference between the MBDT generated code and what you have tried is that probably you were using the internal clock.
1. Are you able to test the generated code on another board?
2. Can you please flash the generated .elf file (it's easier to select the flash target not sram) from the MBDT in exactly the same way as you've flashed the bootloader .srec file? Also, if you try this, and enter debug mode, the S32DS will show you the stack can you please show me this?
If you have the right .elf file, but it does not load on the board, it may be a boot loader setup issue.
Double check to follow the related instruction on the section "2.3 BootLoader Setup" of the doc.:
Kind Regards, Rafael
Could you please provide a short video how it works at your end with the data I provided? Using Simulink / and using the S32.
The tutorial available are all with old software versions and not similar to the actual software I use. Thank you.
Hi @tl007 ,
Can you post a photo with your front side of the MPC5744P dev board? I need to see jumpers setup. Maybe there is a problem.
Please take a look at those video recordings. You can see that the blue led is blinking with Simulink and with Design Studio too.
Hallo, here are the pictures.
I have seen in your video, that you don't have any jumper on J30. I removed the the jumper as well and was able at least to upload the program to the flash. however, no LED is blinking. I used the file attached considering the remarks of Marius.
Thank you for your support and further hints.
Hi @tl007 ,
Please flash this binary file into your mcu. This one, if it will work properly, will blink your blue led at every second and it use PIT with PLL0 with XOSC as a clock source. I'm trying to understand if your board has any problem with XOSC/PLL. Be noticed that this elf will run from RAM, so after each reset, the program won't run anymore.