Hello,
My problem is that I fail to program external QSPI flash using J-Flash or J-Link Commander.
I have an ATSAMD51N20 MCU connected to an external QSPI flash memory in its SPI bus. The memory-mapped address of the QSPI memory starts at 0x4000000 and its size is 16MB. Once I establish connection using J-Link Commander, set SWD and its default speed, I try to issue a command loadbin <sample test.bin>,0x4000000. The size of the binary file varies from 8KB to 128KB. However, an error shows up:
J-Link>loadbin C:\Users\TEDPI-EE\test2.bin,0x4000000
Downloading file [C:\Users\TEDPI-EE\test2.bin]...
****** Error: Failed to prepare RAMCode using RAM
Error while determining flash info (Bank @ 0x04000000)
Unspecified error -1
Any clue why this is happening? I'm also seeing something like this whenever I try to use J-Flash, once I connected, selected the correct bank (external QSPI flash still). It still shows the same error (Error: Failed to prepare RAMCode using RAM/Error while determining flash info (Bank @ 0x04000000)). This happens with every command (check blank, erase, program, program/verify) I try with external flash. The curious thing though is that J-Link commander and J-Flash works well with internal flash only so far, but have never worked for external flash in my case.
With J-Flash Lite, I try to load the test binary I'd like to program, and proceed to program it. Log says it completed, but upon verifying from J-Link Commander using the mem command, the supposedly programmed binary contents were not written. I'm already suspecting that program failed with J-Flash Lite as "program device" button returned very quickly (I know that programming QSPI flash do take some noticeable time in seconds).
What's wrong here? Why is it working for internal flash but not for external QSPI flash?
Alvin
My problem is that I fail to program external QSPI flash using J-Flash or J-Link Commander.
I have an ATSAMD51N20 MCU connected to an external QSPI flash memory in its SPI bus. The memory-mapped address of the QSPI memory starts at 0x4000000 and its size is 16MB. Once I establish connection using J-Link Commander, set SWD and its default speed, I try to issue a command loadbin <sample test.bin>,0x4000000. The size of the binary file varies from 8KB to 128KB. However, an error shows up:
J-Link>loadbin C:\Users\TEDPI-EE\test2.bin,0x4000000
Downloading file [C:\Users\TEDPI-EE\test2.bin]...
****** Error: Failed to prepare RAMCode using RAM
Error while determining flash info (Bank @ 0x04000000)
Unspecified error -1
Any clue why this is happening? I'm also seeing something like this whenever I try to use J-Flash, once I connected, selected the correct bank (external QSPI flash still). It still shows the same error (Error: Failed to prepare RAMCode using RAM/Error while determining flash info (Bank @ 0x04000000)). This happens with every command (check blank, erase, program, program/verify) I try with external flash. The curious thing though is that J-Link commander and J-Flash works well with internal flash only so far, but have never worked for external flash in my case.
With J-Flash Lite, I try to load the test binary I'd like to program, and proceed to program it. Log says it completed, but upon verifying from J-Link Commander using the mem command, the supposedly programmed binary contents were not written. I'm already suspecting that program failed with J-Flash Lite as "program device" button returned very quickly (I know that programming QSPI flash do take some noticeable time in seconds).
What's wrong here? Why is it working for internal flash but not for external QSPI flash?
Alvin