cancel
Showing results for 
Search instead for 
Did you mean: 

DMA2D minimum width requirement?

matt-crc
Senior II

Hello,

I'm using a H743 with the DMA2D device in RegToMem mode.  Generally it seems to work for larger images, but I've been trying to fill a small rectangle (5 x 60) pixels, and I was expecting 300 write pulses.  Instead, I'm getting 480 pulses (8 x 60 pixels)???.  Is there a weird requirement that the width of the fill has to be a multiple of 8?  I don't remember seeing such a requirement in the datasheet.

thanks

Matthew

1 REPLY 1
matt-crc
Senior II

More info....

If I transfer a small image (5x1) pixels, it writes (8 x 1 pixels)  FAILED

If I transfer a small image (8x1) pixels, it writes (8 x 1 pixels)  <<< this worked

If I transfer a small image (4x1) pixels, it writes (4 x 1 pixels)  <<< this worked

If I transfer a small image (1x1) pixels, it writes (4 x 1 pixels) FAILED

If I transfer a small image (12 x 1) pixels, it writes (12 x 1 pixels)  <<< this worked

If I transfer a small image (11 x 2) pixels, it writes (14 x 2 pixels)  <<< FAILED weird result

if I transfer a small image (12 x 2) pixels, it writes (12 x 2 pixels) <<< this worked

The DMA2d hardware seems very flakey and unpredictable.  After running these tests, I thought there was a min width of 4 pixels, but the (11 x 2)  image blew that pattern.  (and yes it is repeatable).

Does anyone have any ideas?  I know the H743 has over 80 pages of errata's, if I migrate to another processor (ie the new N657), will the DMA2D work on that version of silicon?

Test code:

/*******************************************************************************
 * LCD Fill - fill rectangle with a single color
 ******************************************************************************/
void LCD_ILI9488_Fill(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint32_t color) {
	LCD_ILI9488_SetWindow(x1, y1, x2-1, y2-1);
	HAL_StatusTypeDef ret;
	if(HAL_DMA2D_Start(&hdma2d, color, 0x64000000, (x2-x1), (y2-y1)) != HAL_OK) {
		syslog(SYSLOG_ERROR, "DMA start error");
	}
	ret = HAL_DMA2D_PollForTransfer(&hdma2d, 50);
	if (ret != HAL_OK) {
		syslog(SYSLOG_ERROR, "DMA2D poll error");
		while(1);
	}