SAMA5: Delay loop calibrated; Correct sense of the RED LED
This commit is contained in:
parent
ffdd034c35
commit
0a32db5e05
@ -449,7 +449,7 @@ Buttons and LEDs
|
|||||||
PE24. The red LED is also pulled high but is driven by a transistor so
|
PE24. The red LED is also pulled high but is driven by a transistor so
|
||||||
that it is illuminated when power is applied even if PE24 is not
|
that it is illuminated when power is applied even if PE24 is not
|
||||||
configured as an output. If PE24 is configured as an output, then the
|
configured as an output. If PE24 is configured as an output, then the
|
||||||
LCD is illuminated by a low output.
|
LCD is illuminated by a high output.
|
||||||
|
|
||||||
These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is
|
These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is
|
||||||
defined. In that case, the usage by the board port is defined in
|
defined. In that case, the usage by the board port is defined in
|
||||||
@ -772,8 +772,14 @@ Configurations
|
|||||||
CONFIG_BOOT_RUNFROMISRAM=y : Run from internal SRAM
|
CONFIG_BOOT_RUNFROMISRAM=y : Run from internal SRAM
|
||||||
|
|
||||||
STATUS:
|
STATUS:
|
||||||
|
2013-7-19: This configuration (as do the others) run at 396MHz.
|
||||||
|
The SAMA5D3 can run at 536MHz. I still need to figure out the
|
||||||
|
PLL settings to get that speed.
|
||||||
|
|
||||||
2013-7-28: This configuration was verified functional.
|
2013-7-28: This configuration was verified functional.
|
||||||
|
|
||||||
|
2013-7-31: Delay loop calibrated.
|
||||||
|
|
||||||
norboot:
|
norboot:
|
||||||
This is a little program to help debug of code in NOR flash. It
|
This is a little program to help debug of code in NOR flash. It
|
||||||
does the following:
|
does the following:
|
||||||
@ -788,6 +794,13 @@ Configurations
|
|||||||
1. This program derives from the hello configuration. All of the
|
1. This program derives from the hello configuration. All of the
|
||||||
notes there apply to this configuration as well.
|
notes there apply to this configuration as well.
|
||||||
|
|
||||||
|
STATUS:
|
||||||
|
2013-7-19: This configuration (as do the others) run at 396MHz.
|
||||||
|
The SAMA5D3 can run at 536MHz. I still need to figure out the
|
||||||
|
PLL settings to get that speed.
|
||||||
|
|
||||||
|
2013-7-31: Delay loop calibrated.
|
||||||
|
|
||||||
nsh:
|
nsh:
|
||||||
This configuration directory provide the NuttShell (NSH).
|
This configuration directory provide the NuttShell (NSH).
|
||||||
|
|
||||||
@ -833,13 +846,22 @@ Configurations
|
|||||||
However, no built-in applications are selected in the base configuration.
|
However, no built-in applications are selected in the base configuration.
|
||||||
|
|
||||||
STATUS:
|
STATUS:
|
||||||
|
2013-7-19: This configuration (as do the others) run at 396MHz.
|
||||||
|
The SAMA5D3 can run at 536MHz. I still need to figure out the
|
||||||
|
PLL settings to get that speed.
|
||||||
|
|
||||||
2013-7-31: I have been unable to execute this configuration from NOR
|
2013-7-31: I have been unable to execute this configuration from NOR
|
||||||
FLASH by closing the BMS jumper (J9). As far as I can tell, this
|
FLASH by closing the BMS jumper (J9). As far as I can tell, this
|
||||||
jumper does nothing on my board??? I have been using the norboot
|
jumper does nothing on my board??? I have been using the norboot
|
||||||
configuration to start the program in NOR FLASH (see just above).
|
configuration to start the program in NOR FLASH (see just above).
|
||||||
See "Creating and Using NORBOOT" above.
|
See "Creating and Using NORBOOT" above.
|
||||||
|
|
||||||
2013-7-31: This NSH configuration appears to be fully functional.
|
2013-7-31: This NSH configuration appears to be fully functional.
|
||||||
|
|
||||||
|
2013-7-31: Using delay loop calibration from the hello configuration.
|
||||||
|
That configuration runs out of internal SRAM and, as a result, this
|
||||||
|
configuration needs to be recalibrated.
|
||||||
|
|
||||||
ostest:
|
ostest:
|
||||||
This configuration directory, performs a simple OS test using
|
This configuration directory, performs a simple OS test using
|
||||||
examples/ostest.
|
examples/ostest.
|
||||||
@ -883,15 +905,22 @@ Configurations
|
|||||||
BMS jumper.
|
BMS jumper.
|
||||||
|
|
||||||
STATUS:
|
STATUS:
|
||||||
|
2013-7-19: This configuration (as do the others) run at 396MHz.
|
||||||
|
The SAMA5D3 can run at 536MHz. I still need to figure out the
|
||||||
|
PLL settings to get that speed.
|
||||||
|
|
||||||
2013-7-30: I have been unable to execute this configuration from NOR
|
2013-7-30: I have been unable to execute this configuration from NOR
|
||||||
FLASH by closing the BMS jumper (J9). As far as I can tell, this
|
FLASH by closing the BMS jumper (J9). As far as I can tell, this
|
||||||
jumper does nothing on my board??? I have been using the norboot
|
jumper does nothing on my board??? I have been using the norboot
|
||||||
configuration to start the program in NOR FLASH (see just above).
|
configuration to start the program in NOR FLASH (see just above).
|
||||||
See "Creating and Using NORBOOT" above.
|
See "Creating and Using NORBOOT" above.
|
||||||
|
|
||||||
2013-7-31:
|
2013-7-31: The OS test configuration is basically functional, but
|
||||||
The OS test configuration is basically functional, but takes a very
|
takes a very long time in the round-robin scheduler test computing
|
||||||
long time in the round-robin scheduler test computing prime numbers.
|
prime numbers. This test is supposed to be slow -- like several
|
||||||
This test is suppose to be slow -- like several seconds -- but not
|
seconds -- but not many minutes. No idea why yet. The best guess
|
||||||
many minutes. No idea why yet. The best guess would be an excessive
|
would be an excessive number of context switches.
|
||||||
number of context switches.
|
|
||||||
|
2013-7-31: Using delay loop calibration from the hello configuration.
|
||||||
|
That configuration runs out of internal SRAM and, as a result, this
|
||||||
|
configuration needs to be recalibrated.
|
||||||
|
@ -197,7 +197,7 @@ CONFIG_ARCH_STACKDUMP=y
|
|||||||
#
|
#
|
||||||
# Board Settings
|
# Board Settings
|
||||||
#
|
#
|
||||||
CONFIG_BOARD_LOOPSPERMSEC=16717
|
CONFIG_BOARD_LOOPSPERMSEC=49341
|
||||||
# CONFIG_ARCH_CALIBRATION is not set
|
# CONFIG_ARCH_CALIBRATION is not set
|
||||||
CONFIG_RAM_START=0x00300000
|
CONFIG_RAM_START=0x00300000
|
||||||
CONFIG_RAM_VSTART=0x00300000
|
CONFIG_RAM_VSTART=0x00300000
|
||||||
|
@ -156,7 +156,7 @@
|
|||||||
* PE24. The red LED is also pulled high but is driven by a transistor so
|
* PE24. The red LED is also pulled high but is driven by a transistor so
|
||||||
* that it is illuminated when power is applied even if PE24 is not
|
* that it is illuminated when power is applied even if PE24 is not
|
||||||
* configured as an output. If PE24 is configured as an output, then the
|
* configured as an output. If PE24 is configured as an output, then the
|
||||||
* LCD is illuminated by a low output.
|
* LCD is illuminated by a high output.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* LED index values for use with sam_setled() */
|
/* LED index values for use with sam_setled() */
|
||||||
|
@ -207,7 +207,7 @@ CONFIG_ARCH_STACKDUMP=y
|
|||||||
#
|
#
|
||||||
# Board Settings
|
# Board Settings
|
||||||
#
|
#
|
||||||
CONFIG_BOARD_LOOPSPERMSEC=16717
|
CONFIG_BOARD_LOOPSPERMSEC=49341
|
||||||
# CONFIG_ARCH_CALIBRATION is not set
|
# CONFIG_ARCH_CALIBRATION is not set
|
||||||
CONFIG_ARCH_HAVE_INTERRUPTSTACK=y
|
CONFIG_ARCH_HAVE_INTERRUPTSTACK=y
|
||||||
CONFIG_ARCH_INTERRUPTSTACK=0
|
CONFIG_ARCH_INTERRUPTSTACK=0
|
||||||
|
@ -208,7 +208,7 @@ CONFIG_ARCH_STACKDUMP=y
|
|||||||
#
|
#
|
||||||
# Board Settings
|
# Board Settings
|
||||||
#
|
#
|
||||||
CONFIG_BOARD_LOOPSPERMSEC=16717
|
CONFIG_BOARD_LOOPSPERMSEC=49341
|
||||||
# CONFIG_ARCH_CALIBRATION is not set
|
# CONFIG_ARCH_CALIBRATION is not set
|
||||||
CONFIG_ARCH_HAVE_INTERRUPTSTACK=y
|
CONFIG_ARCH_HAVE_INTERRUPTSTACK=y
|
||||||
CONFIG_ARCH_INTERRUPTSTACK=0
|
CONFIG_ARCH_INTERRUPTSTACK=0
|
||||||
|
@ -208,7 +208,7 @@ CONFIG_ARCH_STACKDUMP=y
|
|||||||
#
|
#
|
||||||
# Board Settings
|
# Board Settings
|
||||||
#
|
#
|
||||||
CONFIG_BOARD_LOOPSPERMSEC=16717
|
CONFIG_BOARD_LOOPSPERMSEC=49341
|
||||||
# CONFIG_ARCH_CALIBRATION is not set
|
# CONFIG_ARCH_CALIBRATION is not set
|
||||||
CONFIG_ARCH_HAVE_INTERRUPTSTACK=y
|
CONFIG_ARCH_HAVE_INTERRUPTSTACK=y
|
||||||
CONFIG_ARCH_INTERRUPTSTACK=0
|
CONFIG_ARCH_INTERRUPTSTACK=0
|
||||||
|
@ -131,8 +131,8 @@ void up_ledinit(void)
|
|||||||
|
|
||||||
void up_ledon(int led)
|
void up_ledon(int led)
|
||||||
{
|
{
|
||||||
bool blueoff = true;
|
bool blueoff = true; /* Low illuminates */
|
||||||
bool redoff = true;
|
bool redon = false; /* High illuminates */
|
||||||
|
|
||||||
switch (led)
|
switch (led)
|
||||||
{
|
{
|
||||||
@ -148,13 +148,12 @@ void up_ledon(int led)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case 3: /* LED_PANIC */
|
case 3: /* LED_PANIC */
|
||||||
redoff = false;
|
redon = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
sam_gpiowrite(GPIO_BLUE, blueoff);
|
sam_gpiowrite(GPIO_BLUE, blueoff);
|
||||||
sam_gpiowrite(GPIO_RED, redoff);
|
sam_gpiowrite(GPIO_RED, redon);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -165,8 +164,8 @@ void up_ledoff(int led)
|
|||||||
{
|
{
|
||||||
if (led != 2)
|
if (led != 2)
|
||||||
{
|
{
|
||||||
sam_gpiowrite(GPIO_BLUE, true);
|
sam_gpiowrite(GPIO_BLUE, true); /* Low illuminates */
|
||||||
sam_gpiowrite(GPIO_RED, true);
|
sam_gpiowrite(GPIO_RED, false); /* High illuminates */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,10 +122,15 @@ void sam_setled(int led, bool ledon)
|
|||||||
|
|
||||||
if (led == BOARD_BLUE)
|
if (led == BOARD_BLUE)
|
||||||
{
|
{
|
||||||
|
/* Low illuminates */
|
||||||
|
|
||||||
ledcfg = GPIO_BLUE;
|
ledcfg = GPIO_BLUE;
|
||||||
|
ledon = !ledon;
|
||||||
}
|
}
|
||||||
else if (led == BOARD_RED)
|
else if (led == BOARD_RED)
|
||||||
{
|
{
|
||||||
|
/* High illuminates */
|
||||||
|
|
||||||
ledcfg = GPIO_RED;
|
ledcfg = GPIO_RED;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -144,9 +149,13 @@ void sam_setleds(uint8_t ledset)
|
|||||||
{
|
{
|
||||||
bool ledon;
|
bool ledon;
|
||||||
|
|
||||||
ledon = ((ledset & BOARD_BLUE_BIT) != 0);
|
/* Low illuminates */
|
||||||
|
|
||||||
|
ledon = ((ledset & BOARD_BLUE_BIT) == 0);
|
||||||
sam_gpiowrite(GPIO_BLUE, ledon);
|
sam_gpiowrite(GPIO_BLUE, ledon);
|
||||||
|
|
||||||
|
/* High illuminates */
|
||||||
|
|
||||||
ledon = ((ledset & BOARD_RED_BIT) != 0);
|
ledon = ((ledset & BOARD_RED_BIT) != 0);
|
||||||
sam_gpiowrite(GPIO_RED, ledon);
|
sam_gpiowrite(GPIO_RED, ledon);
|
||||||
}
|
}
|
||||||
|
@ -65,12 +65,12 @@
|
|||||||
* PE24. The red LED is also pulled high but is driven by a transistor so
|
* PE24. The red LED is also pulled high but is driven by a transistor so
|
||||||
* that it is illuminated when power is applied even if PE24 is not
|
* that it is illuminated when power is applied even if PE24 is not
|
||||||
* configured as an output. If PE24 is configured as an output, then the
|
* configured as an output. If PE24 is configured as an output, then the
|
||||||
* LCD is illuminated by a low output.
|
* LCD is illuminated by a high output.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GPIO_BLUE (GPIO_OUTPUT | GPIO_CFG_PULLUP | GPIO_OUTPUT_SET | \
|
#define GPIO_BLUE (GPIO_OUTPUT | GPIO_CFG_PULLUP | GPIO_OUTPUT_SET | \
|
||||||
GPIO_PORT_PIOE | GPIO_PIN25)
|
GPIO_PORT_PIOE | GPIO_PIN25)
|
||||||
#define GPIO_RED (GPIO_OUTPUT | GPIO_CFG_PULLUP | GPIO_OUTPUT_SET | \
|
#define GPIO_RED (GPIO_OUTPUT | GPIO_CFG_PULLUP | GPIO_OUTPUT_CLEAR | \
|
||||||
GPIO_PORT_PIOE | GPIO_PIN24)
|
GPIO_PORT_PIOE | GPIO_PIN24)
|
||||||
|
|
||||||
/* Buttons **************************************************************************/
|
/* Buttons **************************************************************************/
|
||||||
|
Loading…
Reference in New Issue
Block a user