Hello NXP Community,
I have an LPSPI device driver I'm developing for an S32K344 with the MBDT toolbox 1.3.0.
I completed the design of a single LSPI channel with no issues.
However, when I attempt to instantiate a 2nd driver on a separate LSPI unit, I cannot get the Configuration Tool (1.6) to map to the proper SpiPhyUnit.
I assign a single SpiJob to a SpiSequence and SpiExternalDevice.
All Job's will run on whatever I define as SpiPhyUnit[0].
Looking over all of the generated source, I do not see how the device gets assigned to a SpiPhyUnit…
I have screenshots of my configuration below…
Any help is greatly appreciated!
Scott
Solved! Go to Solution.
Hi Scott,
The mapping between an SpiExternalDevice and an SpiPhyUnit is configured with the help of the SpiHwUnit setting, which can be found inside the SpiExternalDevice tab, as illustrated in the screenshot below:
As mentioned in the SpiHwUnit setting tooltip, you should choose the CSIB parameter, from the dropdown list, according to the order in which the LPSPI instances were configured inside the SpiPhyUnit tab.
Based on your attached screenshots, if you would like your SpiExternalDevice_0 to be associated to the LPSPI2 instance, you should select the SpiHwUnit as CSIB0, since LPSPI2 is configured as the first SpiPhyUnit.
From the attached LPSPI3.jpg, I see that SpiExternalDevice_1 has the SpiHwUnit set on CSIB0 as well. Under this configuration, it means that the SpiExternalDevice_1 is also associated to the LPSPI2 instance, and not to a different one.
Hence, 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.
Hope this helps,
Irina
Hi Scott,
The mapping between an SpiExternalDevice and an SpiPhyUnit is configured with the help of the SpiHwUnit setting, which can be found inside the SpiExternalDevice tab, as illustrated in the screenshot below:
As mentioned in the SpiHwUnit setting tooltip, you should choose the CSIB parameter, from the dropdown list, according to the order in which the LPSPI instances were configured inside the SpiPhyUnit tab.
Based on your attached screenshots, if you would like your SpiExternalDevice_0 to be associated to the LPSPI2 instance, you should select the SpiHwUnit as CSIB0, since LPSPI2 is configured as the first SpiPhyUnit.
From the attached LPSPI3.jpg, I see that SpiExternalDevice_1 has the SpiHwUnit set on CSIB0 as well. Under this configuration, it means that the SpiExternalDevice_1 is also associated to the LPSPI2 instance, and not to a different one.
Hence, 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.
Hope this helps,
Irina