New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initializing external flash SPI speed to SPI_FLASH_MAX_BAUDRATE, instead of using driver default speed (32MHz), before probing JEDEC identifier. #7371
Conversation
…ead of using driver default speed (32MHz), before probing JEDEC identifier.
Two questions:
|
|
EDIT: Sorry, I didn't mean to imply it was the same issue. It is a separate issue that might affect you. We are not seeing a flash problem with SPIM3. It is that SPIM3 is not working at all if VBUS is not powered. See Is it possible on your board to have VBUS not powered? If so, does SPIM3 work for you in that circumstance? |
It does work yes, I just retested to be sure. Both directly after power on and after reset running only on battery and VBUS totally disconnected. I have attached a schematic for your reference (The body diode on the mosfet is drawn backwards). And this is with the fix I implemented to reduce the SPI speed during initial JEDEC probing. Otherwise it just hangs, waiting for a non FF byte to be read. Interesting note here is that it seems to be on the limit, it works with some flash memories and some fail but by reducing it to 20MHz in our case it works. |
That is interesting -- thanks! Just to confirm: R5, the zero ohm jumper between VDD and VDDH is populated on your board? Your schematic is very similar to the Feather nRF52840. I don't know why you don't see this SPIM3 problem. We saw it when trying to use SPIM3 much later, after CircuitPython starts, and as you can see from the Nordic DevZone complaints, other users are also having trouble when SPIM3 is used by user code. I or @tannewt will review this more. I just want to make sure setting the clock speed specifically as is done here is not going to affect other boards. |
Just thinking out load here. Could it be that we are only using SPI and not QSPI that allows the block to work on our boards.... |
It is possible, we're not at all sure why we don't see SPI SCK on SPIM3 when VBUS is not powered. But I'm not sure the other folks in DevZone were using QSPI at the time. Did you choose SPI instead of QSPI so you would have more pins for other uses? |
We selected SPI as we have tons of those chips =) |
It looks to me like the flash chips listed in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested on a variety of boards (SAMD, STM, RP2040, Esprsesif) to make sure this wasn't causing any issue with current boards.
We are still interested in which chip you're using that's SPI only.
On our challenger_840 boards using the 32MHz driver default SPI clock to probe the JEDEC ID fails, so I added an initialization to SPI_FLASH_MAX_BAUDRATE before the framework tries to probe for the JEDEC ID.
Also increased max speed for our board to 20MHz.