I am trying to check model with basic CAN communication with using FCAN blocks, but after flashing to MCU code works only until reset. To flash code I am using USB Multilink and same flashing configuration works fine with other builds made without FCAN blocks.
My solution is using "Download code after build" option in MCU configuration block, but it works only once. Therefore, I use following steps:
1. Flash MCU via Multilink (any image)
2. Generate and build new code which uses flexcan by Simulink and MBDT with "Download code after build" setting
3. Before next build with flexcan flash MCU via Multilink
OR
To use Multilink for all test builds and use "Download code after build" option for release version.
Hello @sonik82, @Mitchell48 ,
Sorry for my delayed answer!
So, you are trying to download the generated elf directly to the board using the Multilink and when you reset the code is not workring? Or, you are trying with the RappId Bootloader and the code is not working after reset?
Regards,
Marius
Hello @mariuslucianand
In my case I try to download generated elf file using Multilink with these settings:
and after reset the code is not working.
In same time when I choose option "Download code after build" and use the RappId Bootloader, I am not facing same issue.
Best regards,
Denis
Same issue I have got with flexcan_echo_mpc5777c example model from MBD toolbox, MCU doesn't work after reset.
I guess the root cause is somewhere in code generation settings. When I selected "Download Code after build" option and used COM port to flash MCU, after reset code works fine. Then I have used elf file from this build to flash MCU again with using Multilink and code works fine again even after reset.