S32K144 Bootloader Example

cancel
Showing results for 
Search instead for 
Did you mean: 

S32K144 Bootloader Example

1,868 Views
bidinhol
Contributor II

Hi all,

I want to share S32K144 bootloader example (based on AN12218SW : S32K148) using S32K144EVB

This example includes :

1. Bootloader interface : Tool to download User Application to S32K144 when running bootloader

2. Bootloader_b11 : Bootloader project

3. bootloader_app_b10 :  User Application project

How to use :

I) Step 1 : to flash Bootloader (BootLoader_b10.elf) to S32K144 (through USB micro connector)

pastedImage_7.png

II) Step 2 : Bootloader will wait in 10 seconds for you click "download" user application 'bootloader_app_b10.srec' file through Serial_Bootloader_Interface.jar tool (Select Baudrate = 19200). If not, Bootloader will run forever in for-loop (user application is not downloaded into S32K144)

pastedImage_8.png pastedImage_12.png pastedImage_14.png

 

Note1 : After User Application is downloaded into S32K144, Bootloader will automatically jump to user application (RED LED and GREEN LED blink alternately)

Note2 : If you re-build User Application in User Application project, you need to modify a little srec file (bootloader_app_b10\Debug\bootloader_app_b10.srec)

pastedImage_17.png

Good luck .. ^_^

Labels (1)
11 Replies

171 Views
Kaarthi
Contributor I

Hi,

I have tried working with the bootloader code you shared. I am able to load the bootloader and the application software also working when the bootloader is in debugging mode. If i run it in normal mode, I am not able jump to application mode. I have attached the linker file of application and SREC file of app.

Regards,

kaarthi. 

0 Kudos

134 Views
Narudol-T
Contributor II

Hi @enwei 

 

it is very interesting project for flashing S32K via CAN Bus.

 

Because  I am not fluent in  chinese.

i have a question regarding the work process.

 

If i connect several boards (same bootloader) into single can bus.

 

and then I use GY8507 flashing *.S19 file into this can bus.

 

what would be the outcome? should all hardwares get same update of *.S19 or Error ?

 

 

looking forwards to your reply.

 

Best Regards,

Narudol T.

0 Kudos

109 Views
enwei
NXP Employee
NXP Employee

@Narudol-T Hi Narudol,

This CAN bus based bootloader is designed for automotive applications, on a car, each ECU has its own dedicated function with a pre-dfined CAN message ID for it bootloader link-up, so it is impossible to connect several boards (same bootloader) into single can bus at the same time.

So I'd like to know how is your use case? 

For your question, if connecting mulptiple boards with the same bootloader configuration to a single CAN bus, for my project, it should work as normal(all the boards will response with the same beat). While in a actual bootloader, a randon number will be sent by the ECU to secure communicate with the bootloader host, so they will not work as expected with bus conflict.

Best regard,

Enwei Hu.

0 Kudos

95 Views
Narudol-T
Contributor II

Hi @enwei 

 

The application is Electric Vehicle.

Since normal operation will be 112SxP NMC Li-ion, it requires at least x8pcs of MC33771B board.

So, when when want to update the Battery Cell Controller (BCC) from outside though CAN Bus.

This bootloader will come very handy.

 

And, the Firmware of each BCC is basically same, only CAN ID shall be different.

In such above practice, what should be the best practice to handle it ?

Should we need to modify the Bootloader specificly to each BCC board or commonly used ?

 

 

Looking forward to your reply.

 

Thank you,

Narudol T.

 

 

0 Kudos

88 Views
enwei
NXP Employee
NXP Employee

Hi @Narudol-T ,

 

It's up to your product requirements on balance system performance vs. reliability.

 

Best regard,

Enwei Hu.

0 Kudos

61 Views
Narudol-T
Contributor II

Hi @enwei 

 

Thank you very much.

 

BTW, if there is any other flashing tool you may recommend besides GY8507?

For example, I have VECTOR, KVASER, and PCAN usb.

Could it being used for flashing *.S19 with any specific suggestion software ?

 

Looking forward to your reply.

 

Thank you,

Narudol T.

0 Kudos

442 Views
chaitanya_kalya
Contributor III

Hello @enwei ,

 

I am not able to open your link. I am getting the below message

chaitanya_kalya_0-1609435426580.png

Can you provide another link?

 

 

0 Kudos

714 Views
liangxinyu86
Contributor I

hi ,can  you help me  ,I do this  ,but  the  app cannot  be loader .  I  donot konw  How to  edit  the  srec file ?    can you   share  youre  e-mail ?

0 Kudos

813 Views
abderrahimjamao
Contributor III

Hello, thank you for sharing your code. I have some questions, please.
1. Is  Your bootloader capable of updating the user application via a UART interface for example or not.
2. How can I make my change your application (bootloader 10) by my own application?

regards,

0 Kudos

813 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hi,

Thank you for sharing.

I would like to add the note. It is better to use some tools for SREC alignment for huge application projects.
The srec_cat tool can be used for this purpose:

Best regards,

Diana