mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-01-16 23:00:34 -05:00
This commit is contained in:
parent
c0223a28fe
commit
ae23ad7395
6 changed files with 31 additions and 25 deletions
|
|
@ -113,17 +113,23 @@ void LowLevelInit(void)
|
|||
|
||||
/* Initialize main oscillator
|
||||
****************************/
|
||||
if(!(AT91C_BASE_PMC->PMC_MOR & AT91C_CKGR_MOSCSEL))
|
||||
|
||||
if(!(AT91C_BASE_PMC->PMC_MOR & AT91C_CKGR_MOSCSEL))
|
||||
{
|
||||
AT91C_BASE_PMC->PMC_MOR = (0x37 << 16) | BOARD_OSCOUNT | AT91C_CKGR_MOSCRCEN | AT91C_CKGR_MOSCXTEN;
|
||||
timeout = 0;
|
||||
while (!(AT91C_BASE_PMC->PMC_SR & AT91C_PMC_MOSCXTS) && (timeout++ < CLOCK_TIMEOUT));
|
||||
}
|
||||
else
|
||||
{
|
||||
AT91C_BASE_PMC->PMC_MOR = (0x37 << 16) | BOARD_OSCOUNT | AT91C_CKGR_MOSCRCEN | AT91C_CKGR_MOSCXTEN | AT91C_CKGR_MOSCSEL;
|
||||
timeout = 0;
|
||||
while (!(AT91C_BASE_PMC->PMC_SR & AT91C_PMC_MOSCRCS) && (timeout++ < CLOCK_TIMEOUT));
|
||||
AT91C_BASE_PMC->PMC_MOR = (0x37 << 16) | BOARD_OSCOUNT | AT91C_CKGR_MOSCRCEN | AT91C_CKGR_MOSCXTEN;
|
||||
timeout = 0;
|
||||
while (!(AT91C_BASE_PMC->PMC_SR & AT91C_PMC_MOSCXTS) && (timeout++ < CLOCK_TIMEOUT));
|
||||
while (!(AT91C_BASE_PMC->PMC_SR & AT91C_PMC_MOSCSELS) && (timeout++ < CLOCK_TIMEOUT));
|
||||
}
|
||||
|
||||
// AT91C_BASE_PIOB->PIO_CODR = 1 << 1;
|
||||
// AT91C_BASE_PIOB->PIO_OER = 1 << 1;
|
||||
// AT91C_BASE_PIOB->PIO_PER = 1 << 1;
|
||||
|
||||
/* Switch to moscsel */
|
||||
AT91C_BASE_PMC->PMC_MOR = (0x37 << 16) | BOARD_OSCOUNT | AT91C_CKGR_MOSCRCEN | AT91C_CKGR_MOSCXTEN | AT91C_CKGR_MOSCSEL;
|
||||
timeout = 0;
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ define symbol __ICFEDIT_region_ROM0_end__ = 0x0009FFFF;
|
|||
define symbol __ICFEDIT_region_ROM1_start__ = 0x00100000;
|
||||
define symbol __ICFEDIT_region_ROM1_end__ = 0x0011FFFF;
|
||||
/*-Sizes-*/
|
||||
define symbol __ICFEDIT_size_cstack__ = 0x800;
|
||||
define symbol __ICFEDIT_size_heap__ = 0x200;
|
||||
define symbol __ICFEDIT_size_cstack__ = 0x200;
|
||||
define symbol __ICFEDIT_size_heap__ = 0x4;
|
||||
/*-Specials-*/
|
||||
/*define symbol __ICFEDIT_region_RAM_VECT_start__ = __ICFEDIT_region_RAM0_start__;*/ /*Referenced for CMSIS*/
|
||||
/*define symbol __ICFEDIT_size_vectors__ = 0x100;*/ /*Referenced for CMSIS*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue