This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem with load and store data

Hey all!
I'm using Keil-uV3. Chip LPC2214 (Philips Semiconductors)
I have an external memory device connected to the expansion board.
The external device is using /CS0 and /CS1. Memory bank is 32 bits wide.
When moving data from external memory bank 1(at address 0x81000000) to 10words in bank 0, I wrote:

{
//R1-->address in bank 1
ldr r1,=0x81000000
//R2-->address in bank 0
ldr r0,=0x80000000
//R3=[R0]+10*4
add r3,r0,#40
loop:
LDR R1,[R0] //3MC
STR R1,[R2] //2MC
//Increment R0 to next memcells
ADD R0,#4 //1MC
//Compare with R3
CMP r3,r0 //1MC
//If r0==r3, exit, else return loop
bne loop //3MC

exit:
...
}
Loop waste 10MCs, but my project is only permit it <=6MCs,
I'm trying some way, but can't solve this prob, please help me!
Thanks before!

-----------
Tony Bui

0