We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Is the HW SPI used after boot?



  • Hello,

    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?



  • I believe the HW SPI is used after boot.
    For example, if you read/write a file in /root directory, it's Flash memory file system operation.
    If you read/write a file in /tmp directory, it's RAM virtual file system operation.
    When upgrading the OS, I used to upload the system image to /tmp folder as it is super fast.

    By default, /root uses 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+


  • administrators

    HW SPI is definitely used after boot. The SPI pins cannot be used as GPIOs.
    We recommend following the GPIO documentation and datasheet.

    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.


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.