Our Hardware
We have developed a custom PCB based around the MIMXRT1021CAG4A. There are some layout differences, but our board is similar to the RT1020 dev board (MIMXRT1020-EVK) except we use the W25Q64JVS not the IS25LP064A. We use the following hardware:
Issue
When attempting to use blhost to erase our flash chip we get the following failure:
Failing board is on the left. Working board is on the right.
More Background
My question
Why might the command flash-erase-region fail on some boards but not others?
解決済! 解決策の投稿を見る。
This turned out to be an issue with how the Secure Provisioning Tool was configured. I had selected "FlexSPI NOR/user FCB file" in the "from" pull down menu, which worked for some boards but not others (don't know why). However, when I use "FlexSPI NOR/W25Q32JV" I am able to erase and write to all boards without issue.
We are actually using the W25Q64JVS and not the W25Q32JVS, so I am not yet sure if this will be an issue. But we are at least getting off the ground. Thank you very much for the help.
This turned out to be an issue with how the Secure Provisioning Tool was configured. I had selected "FlexSPI NOR/user FCB file" in the "from" pull down menu, which worked for some boards but not others (don't know why). However, when I use "FlexSPI NOR/W25Q32JV" I am able to erase and write to all boards without issue.
We are actually using the W25Q64JVS and not the W25Q32JVS, so I am not yet sure if this will be an issue. But we are at least getting off the ground. Thank you very much for the help.
To try to convince myself that this problem is not due to a bad chip or a routing issue, I removed the flash chip from the board and dead-bugged a new one to the MCU. Still getting command failure 20106 as described above. As a sanity check I removed the flash chip completely and again tried to program the flash chip. This time I got command failure 1004.
### Erase memory before writing image ###
blhost -t 50210 -u 0x15A2,0x0073 -j -- flash-erase-region 0x60000000 21040 9
WARNING:spsdk.mboot.mcuboot:Note: memoryId is not required when accessing mapped external memory
ERROR:spsdk.mboot.interfaces.usb:Cannot read from HID device, error=0
{
"command": "flash-erase-region",
"response": [],
"status": {
"description": "10004 (0x2714) No response packet from target device.",
"value": 10004
}
}
To me this implies that our flash chip is at least able to send a response packet to the MCU, meaning that the flash chip and MCU are able to communicate. But for some reason the Secure Provisioning Tool can’t or won’t erase the flash chip.
Hi @Mike_B ,
Thanks for your patience!
SDK_2_13_0_EVK-MIMXRT1020\boards\evkmimxrt1020\driver_examples\flexspi\nor\polling_transfer
The above code totally can run in the internal RAM, not the external flash.
Please debug the above code to check the details in RAM.
Check the Link application to RAM, then code will run in internal RAM, this will help you to debug the flexSPI external flash.
Best Regards,
kerry
Hi @Mike_B
Please check the flexSPI DQS pin, GPIO_SD_B1_05, do you use it as other function or not?
This pin should leave it as float, otherwise, it will influence the flexSPI communication.
Do you also enable the QE bit?
You can test this code in your RAM at first:
SDK_2_13_0_EVK-MIMXRT1020\boards\evkmimxrt1020\driver_examples\flexspi\nor\polling_transfer
Please note, to check the QE bit position, you can check your QSPI flash datasheet find the correct QE position.
Wish it helps you!
Best Regards,
Kerry
Hi Kerry,
Thank you for the reply. Pin 26 (GPIO_SD_B1_05) is floating.
Also, we cannot execute out of the external flash. For example, I can run evkmimxrt1020_iled_blinky (that is, the LED turns off and on) when my memory configuration is as follows:
But when I try to execute evkmimxrt1020_iled_blinky with the following memory configuration:
My stack usage is hosed before the fist line of code executes:
And I get this hard fault when I try run the program:
So running code that requires use of the board flash (such as SDK_2_13_0_EVK-MIMXRT1020\boards\evkmimxrt1020\driver_examples\flexspi\nor\polling_transfer) may not be an option for me at this point.
Hi @Mike_B ,
we are in the May Day Vocation now, if you have any updated information, I will reply you after back to work from 5.4, thanks a lot for your understanding.
Best Regards,
Kerry