nRF Util - 使用手冊

原文內容

🔔 nRF Util User Guide https://infocenter.nordicsemi.com/pdf/nRF_Util_v7.1.0.pdf


1. 指令


nrfutil 內建的指令

Command Description
help Show comprehensive documentation
install 下載 安裝 nrfutil 指令集
upgrade nrfutil 指令升級至最新版本
uninstall 卸除 nrfutil 指令 [aliases: remove]
prepare-offline 下載離線用的安裝包
search 顯示nrfutil可安裝的指令
list 顯示已安裝的 nrfutil 指令集
self-upgrade nrfutil 核心升級


2. 配置需求


安裝 使用nRF Util前所需要的配置軟體

    ● SEGGER J-link - 所有平台都須要,從 SEGGER J-Link Software.下戴

🆆 Windows

    ● Microsoft Visual C++ Redistributable - 從 Microsoft Visual C++ Redistributable. 下載

🅻 Linux

    ● libusb-1.0 and nRF-udev - 依下列步驟操作安裝

sudo apt install libusb-1.0-0

    下戴最新的 .deb from nRF-udev.

sudo dpkg -i nrf-udev_1.0.1-all.deb


3. nRF Util 安裝


參考 https://lungtenghsu.blogspot.com/2024/02/nrf-util.html


4.3 更新 nRF Util


確認是否有新版本

nrfutil list --outdated

版本更新

nrfutil upgrade


4.4 nRF Util 離線安裝


1. 預先透過網路下載安裝檔 (E:/nrfutil-offline 路徑自訂)

nrfutil prepare-offline E:/nrfutil-offline

2. 使用離線檔案安裝

nrfutil install device --from-offline E:/nrfutil-offline

使用新版本更新

nrfutil upgrade --from-offline E:/nrfutil-offline


5.2.1 使用SEGGER J-Link OB debugger來燒錄裝置


1. 找到連接電腦的 J-Link裝置序號

nrfutil device list --traits jlink

2. 清除IC firmware

nrfutil device erase --serial-number xxxxxxxxx

3. 燒錄新的firmware

nrfutil device program --serial-number xxxxxxxxx --firmware /path/fw.hex

4. Reset重啟裝置

nrfutil device reset --serial-number xxxxxxxxx

也可使用 --options 來達成上述1至4的步驟

nrfutil device program --serial-number xxxxxxxxx --firmware /path/fw.hex --options chip_erase_mode=ERASE_ALL,reset=RESET_SYSTEM


5.2.2 透過Nordic Secure DFU來更新nRF52840 Dongle


Nordic Secure DFU 是經由串列埠(Serial)來傳輸

燒錄的hex是須要被打包成DFU package(Zip)的,參考 Generating DFU packages

1. 列出DFU trigger 介面的裝置

nrfutil device list --traits nordicDfu


❗ 如果未顯示裝置,按壓 Reset pin讓Dongle進入 programming mode


2. 透過DFU串口寫入firmware

nrfutil device program --firmware dfu_package.zip --serial-number xxxxxxxxxxxx

完成後Dongle既進入Application mode,這動作可由 --option 來決定,參考

nrfutil device program --help


補充



DFU over Bluetooth Low Energy

nrfutil dfu ble -pkg app_dfu_package.zip -ic NRF52 -p COM3 -n "MyDevice" -f

DFU over a serial UART connection

nrfutil dfu serial -pkg app_dfu_package.zip -p COM3 -b 115200

DFU over a serial USB connection

nrfutil dfu usb-serial -pkg app_dfu_package.zip -p COM3 -b 115200


留言

2024

11-27SPI Flash 操作 (Read/Write/Erase)
11-19Rotary Encoder Switch 旋轉編碼開關
11-14Command Line Interface - CLI via UART
11-14【STM32】USB HID - Volume Control
11-13【STM32】USB Custom HID
11-12【STM32】USB HID Keyboard + Mouse
11-12【STM32】USB HID Keyboard
11-12【STM32】USB HID Mouse
10-15SSD1306 128x64 OLED 【五】Wokwi Animator
09-2432F429IDISCOVERY - - LTDC [3] + FMC (SDRAM) + FatFS
09-2432F429IDISCOVERY - - LTDC [2] + FMC (SDRAM)
09-20STM32 + FatFs + SD card via SPI【三】FatFS指令操作II
09-19STM32 + FatFs + SD card via SPI【二】FatFS指令操作
09-18STM32 + FatFs + SD card via SPI【一】移植FatFS
09-0232F429IDISCOVERY - - LTDC [1]
04-17SSD1306 128x64 OLED 【四】Adafruit / GFX Library
04-17Arduino - Serial Plotter繪圖儀
04-16SSD1306 128x64 OLED 【三】
04-15SSD1306 128x64 OLED 【二】 Datasheet
04-12SSD1306 128x64 OLED 【一】I2C版本
03-20【freeRTOS】vTaskDelay 與 vTaskDelayUntil 的差異
03-19【freeRTOS】API功能列表
03-18【freeRTOS】Day1
03-08MBR和Blank project的差別
03-05刪除註冊檔registry的資料
02-27DFU over Bluetooth Low Energy
02-27nRF Util - 使用手冊
02-26nRF Command Line Tools
02-20建立BootLoader settings
02-19Secure DFU packet (ZIP) build 建立含袐鑰的Zip檔
02-19Secure DFU via BLE
02-19Secure DFU via UART
02-16nRF Util 安裝
01-16nRF52840 ic升級成nRF52840 Dongle的程式

2023

11-21[ SEGGER Embedded Studio ] 新增header files
11-21[ SEGGER Embedded Studio ] 編譯nRF52840時遇到的問題
11-07Arduino Nano ESP32 - Debugging除錯模式
11-03Git快速入手 - 使用Git GUI
10-30Git快速入手 - 使用Git Bash
10-12程式碼高亮顯示 -- google-code-prettify

2022

11-30[EZ-PD] CCG6DF CCG6SF的Host SDK遇到編譯錯誤(一)

2019

05-27[ Eagle PCB ] 合板成品
05-23#CASE_001_USB_TOOL_RL78_G12
05-22[ Eagle PCB ] 初次洗板
05-21[ Eagle PCB ] Panelize 併板
05-20[ Eagle PCB ] 建立自己的Library及元件
05-20[ Eagle PCB ] 添加library及元件
05-20[ Eagle PCB ] Introduce

2018

04-25[ TCP test Tool ] 好用的TCP Server/Client工具
01-16RZ/A1H -[0]- Renesas RZ/A1H YR0K77210S009BE BSP環境架設

2017

12-11EZ USB Suit使用JLink online debug FX3
10-20RL78 -[12]- CS+_CACX_Lab5_LowPower mode
10-16RL78 -[11]- CS+_CACX_Lab4_ADC_溫度感測
10-13RL78 -[10]- CS+_CACX_Lab4_ADC_內部參考電壓
10-13RL78 -[9]- CS+_Lab3_I2C + MPU6050
10-13RL78 -[8]- CS+_Lab2_Uart transmit
10-12RL78 -[7]- Renesas Flash Programmer 獨立燒錄軟體
10-12RL78 -[6]- CS+_雜記
10-12RL78 -[5]- CS+_tracking variables on debug mode
10-12RL78 -[4]- CS+_顯示ROM與RAM的使用size
10-12RL78 -[3]- CS+_Lab1_Led blinking
10-12RL78 -[2]- CS+專案建立
10-12RL78 -[1]- 開發環境介紹
10-06ESP-01 -[0]- 硬體設置
10-06LinkIt 7688 program Renesas RL78/G12 by 1-wire
10-06LinkIt Smart 7688 -[3]- Build the firmware from source codes
10-06LinkIt Smart 7688 -[2]- 使用UART進入bootloader / kernel console
10-06LinkIt Smart 7688 -[1]- 使用SSH連接kernel console
10-06LinkIt Smart 7688 -[0]- 初次使用
07-14LinkIt Smart 7688 -[9]- Using MRAA SPI in Python
07-13LinkIt Smart 7688 -[8]- Using MRAA UART in Python
07-12LinkIt Smart 7688 -[7]- Using MRAA I2C in Python
07-12LinkIt Smart 7688 -[6]- Using MRAA PWM in Python
07-12LinkIt Smart 7688 -[5]- Using MRAA GPIO in Python
07-10LinkIt Smart 7688 -[4]- 雜記
06-29輕乳酪蛋糕 Cotton Cheesecake
06-26VirtualBox 的 Ubuntu與Windows 共用資料夾

2015

04-29偵測USB PnP