K8x OTA Firmware Update

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

K8x OTA Firmware Update

ソリューションへジャンプ
2,151件の閲覧回数
deniscollis
Contributor V

I'd like some ideas on how to achieve Over-The-Air Firmware Updates on the K8x family.  My board has plenty of QSPI flash and an i2c connection with a 4G LTE comms module.   The comms module can forward a binary firmware image as a packet steam, but is too under-resourced to store the entire image, or to implement a bootloader host.

For performance reasons, the K8x's main application should run from internal program flash.  

ラベル(1)
タグ(2)
1 解決策
2,000件の閲覧回数
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Question: Can MainApp change its own the Flash Configuration Field? Or do I need a RAM Function to do it?

TS: Yes, MainApp can change its own Flash configuration field.

There is an application note AN4695 about how to avoid read while write error with Flash operation.

It just required RAM function to do Flash command operation.

Wish it helps.


Have a great day,
Mike

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
2,000件の閲覧回数
deniscollis
Contributor V

The application note's a little dated.  RAM functions in MCUXpresso are much easier. The linker script should automatically be set up correctly.  All that's needed:

#include <cr_section_macros.h>

__RAM_FUNC void myRamFunction(void)
{

}‍‍‍‍‍‍‍‍‍‍‍‍
0 件の賞賛
返信
2,000件の閲覧回数
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

MUCXpresso SDK for K8x also has this function to execute Flash command in RAM:

<fsl_ftfx_cache.c> has below code:

pastedImage_1.png

pastedImage_2.png

Wish it helps.


Have a great day,
Mike

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

2,000件の閲覧回数
deniscollis
Contributor V

IDEA 1

Reserve area of QSPI XiP Flash that contains update manager application, say, "UpdateApp".

The default application "MainApp" is running and accepts file transfer from comms module.  The file, an update for MainApp, is stored at a predesignated area in QSPI Flash.  After the file transfer is complete, we change the BOOTSRC_SEL field (bits [7:6]) in the FOPT register to b10 "boot from ROM with QuadSPI configured".  (The bootFlags field in BCA should previously have been set to 0xFE "boot directly from QuadSPI".)  Now we execute a RESET.

K8x now boots UpdateApp from QSPI.  This erases internal flash, into which it then writes the updated MainApp FW from the predesignated area in QSPI flash. It resets the BOOTSRC_SET field in the FOPT register to boot from internal flash, and executes a RESET.

Question: Can MainApp change its own the Flash Configuration Field? Or do I need a RAM Function to do it?

0 件の賞賛
返信
2,001件の閲覧回数
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Question: Can MainApp change its own the Flash Configuration Field? Or do I need a RAM Function to do it?

TS: Yes, MainApp can change its own Flash configuration field.

There is an application note AN4695 about how to avoid read while write error with Flash operation.

It just required RAM function to do Flash command operation.

Wish it helps.


Have a great day,
Mike

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 件の賞賛
返信