I have a QN9080 DK and because of some reasons, I replaced its firmware with LPCscrypt to CMSIS one. But now I cannot upload software and my codes on it and I get this error continuously:
"Target error from Commit Flash write: Ef(50): Flash driver failed to initialize"
How can I fix it? My board is useless right now.
Dear Support Team,
I have an QN9080 DK-V1.3 and I have the same problem mentioned in this topic.
When I try to debug a code I receive the "Ef(50): Flash driver failed to initialize".
I tried all the solution mentioned here but no success. I updated the debugger but when I try to erase the flash memory as mentioned above, I receive the same error.
I would be grateful if you could please help me to solve this issue.
Many thanks.
Masoud
Hello Ashkan,
When downloading a binary in ISP mode, the files require a specific format to be successfully programmed. To do this, you can use the QN908x Image Editor.
After downloading and installing it, could you please navigate to the location of your binary file and execute the following command?:
C:\NXP\QN908x-Image-Editor>QN908x_Image_Editor_v1.0.0.exe -I [original binary file name] -u
This will produce a firmware.bin file.
Then, could you please do the following?:
Could you please try loading your binary file this way?
Please let me know if you're still having problems
Best regards,
Sebastian
I did this. It is working with my program when I upload with ISP mode.but after that, I can not upload any file with MCUXpresso debugger or downloader
Hello Ashkan, I hope you're doing well,
Could you please try clicking on the Boot Debug Probe button and after that clicking on the Debug button on the Quickstart panel:
Please let me know if that works.
Best regards,
Sebastian
HiSebastian,
I got same error:
Hello Ashkan,
Could you please tell me what version of the board you're using?
Also, did you set the debug console to UART instead of Semihosting? You can set this after creating your project by clicking on the "Quick Settings" button and setting the SDK debug console to "UART console":
If that still doesn't work, could you please check these other two threads (here and here) on how to recover your QN9080 Development Kit?
Best regards,
Sebastian
Hi Sebastian,
my board version is QN9080 DK-V1.2.
Semihost or UART doesn't change any difference. both of them gave me the same error.
I used LPCScrypt Version 2.1.0_842 and download both firmware (CMSIS and JLINK). In CMSIS I received the same error and in JLINK I received this one:
Error in final launch sequence
Failed to execute MI command:
-target-select remote localhost:2331
Error message from debugger back end:
localhost:2331: No connection could be made because the target machine actively refused it.
localhost:2331: No connection could be made because the target machine actively refused it.
As I said before, it has been starting since I upload my code via ISP(and the program is working) and after that, I couldn't debug or download via MCUXpresso
Hello Ashkan,
Unfortunately, it seems like maybe your development kit got locked, and may need replacing. Could you please try submitting a Warranty Request at our website, here?
I'm really sorry for any inconveniences caused.
Best regards,
Sebastian
Hi,
Is there any way or any guide that I can fix it myself? because I have 5 boards which I want to program them via ISP. So, I think all of them would be locked after upload codes via ISP!
Hello Ashkan,
Which chip are you programming in ISP mode? Is it the internal LPC used for programming? Or the QN9080?
Is it possible for you to try using an external programmer, such as a J-Link Debugger, to program your QN9080?
Best regards,
Sebastian
Hi,
Of course, QN9080.
Yes, I can download my binary codes via J-Flash.
Hello Ashkan,
Could you please try shorting JP5 to enable the LPC4322's DFU mode?
After doing that, depending on which external debug probe you have, could you try to erase the flash (of the LPC4322) using MCUXpresso? (The option is in the Quickstart panel, on the Debug category)
Could you please show me what the log says?
Best regards,
Sebastian
Hi,
I don't know what's happened between these procedures, but after uploading via J-LINK and then shorting JP5 and erasing LPC4322, the problem is solved and everything is back to normal.
Thank you Sebastian
Hi Ashkan,
It's good to know it's working normally again, I'm glad I could help you.
Best regards,
Sebastian
I'm having exactly the same issue. After using ISP to program binary via USB cable it's impossible to use CMSIS LinkServer. The only option after that is to update to JLink probe with "Erase all flash" step.
It happened on every board I've tried so far.
Hello Ashkan, I hope you're doing well!
Have you previously programmed something to the QN9080 before this error you're having?
I you have, could you please try deleting the .launch file located in your project and clicking on the debug button again?
If that doesn’t work, please let me know.
Best regards,
Sebastian
Hi Sebatian,
I deleted .launch file and debug again. But I received the same error:
(100) Writing Flash ended with an error.
Target error from Commit Flash write: Ef(50): Flash driver failed to initialize
GDB stub (crt_emu_cm_redlink) terminating - GDB protocol problem: Pipe has been closed by GDB.
and sometimes I get this error:
(100) Writing Flash ended with an error.
File 'DACOFF_ADC.axf' load failure: Ef(50): Flash driver failed to initialize
(100) Target Connection Failed
Unable to perform operation!
Command failed with exit code 1
I don't know that it is related or not. but it starts happening after I download firmware in ISP mode and after that, I can not run or debug through MCUXoresso.
Hello Ashkan,
Could you please check the jumper configurations in the QN908x User's Guide and put them in the default positions and then try flashing again?
Also, could you please tell me which example you flashed to the QN9080?
Best regards,
Sebastian
Hi,
All jumpers are same as default board.
All programs, even "hello world" can not download or debug on my boards and gave me this error.