Because for the current project I am working on the 1020 dev board, I used all the pins and do not have enough exposed pins left with. I was aiming to connect three SPI secondary devices using demultiplexer for the chip select or (Pcs). I was wondering what would be the limitation of using such method and are there any alternative solution to this problem. Thank you!
Solved! Go to Solution.
If you pin is not enough, you can use your plan, in fact, even use the GPIO instead of the CS pin is also OK, so your external 4 by 1 demultiplexer is OK.
About the label, please check the EVK board schematic, don't just see the board directly.
https://www.nxp.com/webapp/Download?colCode=MIMXRT1020-EVK-Design-Files
Please check the schematic to find the detail pin lable.
Wish it helps you!
Best Regards
Kerry
Do you mean, you use 3 SPI devices on your side, and need 3 SPI modules, but the LPSPI_PCS pin is not enough to use in your own application?
Please give me more details about it, what's the demultiplexer you mean? Do you mean the chip can use one input and output 3 pins to connect two your 3 SPI devices?
In fact, RT1020 has a lot of CS pins, all can't be used on your side?
Best Regards,
Kerry
I have only enough pins left for SPI1 and could only use Pcs3 (I am using the pins available from J17-J20). The other pins are used for different communication protocols. My goal was to use a 4 by 1 demultiplexer to route Pcs3 to the wanted slave SPI device. Thus, I was thinking of doing this by using one of the available GPIO to connect the demultiplexer to the sel pin label to choose among different slave SPI devices instead of choosing among different Pcs. Thank you
With the dev board, I was not sure where to find the pin labels within the dev board outside of the pin label within j17 to j20.
If you pin is not enough, you can use your plan, in fact, even use the GPIO instead of the CS pin is also OK, so your external 4 by 1 demultiplexer is OK.
About the label, please check the EVK board schematic, don't just see the board directly.
https://www.nxp.com/webapp/Download?colCode=MIMXRT1020-EVK-Design-Files
Please check the schematic to find the detail pin lable.
Wish it helps you!
Best Regards
Kerry
Thank you so much. Does that mean I could use any GPIO for a chip select pin?
Of course, you also can use other RT GPIO instead of the SPI_CS hardware module pins, just before you send the SPI data, pull the GPIO low in the code to active the PCS pin, after send finished, pull GPIO high to inactive PCS pin.
So, if you still have other GPIO pins, you even don't need to use external modules.
Best Regards,
kerry