Open lyusupov opened 3 years ago
Can you submit an PR for this, to be honest, this 1bit IO is not very useful. People should just use spi instead
I am not enough famliar with the library API to submit an elegant solution. That's why I rely on your discretion.
When every SPIM module of nRF52 is in use - there is no other way to operate SPI flash other than being connected to QSPI transport. nRF52 QSPI module does work independent of SPIM modules.
since Adafruit does not make any board that need this 1bit IO communication, there is no motivation for me to write such as code. If you are worried about the code, just make an PR as best as you could. I could help shaping it with review.
PS: since I don't have required hardware to verify, please make sure you test it with actual hardware when making PR.
Operating System
Linux
IDE version
Arduino 1.6+
Board
nRF52840
BSP version
1.0.0
SPIFlash Library version
Latest
Sketch
msc_external_flash.ino from Adafruit_TinyUSB_Arduino examples.
What happened ?
_Adafruit_FlashTransport_QSPINRF.cpp always uses 'hard-coded' 4-bits data R/W transfer:
regardless of the
defined in the _flashdevices.h
The _supportsqspi variable has an effect on STATUS REGISTER value, but not on the R/W COMMANDs data width.
To maintain compatibility with 1BIT data transfer mode I would suggest to initialize the nRF52 QSPI transport as follows:
then update the data transfer method if the .supports_qspi is true for flash IC been detected.
How to reproduce ?
build and run sketch listed above.
Debug Log
No response
Screenshots
No response