A91x9M0 ISP(In System Program) Uart Online Update FW

SamYang2024-02-04M0核110
  • 本篇介紹A9129M0使用 Uart串口 更新FW Code

P.S. 此功能需要在Amiccom 提供的含有bootload的Project Code 開發代碼

Uart Update Code Project 開發步驟

A.      使用 AMICCOM 提供的 project 做開發,並將程式加入此 project 內。

A9129M0_APP_Uart_OTA_20231107.zip

B.      需安裝     SOC_Uart_Update_Code APP UI

SOC_Uart_Update_Code_App.zip

C.      Complier 含有bootload的Project Code 程式,並產生出 .hex file

D.      透過 ICE Writer 先将带有bootload的Project Code烧入A9129M0(第一次需要烧入带有bootload的Project Code,后续就可以不用使用 ICE 或 Writer更新FW,而是直接使用OTA方式即可以刷新FW) 

E.       A9129M0 使用 P0.15 拉 Low 選擇進入 Update Code ,並使用 Uart0(P0.16 P0.17) 傳送接收資料。

Uart Update Code File 製作

  1. 使用"hex2bin.exe"將編譯好需要Update 的FW Hex檔轉成Bin FileTools.zip 注意:存放路徑不可以有中文字

  •         先將 Keil C Compiler 後產生出的 HEX file,透過 hex2bin.exe 產生出新的Bin File,

                1. 將hex檔放入跟hex2bin.exe相同的資料夾裡,拖曳hex檔到hex2bin.exe裡打開,將自動生成出相同名稱的.bin File

  image.png

202402041707028759728314.png

    2. 使用AMICCOM OTA Generator tool 建立 Uart Update Code bin header ,下圖為開啟 Tool 初始畫面。

圖片4.png

    3. 點選File->Open File->選取欲加入 header bin file

圖片5.png

    4. Tool 上的原件可以輸入數值。

圖片6.png

    5. 首先將 file header ( Customer version 、 Product version 、 Update Firmware version ) 輸入,其中 Update Firmware version 需符合 Update Firmware version End > Update Firmware version Start ,元件之間切換可以使用 Tab 鍵相互切換

圖片7.png

    6. 輸入 Update Block Count=1 & 輸入Block Start Address

A9129M0→產生一份 Uart Update Code Bin 檔, Start Address 0x2000 End Address 可自訂為4K 的倍數,最大為 0x1FFFF

圖片8.png

圖片9.png

    7. 按下 Generate Button->會出現另存新檔對話盒,請在檔案名稱 OTA_**** (其中****是欲輸入檔名)後輸入檔名,之後存檔。存檔後會出現完成

圖片10.png

 圖片11.png

Uart Update Code App使用說明

    1. 客戶欲 Uart Update Code Download 時,需使用 AMICCOM 提供的 "SOC_Uart_Update_Code_App.exe "在 PC 上執行程式會出現下面畫面。

圖片12.png

    2. 點選 Auto Scan 掃描連線的 Com Port ,可得到連線的 Uart Com Port 。

(P.s 將A9139M0的Uart P0.16(Rx) & P0.17(Tx)接上 PC)

圖片13.png

    3. 點選開啟要 Uart Update Code 檔案視窗。

圖片14.png

    4. 在開啟檔案視窗中選擇要 Uart Update Code 的檔案,之後點選開啟。

圖片15.png

    5. 開啟 Uart Update Code 檔案後會出現要 Uart Update Code 檔案的 Checksum ,後點選 Download Code 進行 Uart Update Code 

圖片16.png

    6. 點選 Download Code 進行 Uart Update Code 後會出現下圖顯示 Uart Update Code 過程

圖片17.png

    7. 更新完成後會出現下圖且當 P0.15 接 High 時系統會自動 Reset 執行更新後的程式。

圖片18.png

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。