I notice that the SPI devices on the KL25Z48M only have 1 chip select, for example, SPI0_PCS0.
I need two devices on 1 SPI device. I'm thinking that I can use two GPIO's for the two spi chip selects and leave the SPI0_PCS0 unused.
I'd just need to manually control the GPIO's before and after the SPI reads and writes.
Does that sound like a valid solution?
Is their a better way?
Don
Solved! Go to Solution.
Hi,
Yes, you can use two GPIO pins as SPI chip selects instead of the original SPI0_PCS0 pin.
Wish it helps.
Clarification;
The need is for two external slave devices attached to 1 KL15 SPI Master device.
So is the best way to do this;
In PE select 0 chip selects.
Use two manually controlled GPIO's for the two chip selects.
?
Hi,
Yes, you can use two GPIO pins as SPI chip selects instead of the original SPI0_PCS0 pin.
Wish it helps.
Thank you,
I find out that the GPIO pin goes low 9uS before the MOSI pin begins to toggle and then goes high 10uS after the MOSI pins last data bit. So the price to pay for using GPIO is ~19uS of compute time.