summaryrefslogtreecommitdiff
path: root/at91lib
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-07-31 16:13:20 +0200
committerHarald Welte <laforge@gnumonks.org>2011-07-31 16:13:20 +0200
commit5d5479fd3a0d0d4c1890f606ea4fcec899099eb6 (patch)
tree30dece3485f7a12aa42bbdf05bbe2d4ee2117594 /at91lib
parented76d4c2b6d1fc85c6571e76f7a9038cf934562d (diff)
at91lib: sam7s-p board: don't skip lowlevel initialization in DFU mode
Diffstat (limited to 'at91lib')
-rw-r--r--at91lib/boards/sam7-p/board_cstartup.S2
-rw-r--r--at91lib/boards/sam7-p/board_lowlevel.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/at91lib/boards/sam7-p/board_cstartup.S b/at91lib/boards/sam7-p/board_cstartup.S
index 92bcf8b..384333d 100644
--- a/at91lib/boards/sam7-p/board_cstartup.S
+++ b/at91lib/boards/sam7-p/board_cstartup.S
@@ -130,6 +130,7 @@ resetHandler:
/* Set pc to actual code location (i.e. not in remap zone) */
ldr pc, =1f
+#endif /* flash_dfu */
/* Perform low-level initialization of the chip using LowLevelInit() */
1:
@@ -138,7 +139,6 @@ resetHandler:
ldr r0, =LowLevelInit
mov lr, pc
bx r0
-#endif /* flash_dfu */
/* Initialize the relocate segment */
ldr r0, =_efixed
diff --git a/at91lib/boards/sam7-p/board_lowlevel.c b/at91lib/boards/sam7-p/board_lowlevel.c
index 392b77d..d9b1da8 100644
--- a/at91lib/boards/sam7-p/board_lowlevel.c
+++ b/at91lib/boards/sam7-p/board_lowlevel.c
@@ -149,8 +149,10 @@ void LowLevelInit(void)
// Watchdog initialization
AT91C_BASE_WDTC->WDTC_WDMR = AT91C_WDTC_WDDIS;
+#if !defined(flash_dfu)
// Remap the internal SRAM at 0x0
BOARD_RemapRam();
+#endif
// Disable RTT and PIT interrupts (potential problem when program A
// configures RTT, then program B wants to use PIT only, interrupts
personal git repositories of Harald Welte. Your mileage may vary