Posted on May 17, 2011 at 14:21You should use return SPIx->DR, not tmp8 return to global variable.The tmp8 global variable consumes only one byte so this is not a problem for 20KB memory. Besides if tmp8 is declared as a local variable the compiler ...
Posted on May 17, 2011 at 14:21Hi ANN; I solved the problems with the receiving. I tried to receive data through DMA which memory size was set to 8-bit while SPI data word size was set to 16-bit. This is why it didn't work. Now it seems it works cor...
Posted on May 17, 2011 at 14:21It seems i solved the problem with sending data. The data length in SPI register (DFF bit) was set to 16-bit wide. In such case DMA->CMAR memory address register should be written with a value which must be an even num...
Posted on May 17, 2011 at 14:21The following code:DMA1_Channel2->CPAR = (u32) SPI_ADDRESS; or DMA1_Channel3->CPAR = (u32) SPI_ADDRESS; is written in DMA initialization routine. SPI_ADDRESS equeals to SPI data register address (SPI_DR) To receive da...
Posted on May 17, 2011 at 14:21I've just checked different buffers as well as setting 16-bit SPI data length. It didn't help either. I don't have a logic analyzer... I also examined my SPI functions on 2 different PCBs with 2 different SD cards and...