Hello!
Thanks for your reply.
I noticed from the documentation that 2 conditions have to be met to read directly bitmaps from flash.
1. The bitmap has to be one of the ASTC modes
2. The flash has to be set to fast mode.
Beside this, fast mode would allow me to check if it's erased (if it's back to basic, then it's erased).
So I tried to set fast mode. But without success. Here is what happens:
- Read the flash status gives me 2
- Write the command CMD_FASTFLASH returns 0, therefore I suppose it's fine. No E1_** code
- Read the flash status returns 2 (BASIC), not 3 (FAST).
Here are the scope captures.
1. For read status (that's basically a rd32 function that works everywhere else)
MOSI MISO //
30 25 F0 00 00 4A 43 42 // Flash status register (3025F0)+ extra byte, reply from MISO
00 00 00 00 02 00 00 00 // Send dummy data, get status
2. As for CMD_FLASHFAST, the documentation is a bit ambiguous.
It says: command layout
CMD_FLASHFAST // Offset = 0
result // +4
But as far as I understand SPI, the result cannot be part of the command (MOSI), it can just come from the
MISO. So I think it should be (on MOSI)
MOSI MISO
CMD_FLASHFAST dummy // Offset = 0
dummy result // +4
Similarily, the C interface should not be void cmd_flashfast(uint32 result);
but rather void cmd_flashfast(uint32 &result); or uint32 cmd_flashfast(void);
However it doesn't work, so I may be wrong.
Here is my CMD_FLASHFAST scope recording:
MOSI MISO
B0 25 78 00 4A 43 // Command register
4A FF FF FF 42 00 00 00 // CMD_FLASHFAST
00 00 00 00 00 00 00 00 // Dummy bytes on MOSI, reply on MISO
Is there anything wrong in this sequence?
Thanks,