J-Flash SPI 編程工具
J-Flash SPI 允許通過 J-Link 或 Flasher 燒錄器直接編程 SPI Flash。 Flash使用 SPI 協議通過 J-Link 直接編程,中間沒有 CPU / MCU。
目錄
J-Flash SPI 允許通過 J-Link 或 Flasher 直接編程 SPI flash, flash使用 SPI 協議通過 J-Link 直接編程,中間沒有 CPU / MCU。
大多數常見的 SPI flash都可以通過其各自的 ID 自動識別,并且可以輕松編程,無需用戶對 J-Flash SPI 進行進一步的設置/配置。
J-Flash SPI 直接燒錄SPI Flash芯片界面
為了使用 J-Flash SPI,可以使用更高端的 J-Link型號(J-Link PLUS 或更高版本)的燒錄器或 Flasher in-circuit programmers。
J-Link燒錄器型號及支持的燒錄軟件
下表列出了 J-Link / Flasher 上 SPI 接口的引腳排列。
Pinout SPI 20-pin
Pin | Signal | Type | Description |
1 | VTref | Input | This is the target reference voltage. It is used to check if the target has power, to create the logic-level reference for the input comparators and to control the output logic levels to the target. It is normally fed from Vdd of the target board and must not have a series resistor. |
2 | Not connected | NC | Leave open on target side. |
3 | Not connected | NC | Leave open on target side. |
5 | DI | Output | Data-input of target SPI. Output of J-Link, used to transmit data to the target SPI. |
7 | nCS | Output | Chip-select of target SPI (active LOW). |
9 | CLK | Output | SPI clock signal. |
11 | Not connected | NC | Leave open on target side. |
13 | DO | Input | Data-out of target SPI. Input of J-Link, used to receive data from the target SPI. |
15 | nRESET | Output | Target CPU reset signal (active LOW). Typically connected to the reset pin of the target CPU, which is typically called "nRST", "nRESET" or "RESET". |
17 | Not connected | NC | Leave open on target side. |
19 | 5V-Supply | Output | This pin can be used to supply power to the target hardware. Older J-Links may not be able to supply power on this pin. |
引腳 4、6、8、10、12 是 J-Link 中連接到 GND 的 GND 引腳。 它們還應連接到目標系統中的 GND。
注:SPI接口所使用的接口與JTAG是復用的
管腳序號 | JTAG定義 | SPI定義 |
5 | TDI | MOSI |
7 | TMS | nCS |
9 | TCK | SCK |
13 | TDO | MISO |
下表列出了 quad SPI (QSPI) 接口的引腳排列。
Pinout QSPI 20-pin
Pin | Signal | Type | Description |
1 | VTref | Input | This is the target reference voltage. It is used to check if the target has power, to create the logic-level reference for the input comparators and to control the output logic levels to the target. It is normally fed from Vdd of the target board and must not have a series resistor. |
2 | Not connected | NC | Leave open on target side. |
3 | IO1 | I/O | Bi-directional data I/O pin 1 |
5 | IO0/DI | I/O | Single: Data-input of target SPI. Output of programmer, used to transmit data to the target SPI. |
7 | nCS | Output | Chip-select of target SPI (active LOW). |
9 | CLK | Output | SPI clock signal. |
11 | IO2 | I/O | Bi-directional data I/O pin 2 |
13 | DO | Input | Single: Data-out of target SPI. Input of programmer, used to receive data from the target SPI. |
15 | nRESET | Output | Target CPU reset signal (active LOW). Typically connected to the reset pin of the target CPU, which is typically called "nRST", "nRESET" or "RESET". |
17 | IO3 | I/O | Bi-directional data I/O pin 3 |
19 | 5V-Supply | Output | This pin can be used to supply power to the target hardware. Older J-Links may not be able to supply power on this pin. |
引腳 4、6、8、10、12 是 J-Link 中連接到 GND 的 GND 引腳。 它們還應連接到目標系統中的 GND。
如下圖所示為J-Link燒錄器通用轉接板。
J-Link燒錄器通用轉接板
該轉接板各接口點位定義如下圖所示。
轉接板接口點位定義
下表列出了使用J-Link燒錄器通用轉接板時 J-Link/Flasher 上 SPI 接口的引腳排列。
Pin | Signal | Type | Description |
1 | VTref | Input | This is the target reference voltage. It is used to check if the target has power, to create the logic-level reference for the input comparators and to control the output logic levels to the target. It is normally fed from Vdd of the target board and must not have a series resistor. |
4 | nRESET | Output | Target CPU reset signal. Typically connected to the RESET pin of the target CPU, which is typically called "nRST", "nRESET" or "RESET". |
5 | DI | Output | Data-input of target SPI. Output of J-Link, used to transmit data to the target SPI. |
6 | DO | Input | Data-out of target SPI. Input of J-Link, used to receive data from the target SPI. |
7 | nCS | Output | Chip-select of target SPI (active LOW). |
9 | CLK | Output | SPI clock signal. |
10 | GND | Input | Reference GND. |
引腳 3 是連接到 J-Link 中的 GND 的 GND 引腳。 它也應該連接到目標系統中的GND。
關于nRESET的注意事項:如果有另一個器件/外設也控制SPI flash(例如flash連接的CPU),J-Link的nRESET應該連接到目標系統的復位或CPU的復位引腳,確保在對 SPI flash進行編程時,J-Link 可以保持 CPU 處于復位狀態。
J-Flash SPI connection
J-Flash SPI 能夠通過芯片ID 自動檢測常見的 SPI Flash。此外,由于Flash參數(大小、指令等)也可以由用戶手動配置,因此可以支持任何 SPI Flash型號。 可在官網找到 J-Flash SPI 支持的Flash芯片列表,地址為:
https://www.segger.com/products/debug-probes/j-link/technology/cpus-and-devices/supported-spi-flashes/
J-Flash SPI 不支持 Atmel DataFlash,因為它的指令集和一般處理與任何其他 SPI 閃存明顯不同
J-Flash SPI 的命令行版本也可用于 Windows、Linux 和 macOS,命令行版本也是 J-Link 軟件和文檔包的一部分。 請注意,也可以從命令行控制 J-Flash SPI 的 GUI 版本。
命令行版本
JFlashSPI_CL.exe是JFlashSPI的命令行工具,通過輸入命令實現讀寫Flash。
-connect連接,-open打開燒寫文件,-auto燒寫,如果是燒寫,這3個命令就夠了,首先把要燒寫的文件復制到JFlashSPI_CL.exe同級目錄,輸入指令:
JFlashSPI_CL.exe -open UNIGBK.BIN 0 -connect -auto
可以將以上命令寫成一個批處理命令,直接雙擊運行即可。新建.bat文件,并以記事本方式打開,輸入以下內容:
JFlashSPI_CL.exe -open UNIGBK.BIN 0 -connect -auto
echo 程序燒寫完成!
pause
然后將這個bat文件和要燒寫的字庫文件放到一個文件夾下。雙擊直接運行就可以直接燒寫,是不是方便了許多呢?
硬件版本為V9及以上的才支持J-Flash SPI軟件。
J-Link BASE
J-Link PLUS
IS25LP064A為ISSI旗下的NOR Flash,64Mbit 。該芯片引腳定義如下:
IS25LP064A引腳定義
燒錄時,燒錄器與該芯片的連接關系如下表所示:
燒錄器管腳序號 | JTAG定義 | SPI定義 | 芯片管腳序號 | 芯片管腳定義 |
1 | VTref | VTref | 8 | Vcc |
4 | GND | GND | 4 | GND |
5 | TDI | MOSI | 5 | SI(IO0) |
7 | TMS | nCS | 1 | CE# |
9 | TCK | SCK | 6 | SCK |
13 | TDO | MISO | 2 | SO(IO1) |
此外,燒錄時該芯片的WP#(IO2)、HOLD#(IO3)管腳需要上拉至3.3V。
最近,新版本的JDK又雙叒叕發布了,目前已經JDK 14 了,從2017年8月份開始,JDK的更新頻率變成了每半年一次,將固定在每年的3月份和9月份發布新版本。
按照這個頻率,過不了多久,JDK 20 就要推出了…
最早的JDK發布于1996年,相信比很多讀者的年齡都要小,其發布頻次如下:
Java 8 與 Java 11 為當前提供支持的LTS(長期支持)版本;
2018年9月,隨著 Java 11 的發布,Java 10 自當日起不再被支持。
Oracle 于 2019 年 1 月前為商業用途中的 Java 8 長期支持,而針對非商用的更新將繼續提供,直至 2020 年 12 月;
此外,AdoptOpenJDK 也為 Java 8 提供免費更新。
針對 Java 11 的長期支持將不再由 Oracle 提供,而是改由 OpenJDK 社區的 AdoptOpenJDK 提供。
從Java第一個版本發布到現在,已經有24年了,24年中共發布了14個版本,那么,。讓我們細數一下各個版本中增加的主要特性有哪些。
第一個版本于1996年1月23日發布,叫做為Oak。而真正第一個穩定的版本JDK 1.0.2,被稱作Java 1。
從Java 8推出至今,已經很快的發展到了Java 14了,很多人做過調查,最終結果顯示都是Java 8的使用者最多。
隨便放兩個統計結果大家感受下:
從這些統計中,可以看到使用的最多的還是Java 8,其次就是Java 11。
之所以大多數人選擇Java 8和Java 11 ,是因為這兩個版本都是目前官方宣布長期支持的版本。
目前的Java 8和 Java 11 在2023年之前都會得到官方的持續支持。而剛剛在3月份發布的JDK 14,在今年的九月份之后就不再維護更新了。其他在JDK 8 之后發布的非LTS的版本的更新維護時間就是本年左右。
在JDK的官網上可以看到JDK 8的更新記錄,最近一次是2020年1月14日。
另外,在兩個長期支持的版本 JDK 8 和 JDK 11中,相比之下肯定是JDK 11 的新特性更多一些,但是并沒有真的非升不可的新特性。
一方面在JDK 8 是在JDK 7 推出三年后才推出,其中包含了很多重要的語言特性和技術升級,比如函數式編程,還有一些小改動如HashMap引入紅黑樹等。
所以JDK 8使用者比較多,另外一方面,JDK 的升級是一項耗時耗力的大工程,如果沒有足夠多的好處,很多公司和組織是不愿意大范圍升級的。
所以,可以預見,在接下來的很長一段時間中,JDK 8 將仍然是主流版本。不過值得一提的是,本次發布的JDK 14 確實增加了幾個可圈可點的新特性。
最后,新版本層出不窮,到底要不要升級?
作者認為,如果生產環境中使用的是Java 8,目前完全沒必要升級,如果要升級的話,首選Java 11;但是,作為開發者,倒是自己可以本機安裝新版的JDK,學習并了解下新特性。
SO,新版任你發,我用Java 8。
所以你正在使用的是哪個版本的JDK呢?