This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF52 as SPI master with Multiple Slaves

Hello, my project has 3 different devices (2 sensor and flash memory) on the same SPI bus all with their own CS. I ran across the following question, which has a response for a workaround for the NRF51. Upon jumping into the NRF52 SDK 12.2 documentation and it looks like the SPI structure has slightly changed.

Is the given solution in the previous post still applicable and if so what changes need to be made to make it work with the SDK 12.2.

If not what is the best route I need to implement 3 slaves on SPI. (GPIOTE and handle each CS individually?)

Thanks in advance

Parents
  • I have a project like that on an STM32 and it was much easier to just use software control of the CS pin with a struct that stored all the pin and port info than it was to try and use the hardware CS pin moving around.

    Ill give another vote for using parallel SPINbusses if you can swing it. Esp of not all your SPI devices are the same speed and settings. My project I also change modes and bitrates all stored in that same struct, it works great but it was annoying to write. In my case I littersally didn't have a single extra pin free though.

Reply
  • I have a project like that on an STM32 and it was much easier to just use software control of the CS pin with a struct that stored all the pin and port info than it was to try and use the hardware CS pin moving around.

    Ill give another vote for using parallel SPINbusses if you can swing it. Esp of not all your SPI devices are the same speed and settings. My project I also change modes and bitrates all stored in that same struct, it works great but it was annoying to write. In my case I littersally didn't have a single extra pin free though.

Children
No Data
Related