STM32F769I: DMA2D writes zeroes to memory instead of copying I am making a game console on the aforementioned board. The game is loaded from an SD card and runs in user mode. As such I have a couple of system calls which allows the game to work properly. The game in question is already done, now I am just working on scaling it, since it operates on 256x160 resolution which is fairly small to see with naked eye. I would like to scale it to 768x480, or times 3 the original resolution. As such, I have this function which should scale the content using DMA2D. The code example is down below. extern DMA2D_HandleTypeDef hdma2d;
void dma2d_scale_image(uint32_t src, uint32_t mid, uint32_t dst, uint32_t w, uint32_t h, uint8_t scaling_factor) {
uint32_t dstW = w * scaling_factor, dstH = h * scaling_factor;
/* columns */
hdma2d.Instance->FGOR = w - 1;
hdma2d.Instance->OOR = dstW - 1;
for (int i=0; i<dstW; i++) {
volatile uint32_t s = src + (i/scaling_factor) * 4;
HAL_StatusTypeDef status = HAL_DMA2D_Start(&hdma