Is the HW SPI used after boot?
After boot, i want to disable the HW SPI and use those same HW SPI pins for a big-bang SPI since the HW SPI isnt working properly for my use.
Ive read that the HW SPI is used internally to access the flash, so those pins cant be used by anything other than the HW SPI.
However I think the flash connected to the SPI is only used during boot up to read the OpenWRT OS from the flash into RAM during boot, after that it runs from RAM.
The only time it access the flash after boot is if the program running in RAM needs to write to the overlay memory, meaning writing a file or something, which i doubt OpenWRT OS its ever doing since its file system is in RAM, unless your custom program is saving a file to a folder that is NOT /tmp, then it writes it to the flash file system.
What do you guys think? Is it possible to disable the HW SPI and use those pins for a bit-bang SPI after boot up?
DumTux last edited by
I believe the HW SPI is used after boot.
For example, if you read/write a file in
/rootdirectory, it's Flash memory file system operation.
If you read/write a file in
/tmpdirectory, it's RAM virtual file system operation.
When upgrading the OS, I used to upload the system image to
/tmpfolder as it is super fast.
/rootuses internal flash memory.
But you can mount it from an SD card, for example.
Setting Up an SDCARD for /root and swap for Onion Omega2+
Software SPI on any other GPIOs will work for you. See this post for more details.
I understand that moving to sw spi or using a different ADC will likely require a board revision on your end, but that looks to be the best way forward.