Hi everyone, I discovered an issue with SPI communication issues with LPC54608 today.
We consider i.MX8 as the Master SPI and LPC54608 as the Slave SPI, and the communication with CS is effective at low voltage levels. The CS pins of i.MX8 and LPC54608 are pulled up by default. When i.MX8 needs to transmit data to LPC54608 through SPI, i.MX8 will configure the CS pin to output 0.
We tried to set LPC54608’s CS pin to pull down, and surprisingly, SPI communication became possible between i.MX8 and LPC54608. However, it is puzzling that whether LPC54608’s CS pin is set to pull down or pull up, the voltage waveform of LPC54608’s CS is correct. For some unknown reason, when LPC54608’s CS pin is set to pull up, communication between i.MX8 and LPC54608 of this machine cannot be achieved.
Can it be possible if we want to set LPC54608’s CS pin to pull down, which will result in the current flowing from i.MX8 and LPC54608?
Or do you have any more reasonable suggestions for correction?
Hi,
When the SPI of LPC54606 is configured as spi slave mode, both the /CS and SCK pins of the LPC54608 are in input mode, the SPI master generates the signal to drive /CS and SCK. If the master drives the /CS in push/pull mode, it does not matter whether you configure the /CS pin of LPC65408 in pull up or down mode, it does matter when the /CS pin of LPC54608 is float. BTW, from the two pictures you gave in both /CS pull-up and down, I do not see any difference for the waveform of /CS signal.
From theory, any /CS low and SCK toggling will make the slave SPI work, but if you configure the /CS in pull-down mode, it can solve the SPI issue, it is okay.
BR
XiangJun Rong
Dear Mr. @xiangjun_rong :
Thank you for your answer.
Yes, as you said 'If the master drives the /CS in push/pull mode, it does not matter whether you configure the /CS pin of LPC65408 in pull up or down mode, it does matter when the /CS pin of LPC54608 is float.',
but out of 18000 machines, 20 of them have the problem I described.
I would like to know the reasons for this problem.
Yours sincerely,
Mega32
Hi,
Because only about 0.1% processors have the issue, I suppose your software and hardware are correct. But if pulling-down the /CS pin of LPC54608 with software configuration can solve the the issue, it is okay.
For the boards with issue, as you know that there are multiple /CS pin for the same SPI module, you can try to select the other /CS pin as an alternative.
I have no idea why pull-down /CS with software configuration can solve the issue.
BR
XiangJun Rong