MCU Boot

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决
907 次查看
JoaoQueiros
Contributor I

Hello,

I'm having an issue while trying to use the NXP MCU Boot with a MK66FX1.

I used the MK66FN2 SDK to build the bootloader (from what I understood, it should be fully compatible as memory regions are detected automatically by the bootloader).

I can use the bootloader to flash the application using both blhost and KinetisFlashTool.

I can flash the application image as many times as I want, provided that the application never actually boots. After the application boots and then going back to booloader, I get the following on blhost when trying to update the application:

Inject command 'flash-image'
Successful generic response to command 'flash-erase-region'
Wrote 51536 bytes to address 0xa000
Successful generic response to command 'write-memory'
(1/1) 1%GetOverlappedResult failed with error 31: A device attached to the system is not functioning.
Data phase write aborted by status 0x1 Failure.
Response status = 10004 (0x2714) No response packet from target device. 

I also tried without the erase command, and the new firmware gets uploaded but not written to flash, but only if I never do an erase. After any erase I can't upload anything, getting the error above.

I checked the hex file for the application and all the necessary reserved addresses are correctly (as far as I could tell) created, mainly the BCA, which is all 0xFF. The Flash Configuration parameters are set to 0xFE FF.

My application is running in HSRUN and the bootloader is running in RUN mode.

I imagine that something on the application is changing some configuration and blocking the bootloader from writing to flash, although it can erase the flash.

After the application blocked the access, I downloaded the bootloader portion of memory from the chip with a segger debugger, erased the chip and then reflashed the downloaded memory portion and the bootloader returned to working conditions. So the application is not corrupting the bootloader.

Is there any place where I can look to find the issue?

Any help would be appreciated.

 

Thank you.

 

 

0 项奖励
回复
1 解答
900 次查看
JoaoQueiros
Contributor I

Dont understand it fully, but disabling BL_FEATURE_ENABLE_FLASH_PROGRAM_SECTION  on the bootloader fixed the issue.

If anyone has any insights as to why this needs to be off, I would like also to know.

 

Thank you.

在原帖中查看解决方案

0 项奖励
回复
1 回复
901 次查看
JoaoQueiros
Contributor I

Dont understand it fully, but disabling BL_FEATURE_ENABLE_FLASH_PROGRAM_SECTION  on the bootloader fixed the issue.

If anyone has any insights as to why this needs to be off, I would like also to know.

 

Thank you.

0 项奖励
回复