memcpy function caused underrun and made LCD noise of i.MX25PDK

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

memcpy function caused underrun and made LCD noise of i.MX25PDK

Jump to solution
991 Views
torus1000
Contributor V

Hi chip experts,

It seems large size of memcpy() argument 'n' cause LCD noise such as 3kB.
In fact without memcpy() didn't observe LCD noise. I assumed both buf1 and buf2 were DDR3.

#include <string.h>

  void *memcpy(void *buf1, const void *buf2, size_t n);

Is there any recommended max copy size for memcpy() for i.MX25PDK?

Thanks.

Labels (2)
Tags (2)
0 Kudos
Reply
1 Solution
857 Views
Yuri
NXP Employee
NXP Employee

   The memcpy function often provides problems with LCD flickering.

This relates to using block data transfer (ARM) instructions LDM / STM, which

are intended for efficient data transfer (between memory and registers).

In this sense these instructions may be considered as serious competitor

(regarding LCD, CSI, SDMA, USB of the i.MX25) for bus resources. 
LDM and STM access length is defined by number of registers to be copied,

And each such instructioncannot be interrupted (for ARM9).

  Perhaps it makes sense to implement own memcpy() function, where

less aggressive (with less number of registers) ARM instructions are applied.


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
1 Reply
858 Views
Yuri
NXP Employee
NXP Employee

   The memcpy function often provides problems with LCD flickering.

This relates to using block data transfer (ARM) instructions LDM / STM, which

are intended for efficient data transfer (between memory and registers).

In this sense these instructions may be considered as serious competitor

(regarding LCD, CSI, SDMA, USB of the i.MX25) for bus resources. 
LDM and STM access length is defined by number of registers to be copied,

And each such instructioncannot be interrupted (for ARM9).

  Perhaps it makes sense to implement own memcpy() function, where

less aggressive (with less number of registers) ARM instructions are applied.


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply