summaryrefslogtreecommitdiff
path: root/openpicc/os/boot/Cstartup_SAM7.c
diff options
context:
space:
mode:
authorhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-11-23 10:30:50 +0000
committerhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-11-23 10:30:50 +0000
commit062f55ca3ea77ebcace83aab4772c9cd3f28ec34 (patch)
tree22581f5054c35007e1a34113dd77f4818a3a67e3 /openpicc/os/boot/Cstartup_SAM7.c
parentae5309d51c484ddf052ee19fd2a76c058e927bcb (diff)
Commit status quo (pending cleanup of the debug and experimental code that I added during the last week)
Change freertos code to not mask FIQ, this finally makes the FIQ working (with approx 700ns +/- 100ns latency; yeah!) and therefore reception starts working Change to two times oversampling (keep four times oversampling code ifdef'd, extract all the magical values to a header file) because at four times oversampling every other sample is very close to a possible data edge and therefore not reliable git-svn-id: https://svn.openpcd.org:2342/trunk@347 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/os/boot/Cstartup_SAM7.c')
-rw-r--r--openpicc/os/boot/Cstartup_SAM7.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/openpicc/os/boot/Cstartup_SAM7.c b/openpicc/os/boot/Cstartup_SAM7.c
index fdcafd3..88af706 100644
--- a/openpicc/os/boot/Cstartup_SAM7.c
+++ b/openpicc/os/boot/Cstartup_SAM7.c
@@ -17,6 +17,8 @@
// Include the board file description
#include <board.h>
+// For memcpy
+#include <string.h>
//*----------------------------------------------------------------------------
//* \fn AT91F_LowLevelInit
@@ -26,7 +28,6 @@
//*----------------------------------------------------------------------------
void AT91F_LowLevelInit (void)
{
- char i=0;
AT91PS_PMC pPMC = AT91C_BASE_PMC;
//* Set flash wait state
@@ -67,8 +68,8 @@ void AT91F_LowLevelInit (void)
pPMC->PMC_MCKR |= AT91C_PMC_CSS_PLL_CLK;
while (!(pPMC->PMC_SR & AT91C_PMC_MCKRDY));
- /* Copy IRQ vector table to RAM */
- for(i=0; i<0x24; i++) *((char*)(0x00200000)+i) = *((char*)(0x00100000)+i);
+ /* Copy first 0x100 bytes (IRQ vector table and FIQ) to RAM */
+ memcpy((void*)0x00200000, (void*)0x00100000, 0x100);
/* Perform remap FIXME doesn't work*/
// AT91C_BASE_MC->MC_RCR = AT91C_MC_RCB;
}
personal git repositories of Harald Welte. Your mileage may vary