2018-06-20 05:12 AM
Hello,
because of my mistake I call function:
HAL_StatusTypeDef HAL_DMA_Start_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength)
with params:
HAL_DMA_Start_IT(hmmc_xy, from_addr, to_addr, 65536);The function write 0 to SxNDTR, because the register is 16bit wide. In spite of that transfer of 65536 is always performed.
How it is possible?
Setting on MCU STM32F777II,
{
.Instance = DMA2_Stream3, .Init.Channel = DMA_CHANNEL_4, .Init.Direction = DMA_PERIPH_TO_MEMORY, .Init.PeriphInc = DMA_PINC_DISABLE, .Init.MemInc = DMA_MINC_ENABLE, .Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD, .Init.MemDataAlignment = DMA_MDATAALIGN_BYTE, .Init.Mode = DMA_PFCTRL, .Init.Priority = DMA_PRIORITY_VERY_HIGH, .Init.FIFOMode = DMA_FIFOMODE_ENABLE, .Init.FIFOThreshold = DMA_FIFO_THRESHOLD_1QUARTERFULL, .Init.MemBurst = DMA_MBURST_INC4, .Init.PeriphBurst = DMA_PBURST_INC4, }#ndtr #dma #0-len