Rom Bootloader not decrypting downloaded image from Internal Flash

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Rom Bootloader not decrypting downloaded image from Internal Flash

跳至解决方案
859 次查看
sshrivastava
Contributor II

Hi All,

I'm currently working on OTAP update. I have made my BLE device as client. I'm able to communicate with my device and Mobile using IOT Toolbox app, bleota file is transferred successfully to my PCB(having KW45 microcontroller) But after download my application is not running. I can also see using J-mem in the flash that file is downloaded. After system reset Rom Bootloader tries to install the Image from the flash but Bootloader could not decrypt the downloaded image fully and stops in between(I verified by seeing the memory location). Could you please help me out to solve this issue.

One more point I would like to add, When I flash same file but in sb3 format using uart i.e. blhost -p COM8 receive-sb-file application.sb3, it flashes properly and my application is running.

 

KW45 #OTAP

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
675 次查看
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hello,

 

It is necessary to work with the matching NBU image for the SDK version of the application you are working with. This means that when you download your SDK, prior to loading any wireless SDK example, update your NBU image with the provided binaries in the following folder of the SDK.

If you are using a custom board, with your own keys, you also need to march the NBU version and the SDK application you took as a base.

 

Regards,

Ricardo

在原帖中查看解决方案

7 回复数
828 次查看
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hello,

 

Hope you are doing well. Could you please clarify what SDK version are you using? Are you using the otap_client example as a base?

 

What is the procedure you are following?

 

Best Regards,

Ricardo

0 项奖励
回复
818 次查看
sshrivastava
Contributor II

Hi,

I'm uisng SDK verison 2.12.7, I have integrated otap_client example to my project using application developers guide. Bluethooth connection works fine for us, I can see my device in the NXP toolbox application, I can download whole application into the mentioned flash location.

For generating new signed image, I have used Over the air Programming application, I'm using old root certificates files (generated by using SPSDK python files, OEM keys and certificate, for your reference please refer to attached image) which we have generated to burn the fuses at the time of flashing BLE firmware provided by NXP.

sshrivastava_0-1720076613637.png

sshrivastava_1-1720076673219.png

 

I have also found FW update status in OTACFG register, it is returning 0x4412d283 at location 0x02006020, it indicates failure to process sb3 file or failure to erase/write update status to OTACFG page. 

sshrivastava_2-1720077113643.png

sshrivastava_3-1720077129863.png

 

Thanks & Regards

SShrivastava

 

 

0 项奖励
回复
797 次查看
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hello,

 

Could you please clarify the steps followed using the Over the air Programming application?

 

Did you follow the Over The Air Programming User Guide?

 

Regards,

Ricardo

0 项奖励
回复
780 次查看
sshrivastava
Contributor II

Hi, below are the steps:

  1. Selected OTA protocol as OTAP Bluetooth LE
  2. Processor kw45
  3. Select the bin/s19 file, selected application core
  4. Used the encryption key described in sb3kdk.txt
  5. I have used JSON file configurator as described in below image
  6. sshrivastava_1-1720164250124.png

     

  7. Replaced our keys in Keys_and_certs folder
  8. I have used below configuration for JSON for creating sb3 container
  9. sshrivastava_2-1720164712339.png

     

  10. After this two windows pop out that shows authentication key and encryption keys.
  11. After that I save generated sb3 file as binary in bleota format and this file I use to transfer via bluetooth. 

NOTE: I have also used ISK option in JSON configuration, but it didn't change anything.

0 项奖励
回复
767 次查看
sshrivastava
Contributor II

Hi, I'm facing one more issue, I have sdk SDK_2_12_7_KW45B41Z82xxxA and we found out new ble controller binary kw45b41_nbu_ble_1_9_12_3.xip file, I have generated the sb3 file out of it because I'm using our own pcb and keys and certs, I can successfully flash generated sb3 via blhost utility, but when I flash application code through MCuxpresso debugger, application code is going to fault state, please refer the below image

sshrivastava_0-1720186666844.png

and when I revert to old sb3 file(this was also generated a year ago using this kw45b41_nbu_ble_1_9_10_0.xip verison), this fault is not coming, code runs fine.

0 项奖励
回复
676 次查看
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hello,

 

It is necessary to work with the matching NBU image for the SDK version of the application you are working with. This means that when you download your SDK, prior to loading any wireless SDK example, update your NBU image with the provided binaries in the following folder of the SDK.

If you are using a custom board, with your own keys, you also need to march the NBU version and the SDK application you took as a base.

 

Regards,

Ricardo

610 次查看
sshrivastava
Contributor II
Thank you, after updating NBU image and new sdk framework and driver, OTAP works fine now.
0 项奖励
回复