K64 Flash Swap remain in unreliable state

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

K64 Flash Swap remain in unreliable state

ソリューションへジャンプ
1,687件の閲覧回数
francescosalvat
Contributor II

Hi everyone,

i'm developing an OTA updater using Flash Swap feature. I successfully implemented flash swap but when i encounter an error in downloaded firmware (i use CRC to test integrity of the file) i abort the flashing and my flash remain in UPDATE_ERASED state so when i reset and retry to flash i obtain FTFx_ERR_ACCERR.

I tried to perform a flash eraser before reset after a CRC error but i don't find any examples on how return in READY state (or another reliable state) to restart flashing from initial point.

Now i perform an erase of swap indicator sector in that way:

ret = FlashEraseSector(&flashSSDConfig, PSWAP_INDICATOR_ADDR + (P_FLASH_SIZE/2), P_SECTOR_SIZE, g_FlashLaunchCommand);
if(ret != FTFx_OK)
{
return ret;
}
ret = PFlashSwapCtl(&flashSSDConfig, PSWAP_INDICATOR_ADDR, FTFx_SWAP_SET_INDICATOR_ADDR, &currentSwapMode, &currentSwapBlock, &nextSwapBlock, g_FlashLaunchCommand);
if ((FTFx_OK != ret))
{
return ret;
}

I erase the swap indicator in upper flash section and then set swap indicators in active flash section.

Is it correct?

ラベル(1)
タグ(2)
1 解決策
1,469件の閲覧回数
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Francesco Salvatore,

I think you are facing a similar issue as the one discussed in the next thread:

MK22FN1M0VLQ12 SWAP: Return from UpErs to Ready 

The SWAP system uses a sequential state machine, not intended to move backwards (e.g. from UPDATE-ERASED to READY state).

You can stay in UPDATE-ERASED state, erase the corrupted firmware and start flashing again the correct firmware.

Please let me know if I misunderstood your situation or use-case.

Best Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

2 返答(返信)
1,470件の閲覧回数
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Francesco Salvatore,

I think you are facing a similar issue as the one discussed in the next thread:

MK22FN1M0VLQ12 SWAP: Return from UpErs to Ready 

The SWAP system uses a sequential state machine, not intended to move backwards (e.g. from UPDATE-ERASED to READY state).

You can stay in UPDATE-ERASED state, erase the corrupted firmware and start flashing again the correct firmware.

Please let me know if I misunderstood your situation or use-case.

Best Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,469件の閲覧回数
francescosalvat
Contributor II

Hi, the situation was those and i resolved doing exactly what you wrote!  Thank you!

0 件の賞賛
返信