GPIO as CS for SPI

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
danielm
Posts: 167
Joined: Mon Oct 05, 2015 12:24 pm

GPIO as CS for SPI

Post by danielm » Thu Nov 12, 2015 6:12 pm

Do you see any issue with using GPIOs as chip-selects for SPI devices if number of regular CS pins is not enough for my application?

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: GPIO as CS for SPI

Post by dhylands » Thu Nov 12, 2015 6:47 pm

I think it should be fine. I also think that would be a useful feature to add to the SPI driver (ability to specify a GPIO pin as a CS).

You may need to not use the builtin CS at all (or configure it as a GPIO) since the current SPI driver probably asserts it all the time.

In the meantime, you could just do it manually.

nsoatw
Posts: 15
Joined: Mon May 12, 2014 6:13 pm

Re: GPIO as CS for SPI

Post by nsoatw » Fri Nov 13, 2015 2:20 pm

I've used GPIO for SPI-CS with good results, nothing unforseen happened.

danielm
Posts: 167
Joined: Mon Oct 05, 2015 12:24 pm

Re: GPIO as CS for SPI

Post by danielm » Fri Nov 13, 2015 8:59 pm

Thank you gentlemen, that's what I was hoping for :)

Post Reply