User Activity

im trying to implement a firmware update via uart on stm32f042.turns out that in order to jump to system memory boot mode in mid program, i need to clear first 4 bytes of the flash (AN2606)also it turns out that it is not possible to delete only few ...
my problem is that the DMA only writes to the first address of the buffer, means that when i look on the buffer, the last byte of the message is stored in the first place of the array, and the rest of the data is overwritten.what could be the problem...