Skip to content
Snippets Groups Projects
Commit ca2901c1 authored by cnlohr's avatar cnlohr
Browse files

Update notes and show a small assmebly example.

parent f976a03c
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,6 @@ void RamFunction()
GPIOD->BSHR = (1<<16) | (1<<(16+4)); // Turn off GPIODs
GPIOC->BSHR = (1<<16);
Delay_Ms( 250 );
count++;
// But we turbo through twiddling a pin.
......@@ -46,14 +45,14 @@ void RamFunction()
c.nop\n\
c.sw a0, 0(a2)\n\
c.sw a1, 0(a2)\n\
c.sw a0, 0(a2) /* Writing out takes 2 cycles from what I can tell*/ \n\
c.addi a3, 1 /* Insert this for comparative timing, it's 1 cycle */ \n\
c.sw a0, 0(a2) /* Writing out takes 2 cycles from what I can tell*/ \n\
c.addi %[count], 1 /* Insert this for comparative timing, it's 1 cycle */ \n\
c.sw a1, 0(a2)\n\
c.sw a0, 0(a2)\n\
c.sw a1, 0(a2)\n\
c.sw a0, 0(a2)\n\
c.sw a1, 0(a2)\n\
" : : : "a0", "a1", "a2", "a3" );
" : [count]"+r"(count) : : "a0", "a1", "a2" );
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment