MPC5744P evb use with Simulink

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

MPC5744P evb use with Simulink

Jump to solution
1,307 Views
stefan_zamfires
Contributor II

Hi,

I've been trying to get the MPC5744P board working with Matlab/Simulink 2018b and it proved challenging. Followed the MBDT user guide up to the point of flashing the rbf. First, it's a bit confusing as the bootloader folder contains the latest rbf for RevE and the other rbf files don't have a revision associated but they seem to be using different serial ports, so there will be different pins. The guide is not clear as to whether the RevE rbf is backward compatible with other board revisions.

I followed the advise of NXP support (thank you for that) and renamed the rbf I thought might work with my RevD, to mot, powered the board in boot mode, copied the file to the OpenSDA drive and the powered off the board. Now I can't exit boot mode, when I power up the board it gets into boot directly, even without pressing the boot button. Strange as I done this last week and powered up correctly after boot. Looking at the SDA_INFO.htm, it says there is no application, it can see MicroBoot Kernel version 1.10, Bootloader version 1.13 and Application 0.00.

Because it is stuck in boot, it isn't detected anymore at the COM port, so I can't even try normal flashing. It used to flash OK with S32 SDK.

Just for the record, the original problem was it wasn't flashing the rbf file, as described below - case 00297848:

"Hi, I have a devkit-mpc5744p Rev D and try to set up the toolchain for flashing the micro from Simulink. I followed the process described in Model_Based_Design_Toolbox_MPC57xx_Series_Quick_Start_Guide.pdf and encounter difficulties with setting up the bootloader. I have iniitally selected the RevE rbf file and tried to flash. I got the following error: " Program received signal SIGINT, Interrupt. 0x00f9841c in ?? () " Then I tried to flash the MPC574xP_S32DS_UART1_CAN0_OpenSDA.rbf and got the following error, similar to previous: " Program received signal SIGINT, Interrupt. 0x00f9b1e0 in ?? () " I have also tried MPC574xP_S32DS_UART1_CAN0.rbf and still no luck: " Program received signal SIGINT, Interrupt. 0x00f9b064 in ?? () " If I flash an example code from the S32 example projects, it flashes alright and the program is running, I can debug either from RAM or from flash with no problems. I tried flashing the autogen Simulink code anyway from the hello world uart example and it gets into a timeout error and aborts. Can you please advise what rbf file to flash with this Rev D of the dev kit so the board accepts Simulink code? From reading through the forum, it looks like the uart pins have changed between revisions, so maybe it's trying to flash over the wrong channel?"

Is there anyone willing to support me getting this board up and running with Simulink please?

Thank you,

Stefan

0 Kudos
1 Solution
1,293 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @stefan_zamfires ,

Let me summarize to see that I understand correctly. So you have an MPC5744P rev D. You have connected the USB cable to the board while pressing the SW4 of the board. In the BOOTLOADER disk on your computer, you have copied the .rbf file from our toolbox and since then nothing works?

Well if so, let me first explain how to use the bootloader. The OpenSDA acts both as a USB-to-Serial and as a JTAG. The bootloader that comes with our toolbox must be flashed on the controller and not on the OpenSDA. The reason for which there are multiple bootloaders is that they are configured to use different serial pins that are connected to the OpenSDA. For example on REVB and REVD the bootloader uses the PD9 and PD12 as pins so is the MPC574xP_S32DS_UART1_CAN0_OpenSDA.rbf while the REVE uses PD2 and PD3 pins so they are not compatible. And this RBF must be flashed on the controller using the S32DS for PA.

If my understanding is correct, you have to follow the next steps:

1. Register to the OpenSDA website and download the archive that contains the firmware for the OpenSDA. You have to enter the BOOTLOADER mode for the board and copy the E200_Pemicro sda.

mariuslucianand_0-1600087110113.png

2. Once the board is back to life, you have to flash the .rbf file, MPC574xP_S32DS_UART1_CAN0_OpenSDA.rbf using the S32DS for PA on the controller.

Now, if everything worked fine, you can start using the automatic deployment from the Simulink models.

Hope this helps,

Marius

 

View solution in original post

3 Replies
1,294 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @stefan_zamfires ,

Let me summarize to see that I understand correctly. So you have an MPC5744P rev D. You have connected the USB cable to the board while pressing the SW4 of the board. In the BOOTLOADER disk on your computer, you have copied the .rbf file from our toolbox and since then nothing works?

Well if so, let me first explain how to use the bootloader. The OpenSDA acts both as a USB-to-Serial and as a JTAG. The bootloader that comes with our toolbox must be flashed on the controller and not on the OpenSDA. The reason for which there are multiple bootloaders is that they are configured to use different serial pins that are connected to the OpenSDA. For example on REVB and REVD the bootloader uses the PD9 and PD12 as pins so is the MPC574xP_S32DS_UART1_CAN0_OpenSDA.rbf while the REVE uses PD2 and PD3 pins so they are not compatible. And this RBF must be flashed on the controller using the S32DS for PA.

If my understanding is correct, you have to follow the next steps:

1. Register to the OpenSDA website and download the archive that contains the firmware for the OpenSDA. You have to enter the BOOTLOADER mode for the board and copy the E200_Pemicro sda.

mariuslucianand_0-1600087110113.png

2. Once the board is back to life, you have to flash the .rbf file, MPC574xP_S32DS_UART1_CAN0_OpenSDA.rbf using the S32DS for PA on the controller.

Now, if everything worked fine, you can start using the automatic deployment from the Simulink models.

Hope this helps,

Marius

 

1,290 Views
stefan_zamfires
Contributor II

Hi Marius,

Thank you for the reply. I managed to get the board running over the weekend, sorry didn't have the chance to write right away.

I've gone through similar steps as you described above. Had to copy paste the E200 *.sda file on the MSD once in boot mode, then flash the MPC5744P with the rbf (used the same one you mentioned) with the multilink debugger from PE Micro (flashing from S32 PA didn't work for some reason).

After this, I managed to successfully download code from Simulink. 

In the process I used an external power supply and flash the micro with the USB Multilink and realised the OpenSDA micro is not powered, which was good because I could flash the main micro without having to worry about any interference from the OpenSDA.

I did have to fiddle around and try different things until I got my head around it and had it working.

Thank you very much for the support.

Stefan

1,287 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @stefan_zamfires ,

Nice work! I am glad that you have successfully managed to bring the board back to life and thank you for the detailed explanation!

Regards,

Marius

0 Kudos