I have been trying to program the flash from the USB mass storage interface in ISP mode.
I have used the following method from Linux:
dd bs=1024 conv=nocreat,notrunc if=ble_power_profiling.bin of=”/media/CRP DISABLD/firmware.bin”
After that the Bluetooth chip won't boot, and when I am using MCUXpresso IDE to download code, it fails with "Flash driver failed to initialize". The Bluetooth chip is able to enter ISP mode(Mass storage device is present), but I'm not able to flash the device using the JTAG on the DK-board.
I need help to recover from this error.
Ns: MCUXpresso RedlinkMulti Driver v10.0 (Jun 22 2017 23:34:07 - crt_emu_cm_redlink build 272)
Pc: ( 0) Reading remote configuration
Wc(03). No cache support.
Pc: ( 5) Remote configuration complete
Nc: Reconnected to existing redlink server (PID 4294967295)
Nc: Connecting to probe 1 core 0 (server PID unknown) gave 'OK'
Wc: ============= SCRIPT: RunBootRomConnect.scp =============
Wc: DpID = 2BA01477
Wc: APID = 0x24770011
Wc: Halt on reset vector catch
Wc: Halt on watchpoint read of vector table
Wc: ============= END SCRIPT ================================
Nc: Probe Firmware: LPC-LINK2 CMSIS-DAP V5.173 (NXP Semiconductors)
Nc: Serial Number: LSAVAQDQ
Nc: VID:PID: 1FC9:0090
Nc: USB Path: /dev/hidraw4
Pc: ( 30) Emulator Connected
Pc: ( 40) No Halt
Pc: ( 50) CPU ID
Nc: number of h/w breakpoints = 6
Nc: number of flash patches = 2
Nc: number of h/w watchpoints = 4
Nc: Probe(0): Connected&Reset. DpID: 2BA01477. CpuID: 410FC240. Info: <None>
Nc: Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Nc: Inspected v.2 On-chip Flash Memory QN908XC_512K.cfx
Nc: Image 'QN908XC_512KB Apr 20 2017 16:27:16'
Nc: NXP: QN908XC
Pc: ( 65) Chip Setup Complete
Nt: Connected: was_reset=true. was_stopped=false
Cr:v MCUXpresso Free License - Downloads unlimited
Pc: ( 70) License Check Complete
Nt: Loading 'qn908xcdk_wireless_examples_bluetooth_power_profiling_freertos.axf' ELF 0x00000000 len 0x114
Nc: Opening flash driver QN908XC_512K.cfx
Nc: Sending VECTRESET to run flash driver
Nc: Driver from AXF file:
Nc: 04000000: 23010020 54000045 00001032 04000000 ..#E..T2.............
Pb: (100) Writing Flash ended with an error.
Ed:05: File 'qn908xcdk_wireless_examples_bluetooth_power_profiling_freertos.axf' load failure: Ef(50): Flash driver failed to initialize
Pc: (100) Target Connection Failed
Nc: error closing down debug session - Nn(05). Wire ACK Fault in DAP access
I'm having the same issue when trying to debug the power profile example on the QN9080 Development Board. What can I do to recover the chip if I don't have a JLink debugging interface?
Hi Khanh Huynh,
The on-board debugging circuit (LPC-Link2) in the QN9080DK is capable of running a JLink debugger interface. You can refer to Appendix B - Updating Debugger firmware in the "<QN908x SDK >\docs\Getting Started with MCUXpresso SDK for QN908x.pdf" document or alternatively to section 4.4 Update debugger firmware to support J-Link/CMSIS-DAP of the QN908x Quick Start User Manual.
Hi Anders Tietze,
I believe the chip memory was left in a locked state and the CMSIS Debug adapter can't perform a mass erase to unlock the memory. Please try debugging with the JLink debugging interface. A similar window as below should appear if the memory is locked. Press Yes to perform a mass erase.
To update the debugging interface, please follow the instructions from the 7 Appendix B - Updating Debugger firmware in the "C:\NXP\SDK_2.2_QN908xCDK_Beta\docs\Getting Started with MCUXpresso SDK for QN908x.pdf" document.