STM32F767 - Problems with the SPI communication
Hi,
I started now programming the STM32F767ZI MCU and do not have any experience with 32bit uController.
I have to programm a project, which includes a SPI communication to an external ADC. It must be programmed with the LL library and I'd like to do this by DMA.
My problem is, that my programm sends out only one byte at the first frame although it is four bytes long (I checked the datalength register: 4 bytes). Additionally the last bit will not be send correctly, because the clock falls at the same time the MOSI signal falls to zero (see attachment).
The two graph shows the signals after sending two frames ('0x41' , '0x55', '0x55'). The second frame starts after the ready interrupt of the DMA.


I think, that both problems causes in the initialization:
/* Configure the 2.DMA functional parameters (write)*/
LL_DMA_SetChannelSelection(m_Param.pDMAx_TX, m_Param.u32DMAStream_TX, m_Param.u32DMAChannel_TX);
LL_DMA_ConfigTransfer(m_Param.pDMAx_TX, m_Param.u32DMAStream_TX, LL_DMA_DIRECTION_MEMORY_TO_PERIPH | LL_DMA_PRIORITY_HIGH | LL_DMA_MODE_NORMAL | LL_DMA_PERIPH_NOINCREMENT | LL_DMA_MEMORY_INCREMENT | LL_DMA_PDATAALIGN_BYTE | LL_DMA_MDATAALIGN_BYTE);
LL_DMA_ConfigAddresses(m_Param.pDMAx_TX, m_Param.u32DMAStream_TX, (uint32_t)m_Results.au8TxBuffer, LL_SPI_DMA_GetRegAddr(m_Param.pSPIx), LL_DMA_GetDataTransferDirection(m_Param.pDMAx_TX, m_Param.u32DMAStream_TX));
LL_DMA_ConfigFifo(m_Param.pDMAx_TX, m_Param.u32DMAStream_TX, LL_DMA_FIFOMODE_ENABLE, LL_DMA_FIFOTHRESHOLD_1_4);
LL_DMA_SetMemoryBurstxfer(m_Param.pDMAx_TX, m_Param.u32DMAStream_TX, LL_DMA_MBURST_SINGLE);
LL_DMA_SetPeriphBurstxfer(m_Param.pDMAx_RX, m_Param.u32DMAStream_TX, LL_DMA_PBURST_SINGLE);
LL_DMA_SetDataLength(m_Param.pDMAx_TX, m_Param.u32DMAStream_TX, 0);
// LL_DMA_DisableFifoMode(m_Param.pDMAx_RX, m_Param.u32DMAStream_TX);
/* (5) Enable DMA interrupts complete/error */
LL_DMA_EnableIT_TC(m_Param.pDMAx_RX, m_Param.u32DMAStream_RX);
LL_DMA_EnableIT_TE(m_Param.pDMAx_RX, m_Param.u32DMAStream_RX);
LL_DMA_EnableIT_TC(m_Param.pDMAx_TX, m_Param.u32DMAStream_TX);
LL_DMA_EnableIT_TE(m_Param.pDMAx_TX, m_Param.u32DMAStream_TX);
It would be very kind, if somebody would like to help me solving my problem.
