Flash swap with FreeRTOS

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

Flash swap with FreeRTOS

741件の閲覧回数
timothéehaugedé
Contributor I

Hello,

We implemented flash swap feature for OTA firmware update in our program. We noticed that sometimes flash swapping provoked a reboot and flash blocks were not swapped.

After many debug sessions, it appears that it's when we call FTFx_CMD_SwapControl or FLASH_Swap function while other OS tasks are running that a crash can occurs.

When enabling only 2 or 3 tasks I was not able to reproduce the issue. But with more tasks running (up to 9) it happens quite often.

Disabling interruptions before calling the swap methods resolved this issue. 

My question is why do we need to do this whereas none of the running tasks are doing flash write instructions during the call of these methods?

Is disabling interrupts during swap procedure the correct way to proceed with an rtos? 

Target is a MK26FN2M0VMD18.

SDK version 2.5.0

Regards,

Tim

ラベル(1)
0 件の賞賛
1 返信

617件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi Tim:

Since you can not reproduce this issue when enabling 2 or tasks, and can reproduce when running more than 9 tasks. I would suggest you check the stack size.

In a multitask OS, the main tasks should can continue running while new firmware is being loaded by a separate uploader/programmer task.

Regards

Daniel

0 件の賞賛