Filling the frame buffer in external ram is very slow my embedded system

557 Views Asked by At

I am updating frame buffer in the external ram as and when I get the character codes from the UART by referring a font data base.

The frame buffer size is around 600kb and it takes around 1.5 seconds to fill it completely without using DMA. The external ram size is 8 MB .The frame buffer is in data section and hence the SDRAM controller gives it second priority compared to text section which has highest priority. The SDRAM controller is configured to operate in burst mode.

The processor I am using is OMAP 3515 operating at 200 MHz and external RAM at 133 MHz.

I am trying to find an optimal solution to fill the frame buffer of 600kb in 40 Milli seconds. Kindly assist me.

1

There are 1 best solutions below

1
On

Enable the MMU/MPU and turn on the i-cache and d-cache so that the code is not in competition with the memory movement. Use ldmia and stmia instructions to ensure that you burst lines. Allow the graphics memory to be write-bufferable. This allows the ARM to gang writes together. You may use a HSYNC or VSYNC interrupt to flush the buffers.

As per Clifford, your current algorithm may not be optimal. Ensure that source and destination are aligned to at least 32bits. What is not clear is are you simply copying memory or is the source a different pixel format, stride, etc. If you are doing intense plane calculations, then can accelerate some of the pixel unpacking operations. However, ensuring your i-cache is on will make any algorithm many times faster. If you can align your glyphs so that you do not need read-modify-write cycles to the video ram, you can get a speed up. Alternatively, you can use a shadow frame buffer that is copied whole scale to the main video ram on a VSYNC or HSYNC interrupt.

See ARM memtest for some hints on allowing the ARM to saturate the bus.