SPI in 9bit. Or re-enable SPI peripheral on-the-fly.
Posted: Thu May 05, 2022 8:02 am
Hi. I need to use single SPI bus connected to two peripherals (using 2x CS IO). The issue I'm facing is one of those SPI devices requires 9bit data length on the SPI signals (its for a display). Xcore-200 device.
1. How can I reconfigure the SPI lib to send 9bits (not 8, 16 or 32) per transfer?
2. OR I could bit bang the SPI bus when communicating with the 9bit device, then I'd need to turn on/off the IO pins to the peripheral on-the-fly.
What is the process for changing the pin operation between general port (for bit bash) and peripheral? (is there a doc for this?)/
1. How can I reconfigure the SPI lib to send 9bits (not 8, 16 or 32) per transfer?
2. OR I could bit bang the SPI bus when communicating with the 9bit device, then I'd need to turn on/off the IO pins to the peripheral on-the-fly.
What is the process for changing the pin operation between general port (for bit bash) and peripheral? (is there a doc for this?)/