nRF52840 DK "JLINK" mass storage drive not appear


從mouser買的Nordic nRF52840 DK這塊板子,下完單沒幾天就到貨了。很開心的開始試,沒想到,第一天就碰到問題了。


手冊裡p.15有提到nRF52840 DK有一個MSD功能,就是插上USB埠後,電腦上就會出現一個名稱為"JLINK"的外接磁碟, 如上圖。之後,我們只要用拖拉的方式把編好的HEX檔拖進去這個磁碟,就可以把firmware燒進去了,真是方便。在手冊p.16接著提到: 

You can also disable the MSD of the kit by using the msddisable command in J-Link Commander. To enable, use the msdenable command. These commands take effect after a power cycle of the development kit and stay this way until changed again.

意思就是在J-Link Commander裡下msddisable就可以把這個功能取消,若要回復則下msdenable指令。那個J-Link Commander可以在nRF Command Line Tools找到。安裝好後,下JLinkExe後,出現JLink>的提示符號,我下msddisable,然後斷電重開。果然就不再出現"JLINK"這個外接磁碟了。

但是用同樣方式下msdenable指令,卻沒辦法恢復MSD功能!!!!!

找了一下是否有人碰到一樣的問題,有一個帖子說沒解!不明白為何如此?
另一個帖子說是USB線的問題。

看來是沒解了,就試試換掉interface MCU firmware, 因為其他的問題似乎用這個方法是有解的。更換的方法很簡單,只要先去下載最新的interface MCU firmware (J-Link OB-SAM3U128-V2-NordicSemi 170724),然後按下IF BOOT/RESET鍵不放,再把電源關掉重開,就會在電腦上出現"BOOTLOADER"這個外接磁碟,把下載下來的firmware拖拉到這個磁碟,等其完成燒錄的動作,再關電重開就可以了。

神奇的事發生了,重開後,果然電腦就出現"JLINK"的外接磁碟了。
好了,回想一下,到底發生了什麼事,為什麼會有這個狀況呢?凶手明顯是interface MCU firmware, 因為只要換回新下載的這個版本就好了。而之前在下msddisable指令時,要先進入J-Link Commander,其實這時候自作聰明的J-Link Commander就自作主張把我們板子上原來的interface MCU firmware換掉了。

$ JLinkExe
SEGGER J-Link Commander V6.62b (Compiled Feb 17 2020 18:43:08)
DLL version V6.62b, compiled Feb 17 2020 18:42:57

Connecting to J-Link via USB...Updating firmware:  J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 21 2020 17:30:48
Replacing firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 24 2017 17:30:12
Waiting for new firmware to boot
New firmware booted successfully
O.K.
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 21 2020 17:30:48
Hardware version: V1.00
S/N: 683143106
License(s): RDI, FlashBP, FlashDL, JFlash, GDB
VTref=3.300V


Type "connect" to establish a target connection, '?' for help
J-Link>exit

其實這個時候"JLINK"外接磁碟已經消失了。而不是等到我們下msddisable指令時才消失。那也就是說,問題出在SEGGER的身上,暫時不能在nRF52840 DK這張板子上使用JLinkExe了。否則MSD就會壞掉。

2020/4/15 補註:後來我注意到用nRF Connect for Desktop連到pca10056時,會提示有新的firmware, 問是不是要更新。更新之後,再使用JlinkExe就不會被替換掉成壞的firmware了。

% JlinkExe
SEGGER J-Link Commander V6.62b (Compiled Feb 17 2020 18:40:44)
DLL version V6.62b, compiled Feb 17 2020 18:40:27

Connecting to J-Link via USB...O.K.
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00
Hardware version: V1.00
S/N: 683143106
License(s): RDI, FlashBP, FlashDL, JFlash, GDB
VTref=3.300V


Type "connect" to establish a target connection, '?' for help
J-Link>

留言

這個網誌中的熱門文章

D-BUS學習筆記

關於藍牙裝置找尋(inquiry, scan)兩三事

Cisco Switch學習筆記: EtherChannel