From 8e8f424922509444f0f9ac5e8dce4f4f9906c4ce Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Mon, 12 Jun 2023 21:10:27 +0200 Subject: [PATCH 1/2] boards/qn9080dk: fix periph conflict - Document which I2C/SPI/UART peripheral maps to which FLEXCONN IP block to easily detect potential overlap - Switch conflict between SPI and I2C peripheral by using a different FLEXCONN for I2C --- boards/qn9080dk/include/periph_conf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boards/qn9080dk/include/periph_conf.h b/boards/qn9080dk/include/periph_conf.h index a36ca750b8..c4896b7dcc 100644 --- a/boards/qn9080dk/include/periph_conf.h +++ b/boards/qn9080dk/include/periph_conf.h @@ -68,7 +68,7 @@ static const adc_conf_t adc_config[] = { */ static const i2c_conf_t i2c_config[] = { { - .dev = I2C1, + .dev = I2C0, /* Flexcomm 1 */ .pin_scl = GPIO_PIN(PORT_A, 6), .pin_sda = GPIO_PIN(PORT_A, 7), .speed = I2C_SPEED_FAST, @@ -105,7 +105,7 @@ static const spi_conf_t spi_config[] = { */ static const uart_conf_t uart_config[] = { { - .dev = USART0, + .dev = USART0, /* Flexcomm 0 */ .rx_pin = GPIO_PIN(PORT_A, 17), .tx_pin = GPIO_PIN(PORT_A, 16), }, From 92a891aa2ffe90eaa14ed7859566c0d40a945149 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Mon, 12 Jun 2023 21:27:56 +0200 Subject: [PATCH 2/2] boards/qn9080dk: update doc on flashing - update the doc on the internal programmer firmware: - not only switching to J-Link, but also just updating it does improve reliability of flashing - give hints in how to get the ~~shitty~~ wonderful update process working - update notes on OpenOCD requirements --- boards/qn9080dk/doc.txt | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/boards/qn9080dk/doc.txt b/boards/qn9080dk/doc.txt index ccfcae8221..e51d3c8716 100644 --- a/boards/qn9080dk/doc.txt +++ b/boards/qn9080dk/doc.txt @@ -77,15 +77,26 @@ Guide. The MMA8652 sensor has I2C address 0x1d. - ### Flashing the Board The integrated programmer by default comes with an "LPC-LINK2" firmware that provides a CMSIS DAP compatible interface. The programmer can be flashed with a Segger J-Link firmware via DFU, see the [LPCSCrypt User Guide][LPCScrypt] for -details. It seems that the J-Link firmware is indeed a bit more reliable, so -if you run into issues during debugging and/or flashing, switching to the -J-Link firmware is an option. +details. It seems that the "LPC-LINK2" firmware the board is shipped with is +unreliable. Updating that as also described in the +[LPCSCrypt User Guide][LPCScrypt] or switching to the J-Link firmware is +recommended. + +@warning The update software is quite flaky. Do not connect other USB + device providing a serial (e.g. CDC ACM) to not confuse it. You may + need to adapt the shell script to grep for the correct vid/pid pair + using hex values prefixed with `0x` when using a `dfu-util` in a + more recent version than the script expects. + +@note The Windows version of the software is at least equally frustrating. + So you may was well use the Linux variant and fix the + shell script as needed rather than spinning up a Windows VM in the + hope to safe pain in the ass. [LPCScrypt]: https://web.archive.org/web/20220225151231/https://www.nxp.com/docs/en/user-guide/LPCScrypt_User_Guide.pdf @@ -97,8 +108,10 @@ In the application directory, run: make BOARD=qn9080dk flash ``` -OpenOCD support for the QN908x flash is experimental and available as pending -[patch](https://review.openocd.org/c/openocd/+/5584). +OpenOCD support for the QN908x flash is as of June 2023 not yet part of any +release, but has been merged upstream. It is expected to be included first in +the 0.13 release of OpenOCD. Until then, compiling a version from the current +git source is the needed. #### Using the Internal Programmer with J-Link Firmware