Problem / Issue with MPC5744P MATLAB Simulink 2020 and S32 Design Studio for Power Architecture

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem / Issue with MPC5744P MATLAB Simulink 2020 and S32 Design Studio for Power Architecture

4,200 Views
tl007
Contributor III

https://www.youtube.com/embed/B5AzJlIbIRE

Dear all,

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

 

0 Kudos
11 Replies

4,189 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @tl007 

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.

mariuslucianand_0-1610457001056.png

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?

Regards,

Marius

 

0 Kudos

4,165 Views
tl007
Contributor III

Dear Marius,

thank you for your fast answer.

please find attached my generated files.

I activated the BAM restart request.

The some thing. Nothing happens.

the files are also attached. both versions .r2016 and newest .mdl 2020.

 

Regards

TL

0 Kudos

4,155 Views
mariuslucianand
NXP Employee
NXP Employee

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?

Regards,

Marius

0 Kudos

4,037 Views
tl007
Contributor III

Dear Marius,

thank you for your reply @mariuslucianand .

1. I do only have one board.

2. I flashed the generated .elf file as you can see in the video.
https://youtu.be/HtX8Tb35Acc

I after this tried the Simulink method once again. No blinking LED as you can see.

 

 

Tags (1)
0 Kudos

4,136 Views
tl007
Contributor III

I was not able to load the generated "project" from Simulink using S32

 

0 Kudos

3,993 Views
rafael_barbosa
Contributor IV

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.:
https://www.nxp.com/docs/en/quick-reference-guide/MBDT-MPC57xx_QSG.pdf

Kind Regards, Rafael

4,112 Views
rafael_barbosa
Contributor IV

4,144 Views
tl007
Contributor III

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.

0 Kudos

4,100 Views
adriantudor
NXP Employee
NXP Employee

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. 

 

Best regards,

Adrian

0 Kudos

4,045 Views
tl007
Contributor III

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.

Regards

TL

0 Kudos

4,003 Views
adriantudor
NXP Employee
NXP Employee

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.

 

Best regards,

Adrian

0 Kudos