Difference between revisions of "RK Platform Upgrage Firmware USB CAN"
Yunjin.jiang (talk | contribs) |
Yunjin.jiang (talk | contribs) |
||
| Line 63: | Line 63: | ||
= '''Upgrade Firmware''' = | = '''Upgrade Firmware''' = | ||
| + | == Check IAP Mode == | ||
| + | Check whether MCU is in IAP mode.If there are nodes <code>hirawx (x=0、1、2...)</code>, MCU is in IAP mode. | ||
| + | <pre style="background:#eeeeee;border:2px solid #cccccc;padding:5px 10px;"> | ||
| + | # ls /dev/hidraw* -al | ||
| + | crw------- 1 root root 235, 0 Apr 8 05:56 /dev/hidraw0 | ||
| + | crw------- 1 root root 235, 1 Apr 8 05:56 /dev/hidraw1 | ||
| + | </pre> | ||
| + | |||
| + | == Upgrade Firmware == | ||
| + | Taking <code>SLCAN-FD0V0102.bin</code> as an example of the name of the latest version firmware. | ||
| + | <pre style="background:#eeeeee;border:2px solid #cccccc;padding:5px 10px;"> | ||
| + | # usb-flash -f SLCAN-FD0V0102.bin | ||
| + | </pre> | ||
| + | |||
| + | Enter <code>Y</code> for echo can to upgrade | ||
| + | <pre style="background:#eeeeee;border:2px solid #cccccc;padding:5px 10px;"> | ||
| + | Do you want to update firmware on this device? (Y/N)Y | ||
| + | [==================================================] 100 % | ||
| + | |||
| + | /dev/hidraw1 update successful | ||
| + | Do you want to update firmware on this device? (Y/N)Y | ||
| + | [==================================================] 100 % | ||
| + | </pre> | ||
| + | |||
| + | <div style="background:#FFEBEC;border:2px solid #cccccc;padding:5px 10px;"> | ||
| + | <span style="font-size:x-large;">'''Caution'''</span> | ||
| + | |||
| + | DO NOT cancel the process of upgrade while upgrade is going. | ||
| + | |||
| + | DO NOT power off DUT while upgrade is going. | ||
| + | </div> | ||
= '''Check Firmware''' = | = '''Check Firmware''' = | ||
Revision as of 09:19, 8 April 2025
Contents
Prepare
For Upgrade firmware, A tool named usb-flash and a new firmware are needed.
New Firmware
Ask PM for help to get the latest firmware like SLCAN-FD0V0102.bin.
Tools
usb-flash is integrated by default in version 20250408 or later.
Check usb-flash :
# usb-flash -v Advantech HID IAP Console v0.1
For early versions, download the tool from here : usb-flash
And unzip usb-flash to /usr/local/bin/ on DUT.
Firmware in DUT
Check firmware version in DUT, taking can0 for example:
# Command # /tools/test/adv/can/can_get_firmware_version.sh can0 [ OK ]: can0 Firmware Version : 0102
CAUTION
Firmware upgrades are only supported in V0102 or later versions
Enter Upgrade Mode
Stop slcan driver
# pkill slcanfd
Get Can port
Get can port ttyACMx (x=0、1、2...)
# dmesg | grep slcan [ 6.880193] can0: slcan on ttyACM0. [ 6.890344] can1: slcan on ttyACM1.
Swith MCU to IAP mode
# usb-flash -s /dev/ttyACM0 # usb-flash -s /dev/ttyACM1 # usb-flash -s /dev/ttyACM2 ... ...
Reboot DUT
Reboot DUT for upgrading.
# reboot
Upgrade Firmware
Check IAP Mode
Check whether MCU is in IAP mode.If there are nodes hirawx (x=0、1、2...), MCU is in IAP mode.
# ls /dev/hidraw* -al crw------- 1 root root 235, 0 Apr 8 05:56 /dev/hidraw0 crw------- 1 root root 235, 1 Apr 8 05:56 /dev/hidraw1
Upgrade Firmware
Taking SLCAN-FD0V0102.bin as an example of the name of the latest version firmware.
# usb-flash -f SLCAN-FD0V0102.bin
Enter Y for echo can to upgrade
Do you want to update firmware on this device? (Y/N)Y [==================================================] 100 % /dev/hidraw1 update successful Do you want to update firmware on this device? (Y/N)Y [==================================================] 100 %
Caution
DO NOT cancel the process of upgrade while upgrade is going.
DO NOT power off DUT while upgrade is going.