Hello, I currently have two SPI channels, which are lpspi0 and lpspi1. Each SPI channel has different clock polarity, phase, and transmission bit width. I have created two SPI driver configurations. What I want to know is, how can I associate the driver with the two SPI channels?
For example,::
lpspi0 → configured to communicate with spi externalDevice_0
lpspi1 → configured to communicate with spi externalDevice_1
Hi @fengba_360
The mapping between an SpiExternalDevice and an SpiPhyUnit is configured with the help of the SpiExternalDevice > SpiHwUnit parameter, as illustrated in the screenshot below:
As mentioned in the tooltip, you need to choose the CSIB parameter, from the dropdown list, according to the order in which the LPSPI instances were configured inside the SpiPhyUnit.
As per the attached screenshots, if you would like your SpiExternalDevice_0 to be associated to the LPSPI0 instance, you should select the SpiHwUnit as CSIB0, since LPSPI0 is configured as the first SpiPhyUnit. In the same logic, if you would like your SpiExternalDevice_1 to be associated to the LPSPI1 instance, you should select the SpiHwUnit as CSIB1, since LPSPI1 is configured as the second SpiPhyUnit.
BR, VaneB