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

Can I control CSN pin as output in slave mode on nrf52840?

I think spi slave pins should set as input but I want to control CSN pin as output in spi slave mode on nrf52840. Is it possible it?

I know that CSN pin is controlled by external chip but my external chip can not control it. so I want to control it myself in nrf52840.

thanks.

  • Hello,

    The SPI protocol specification dictates the behavior of a SPI slave device, and it may not be the one controlling the slave select pin.
    The slave select pin is used by the SPI master device to initiate comunication with specific devices on a bus shared by multiple slaves - it would therefore violate the SPI specification and possibly cause lock-ups and errorous communication if a slave was to control the slave select bus.

    How many devices is sharing the SPI bus in question, and what is the design reason behind why you would like the SPI slave to controll the slave select pin?
    If you can elaborate more on the use-case / the functionality you would like to achieve I can advice you on how to implement it.

    Best regards,
    Karl

Related