Skip to main content
12 events
when toggle format what by license comment
Feb 21, 2021 at 18:09 comment added chrismec Ok, I think I have a handle on what is going on. Upon applying power to the pi GPIO_8 (CE0) is pulled high and stays high after boot completes regardless of where overlay configures the chip selects. All I needed to do was clear the pull up on that pin after setting it as an input. Clearing the pull up before setting the mode had no effect. Am now using SPI0 with no CS and instead using that CS pin as a GPIO without overlays. Thank you all for your guidance : )
Feb 21, 2021 at 16:12 comment added joan Why are you using the overlay? pigpio does not use it. Do you have something else on the SPI bus?
Feb 21, 2021 at 15:13 comment added chrismec @joan Hmmm, I wonder what I am missing. Am fairly certain I am only using pigpio. Initializing spi with h = spiOpen(0, speed, 143); and that particular pin with gpioSetMode(8, PI_INPUT). Pin 8 as GPIO works as expected with DT overlay's moving CS to 44, 45. Pin 8 GPIO no work if cs not moved with DT overlay. Ima keep looking to see what I did wrong. I should say I'm currently testing on a rpi400 not an rpi4.
Feb 21, 2021 at 15:05 comment added chrismec @joan Hmmm, I wonder what I am missing. Am fairly certain I am only using pigpio. Initializing spi with
Feb 21, 2021 at 8:48 comment added joan @chrismec The SPI dtoverlays have no relevance to pigpio. pigpio would take no notice of them. However if you were using another kernel function to assign those GPIO it would see them as in use.
Feb 21, 2021 at 0:16 comment added chrismec I'm guessing pigpio uses the standard spi driver when not bit banging. I was not able to use CE0 as a gpio simply by setting the ux bits to 1. Changing the chip selects to IO not available on the header with dtoverlay cleared that up though. Thanks again to all yall.
Feb 20, 2021 at 22:45 comment added chrismec Awesome! Thank you very much : )
Feb 20, 2021 at 22:44 vote accept chrismec
Feb 20, 2021 at 21:38 history edited joan CC BY-SA 4.0
added 353 characters in body
Feb 20, 2021 at 19:54 comment added chrismec The stars have aligned as I'm already using PIGPIO! I'm not quite understanding the spi flag setup for ux though. Is each ux bit for the associated CE? Where first cs on main spi would be u0 and 2nd would be u1? Then for aux spi its the same but it has three cs's so u2 would be in use as well. Am I understanding that correctly?
Feb 20, 2021 at 18:55 comment added Seamus Which leads to the next question... :)
Feb 20, 2021 at 16:13 history answered joan CC BY-SA 4.0