Skip to main content
INaka.1
Associate III
Jul 22, 2021 2:46 PM UTC
Question

Hello !!! Some strange error occured when I've tried to transfer a block data. First, Ithe processor received (by serial-DMA) 2006 bytes each time and this is repeated for 240 times resulting an array of 480,000 bytes

The processor is the STM32L4R5 and the SMT32CubeIDE versin 1.6.

uint16_t US_Cksum,Trans_Pointer,USA_Data[2006],US_Trans[480000];

uint32_t US_Pointer;

US_Pointer is zeroed at the start of the program

US_Cksum=0;// For Checksum

Trans_Pointer=4;

  while(Trans_Pointer<2004){

  US_Trans[US_Pointer]=USA_Data[Trans_Pointer];

  US_Cksum+=USA_Data[Trans_Pointer];

  US_Pointer++;

  Trans_Pointer++;

}

The question is: Why the US_Cksum doesn't generate a correct sum?

Thank you

This topic has been closed for replies.

14 replies

INaka.1
INaka.1Author
Associate III
Jul 24, 2021 12:01 PM UTC

Hello Tesla. The M.M member wrote that the DMA furnish two interrupts request: at the middle and at the end. I didn't know that!! Now, I'm reading the buffer at the second one. It is working know...( happy Saturday morning )

Thank you for your help.