SPI ISSUE

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SPI ISSUE

213 Views
chris_010
Contributor III

In my project, I use spi as slave to receive data(Interrupt mode).when I use SPI_0, every thing goes well,I can receive data normally.However when I use SPI_1 and SPI_3,I can't receive normally, but the callback shows spi data transfer end. I have checked the SPI configuration across these cases, no issues were found.What may be the cause of SPI_1 reception failure, MY code is attached.

Lpspi_Ip_AsyncTransmit(&SLAVE_EXTERNAL_DEVICE_1, Spi_0_TxSlaveBuffer, Spi_0_RxSlaveBuffer, 54, lpspi_callback_int);
Lpspi_Ip_AsyncTransmit(&SLAVE_EXTERNAL_DEVICE_2, Spi_1_TxSlaveBuffer, Spi_1_RxSlaveBuffer, 54, lpspi1_callback_int);

Spi_0_TxSlaveBuffer receive data normalyyl, but Spi_1_TxSlaveBuffer can't.

 

Tags (1)
0 Kudos
Reply
0 Replies
%3CLINGO-SUB%20id%3D%22lingo-sub-2306582%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ESPI%20ISSUE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2306582%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EIn%20my%20project%2C%20I%20use%20spi%20as%20slave%20to%20receive%20data(Interrupt%20mode).when%20I%20use%20SPI_0%2C%20every%20thing%20goes%20well%2CI%20can%20receive%20data%20normally.However%20when%20I%20use%20SPI_1%20and%20SPI_3%2CI%20can't%20receive%20normally%2C%20but%20the%20callback%20shows%20spi%20data%20transfer%20end.%3CSPAN%3E%26nbsp%3BI%20have%20checked%20the%20SPI%20configuration%20across%20these%20cases%2C%20no%20issues%20were%20found.What%20may%20be%20the%20cause%20of%20SPI_1%20reception%20failure%2C%20MY%20code%20is%20attached.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ELpspi_Ip_AsyncTransmit(%26amp%3BSLAVE_EXTERNAL_DEVICE_1%2C%20Spi_0_TxSlaveBuffer%2C%20Spi_0_RxSlaveBuffer%2C%2054%2C%20lpspi_callback_int)%3B%3CBR%20%2F%3ELpspi_Ip_AsyncTransmit(%26amp%3BSLAVE_EXTERNAL_DEVICE_2%2C%20Spi_1_TxSlaveBuffer%2C%20Spi_1_RxSlaveBuffer%2C%2054%2C%20lpspi1_callback_int)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ESpi_0_TxSlaveBuffer%20receive%20data%20normalyyl%2C%20but%26nbsp%3BSpi_1_TxSlaveBuffer%20can't.%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E