Calculating Flash data CRC using DMA
I am currently working on calculating the FLASH CRC through DMA on the NUCLEO-H755ZI-Q development board. I've successfully read from flash and calculated the CRC using DMA in memory-to-memory.
Now, I'm facing challenges while configuring DMA for DMA_MEMORY_TO_PERIPH. I attempted to read directly from flash into the CRC register using the following call:
" HAL_DMA_Start(&hdma_dma_generator0, (uint32_t)flash_start_addr, (uint32_t)&CRC->DR, FLASH_BUFFER_SIZE); "
Is it feasible to calculate the CRC using DMA_MEMORY_TO_PERIPH? I would appreciate any suggestions or insights you might have!
Here are my current DMA configurations:
hdma_dma_generator0.Instance = DMA1_Stream0;
hdma_dma_generator0.Init.Request = DMA_REQUEST_GENERATOR0;
hdma_dma_generator0.Init.Direction = DMA_MEMORY_TO_PERIPH;
hdma_dma_generator0.Init.PeriphInc = DMA_PINC_ENABLE;
hdma_dma_generator0.Init.MemInc = DMA_MINC_ENABLE;
hdma_dma_generator0.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
hdma_dma_generator0.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
hdma_dma_generator0.Init.Mode = DMA_NORMAL;
hdma_dma_generator0.Init.Priority = DMA_PRIORITY_HIGH;
hdma_dma_generator0.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
Thank you for your help!
