MBDT does not generate APPKEY code for bootloader properly

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

MBDT does not generate APPKEY code for bootloader properly

685 Views
Poley
Contributor V

Hi,

I had a post on S32 page that led into this so I thought I would be a better place for this question.

I am using RAppID bootloader to flash app code using CAN. This works using this exact configuration:

Poley_0-1621966450676.png

 Which results in the following code being added to "mbd_main.c":

Poley_1-1621966537981.png

The appkey code is not included if I don't have "Download code after build" selected. I have to let it fail and then I can use the .mot to flash. 

The problem is that the "delay before start of application" option does nothing. As you can see my configuration is set up to have 50ms delay but the generated code has 5000ms/5s no matter what. Is this a bug or am I doing something wrong? I ideally want to application to start ASAP when power is applied. 

Thank you in advance!

0 Kudos
4 Replies

675 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @Poley ,

I have to investigate the reported behavior. Most likely, this can be fixed with a patch. I can provide the patch most likely in 2 weeks from now because right now, I am working on a couple of tasks that cannot be postponed.

Keep you updated,

Marius

0 Kudos

673 Views
Poley
Contributor V

2 weeks is absolutely fine! 5s delay won’t cause issues yet so no worries! 

thanks for the help, much appreciated! 

0 Kudos

635 Views
mariuslucianand
NXP Employee
NXP Employee

Helo @Poley ,

Still no news from the RAppID BL Team.

I have investigated what you reported here ( the download code check and the delay) so let's take them step by step.

1. When the Download code after build was not checked, the RAppID header was not inserted in the generated code.

To solve this, please update the attached tlc file. For that, please type in MATLAB the command 

winopen(fullfile(mbd_find_s32k_root, 'mbdtbx_s32k'))

This will open a Windows window where you have to replace the attached file.

So make sure that the Serial option is selected in the Config block, even if the option is greyd out ( first check the Serial option and then uncheck the Download code after build option).

mariuslucianand_0-1623658274436.png

 

2. For the APPDELAY, at first I thought that the MBD Toolbox is not updating the value in the generated code. But proved out that we do update the value in the generated code, so the same, I have requested some clarification from the RAppID BL team.

Hope this helps,

Marius

0 Kudos

607 Views
Poley
Contributor V

Hi @mariuslucianand 

Did you manage to find out why APPKEY delay is always 5000ms in the generated code? No matter what you have in the Simulink config block

Thanks 

0 Kudos