Quantcast
Channel: Embedded Software (Read Only)
Viewing all articles
Browse latest Browse all 25965

Forum Post: RE: SPI data transfer error, transfer stops after one byte sent

$
0
0

The "SPI data transfer error" is odd. SPI Masters usually do not care if there the slave is even there. It will just clock data out and in regardless of the existence of the slave. The exception is the ENA mode but I don't that is used here. From what I can tell, the error message is a result of the DMA failinh and counts don't decrement. No idea what the DMA would fail. A quick summary of the working and not-working settings:

//CSI_REMOTE_OM - Works [0]= {  .modalias     = "spidev",   /* OM-DL2_ATTEN, SPM-CPLD */  .mode         = SPI_MODE_3 | SPI_NO_CS,  .max_speed_hz = 2000000,  .bus_num      = 1,  .chip_select  = 0, }, u8 csi_spi1_chip_selects[] = {SPI_INTERN_CS,69,70};  //CSI_REMOTE_SPM - Doesn't work [0]= {  .modalias     = "spidev",   /* SPM-CPLD */  .mode         = SPI_MODE_0,  .max_speed_hz = 500000,  .bus_num      = 1,  .chip_select  = 0,  }, u8 csi_spi1_chip_selects[] = {SPI_INTERN_CS};

I am guessing that the working case talks to OM-DL2_ATTEN and the non-working case talks to the SPM-CPLD. Each use a different mode. The SPM will drive the CS0 line. Not sure you can say SPM should work because OM works. Maybe try OM SPI1.0 settings on the SPM. The slave won't be happy but the master side might process error free. That would indicate some weirdness in the driver or HW that cause the DMA to end early.


Viewing all articles
Browse latest Browse all 25965

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>