C166; RAM slower than ROM

Hi all,

This problem has been on hold for a while but a collegue of mine is looking at it again:
Our app is running from flash but we want to run it from RAM (in case we would have performance issues). RAM has less wait states. What we see on the scope is that the code is -slower- when running from RAM.

We copy all code to RAM in the startup file and then change the ADDRSEL registers to have RAM in the bottom memory -> jump to main. It's running fine...only slower.

I'm not even sure what to ask but does anybody have a clue what could cause this? I suspect something with the PEC transfer we use to update our display...or something with DPP access.

The strange thing is that when we use -2- BUSCON registers/chipselects to access the RAM (1 for the DATA part, 1 for the CONST/CODE part) it does work faster than ROM. How is that possible?

Kind regards,
Joost Leeuwesteijn

More questions in this forum