projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sam3n: use linker script for flash, not for ram
[bertos.git]
/
bertos
/
cpu
/
cortex-m3
/
drv
/
clock_sam3.c
diff --git
a/bertos/cpu/cortex-m3/drv/clock_sam3.c
b/bertos/cpu/cortex-m3/drv/clock_sam3.c
index dfb2eb240ff812fdb20060a579063a7d08127864..55173e62acd7e30411c19448f23b5b753b5d4449 100644
(file)
--- a/
bertos/cpu/cortex-m3/drv/clock_sam3.c
+++ b/
bertos/cpu/cortex-m3/drv/clock_sam3.c
@@
-30,7
+30,7
@@
*
* -->
*
*
* -->
*
- * \brief A
T
SAM3 clock setup.
+ * \brief A
tmel
SAM3 clock setup.
*
* \author Stefano Fedrigo <aleph@develer.com>
*/
*
* \author Stefano Fedrigo <aleph@develer.com>
*/
@@
-38,10
+38,7
@@
#include "clock_sam3.h"
#include <cfg/compiler.h>
#include <cfg/macros.h>
#include "clock_sam3.h"
#include <cfg/compiler.h>
#include <cfg/macros.h>
-#include <io/sam3_pmc.h>
-#include <io/sam3_sysctl.h>
-#include <io/sam3_flash.h>
-#include <io/sam3_wdt.h>
+#include <io/sam3.h>
/* Frequency of board main oscillator */
/* Frequency of board main oscillator */
@@
-134,4
+131,7
@@
void clock_init(void)
PMC_MCKR = PMC_MCKR_CSS_PLL_CLK;
timeout = CLOCK_TIMEOUT;
while (!(PMC_SR & BV(PMC_SR_MCKRDY)) && --timeout);
PMC_MCKR = PMC_MCKR_CSS_PLL_CLK;
timeout = CLOCK_TIMEOUT;
while (!(PMC_SR & BV(PMC_SR_MCKRDY)) && --timeout);
+
+ /* Enable clock on PIO for inputs */
+ PMC_PCER = BV(PIOA_ID) | BV(PIOB_ID) | BV(PIOC_ID);
}
}