Hello everyone,
i am having a Problem with the build command from Simulink. i am using the S32K144 Motor Control development kit and i followed the Installation procedure writen in the eviroment Setup of the PMSM Control Course but when i build the model to verify the Software and Hardware Installation Simulink just freezes without giving any error or something.
has anyone encoutered this Problem? if so please provide some Information on how to fix.
i am using matlab 2018b and 2018 R1 Toolbox.
Best Regards
Ali Terro
As luck would have it, I bricked the board today. It would not come out of bootloader mode. It wouldn't take new bootloader firmware. It wouldn't respond to the Mutlilink Universal programmer. It wouldn't respond to the Kinetis software to fix the bricking. 12V power, USB power, didn't matter. I messed with it for 3 hours, pouring over every post about a bricked device. I was finally able to get the BOOTUPDATEAPP to take, then it took the 1.19 bootloader firmware, now everything is working great on USB power and OpenSDA is programming from Simulink. Like it's fresh out of the box again. I'm so happy slash worn out.
Hello sparkee,
So are you finally able to program the EVB directly from Simulink? That would be great news to hear, knowing for how long this issue has persisted.
Kind regards,
Razvan.
I'm back to a bricked unit. It worked so well all day. I left my computer for a while and it went to sleep. When I came back, the board was no longer communicating. I unplugged and replugged and it would no longer recognize the device. I immediately started in boot mode and dragged over the BOOTUPDATEAPP file. When I cycle the plug it isn't recognized by my computer and I get 2 green LEDs and 1 red LED. No SDA drive on my computer at all. I've tried it 3 times just to be sure.
Yes everything seems to be working great on this board. I didn't do anything that we had not tried previously so I'm not sure why it works well now but I'm happy that it is. I may try again with the second board to see if I get the same results. Thank you for your support!
Hi ali.terro@knorr-bremse.com,
Your model builds correctly since the *.mot file is getting generated.
Your problem is when Simulink tries to download the *.mot file to the actual target (S32K14x EVB).
I do not know how your system is configured, but please try to copy manually the *.mot file into Mass Storage Drive mapped when you plug it the board.
Best regards,
Daniel
Hello,
I tried coppying the .mot file but it didn't work. It requires permission to edit the mass storage.
How can i solve that?
Best Regards
Ali
Hi ali.terro@knorr-bremse.com,
That seems to be an issue with your PC/System Admin.
Perhaps, your company policies prevent you from using USB connected devices on company PCs.
The best approach your be to talk with your System Administrator about this, and ask him to grant you rights to use the USB connected devices.
You can refer to: https://www.isumsoft.com/windows-10/how-to-disable-use-of-usb-storage-devices-in-windows-10.html
Hope this helps to resolve your issue.
The alternative would be to download the application over the UART, using BootLoader. This requires you to program a Boot Loader Flash Image into the MCU over JTAG first. There a couple of examples showing the procedure in the ..\S32_Examples\s32k14x\flash_bam
Best regards,
Daniel
I have a similar issue but I am able to drag the mot file over and program. When I first got the board I was able to use use the download code after build option. After a few days it started working sporadically. Sometimes I could unplug and restart Simulink and get it working and sometimes I had to plug in after Simulink had started. Nothing solid would fix it though. After reflashing the bootloader multiple times and jumping through a few other hoops I was able to get the board to take a mot file manually every time but still doesn't allow me to download code after build.
My error message is the same. Simulink locks up at the successful build line until I unplug the board. After unplug, I get the same error message and Simulink is no longer locked up.
Hello sparkee,
If you try to uncheck the Download Code after Build option from the Config Block, the Simulink still freezes? I am trying to understand if the problem is related with the code generation, building or code deployment.
Marius
No, everything runs as expected when unchecked. After successful build I can drag the mot file into the EVB drive and it programs.
Hi sparkee,
So the problem is related with the deployment, when the toolbox copies the .mot file on the selected Open SDA Drive Name. Have you selected the right Open SDA Drive Name?
Marius
I know you have to ask the dummy questions first to make sure the computer is plugged in etc but I've already been through the easy stuff in a previous thread https://community.nxp.com/thread/511465.
At one point after multiple bootloader flashes I did have a jumper that didn't make it back to the right place. I think that was what caused the 4099 error although sometimes it would still work.
If I have my EVB drive folder open, I can watch the mot file populate. No other files change. LASTSTAT says "READY”. The board has a flashing green LED (D2) but, strangely, after 5 flashes, the red LED (D1) and the RGB (D11) flash twice very quickly at the same time, then the pattern repeats.
Map,adc_pdb_trigger_s32k14x.map -o adc_pdb_trigger_s32k14x.elf ### Created executable: adc_pdb_trigger_s32k14x.mot Generating S-record... "C:\MATLAB\gcc-6.3-arm32-eabi/bin/arm-none-eabi-objcopy" -O srec adc_pdb_trigger_s32k14x.elf adc_pdb_trigger_s32k14x.mot Created S-record: adc_pdb_trigger_s32k14x.mot Building target all *** Created executable: adc_pdb_trigger_s32k14x.mot ### Successful completion of build procedure for model: adc_pdb_trigger_s32k14x
Hello sparkee,
At one point after multiple bootloader flashes I did have a jumper that didn't make it back to the right place. I think that was what caused the 4099 error although sometimes it would still work.
On the S32K144EVB there are four jumpers, that have the following functionalities. Probably the one you are referring here is the J104.
If I have my EVB drive folder open, I can watch the mot file populate. No other files change. LASTSTAT says "READY”. The board has a flashing green LED (D2) but, strangely, after 5 flashes, the red LED (D1) and the RGB (D11) flash twice very quickly at the same time, then the pattern repeats.
The led D2 is the Led Status Indicator for the OpenSDA. The actual states of the led patterns are described in the Table 2 (page 8) of this file https://www.nxp.com/docs/en/user-guide/OPENSDAUG.pdf .
I would suggest to reflash the OpenSDA Applicationas explained by the section 2.2 from the referenced document.
Hope this helps,
Marius
Nothing in the LED Status Indicator Table is similar to my LED flash so that doesn't help me. I'm attempting to reflash the bootloader despite that action having no results previously. Before attempting the reflash I was running version 1.19 firmware according to the SDAINFO.htm file. I'm using the info here since the OPENSDAUG.pdf file you referenced does not contain adequate directions to reflash.
Unfortunately, when I download the latest firmware here and program the board, I get the exact same behavior I described previously, which is not covered in the LED Table you provided.
In past efforts to fix this issue, I have attempted to flash version 1.18 firmware but that also did not fix the issue.
Error with either firmware:
COPY CATCH: The system cannot find the file specified.
: >> C:\MATLAB\Projects\Power Control Module\adc_pdb_trigger_s32k14x_mbd_rtw\adc_pdb_trigger_s32k14x.mot
Can't download the file to the board.
LASTSTAT.TXT says "READY"