Octo-SPI external Flash - when i write to memory, when read after writing i get 0xFF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-29 1:06 AM
Hi, i have some issues with writing to external flash memory. Read status register etc works wel. Just writing to external memory gives me unexpected result.
I use the following MCU: STM32L4P5ZGT6P, I use the following external flash memory: Macronix MX25L12833FMI-10G. Instead of using the complet octo-SPI, i use quad-spi,since my external flash only supports quad-spi and Single SPI. i SDR mode.
See attachement for the code(i have extrated the code from my program, all the necessary can be seen in the attachement).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-29 1:07 AM
My code in a .txt format.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-29 6:16 PM
Tried to skim the code, bit overly cluttered
Setting SR.QE (0x40) enables the 4-pin physical operation, not the command / address.
I think you need to use 0x35 to switch into 4-bit command mode,or you can use the move verbose forms ie 1-1-4 or 1-4-4
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-30 1:01 AM
The function OctalWriteEnable makes use of the 0x35 command. So i use it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-30 3:55 AM
One could potentially spend hours picking this apart. Would suggest adding instrumentation to catalogue the command and data level interactions. Would be easier and faster than attaching a logic analyzer and wading through the traces.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-30 4:35 AM
"One could potentially spend hours picking this apart." Yes, indeed you right. What do you mean with "instrumentation"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-30 5:48 AM
>>instrumentation?
Output information about what's happening internally, so you can understand what's happening without a debugger, and without single-stepping everything.
You can add whatever level of detail you need to understand they dynamic interactions, ie dump the command, addressing details, the responses, the time it takes for the device to come ready, etc.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-31 5:45 AM
Hello @FLuba.1,
Could you please provide more context. Did you succeed to start the erasing sequence?
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
