RTC. STM32F4xx. Testhal application moved to OLIMEX_STM32_E407_REV_D board.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8092 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
barthess 2015-07-13 20:11:27 +00:00
parent 9c863974f8
commit d9d6cffd9e
4 changed files with 9 additions and 11 deletions

View File

@ -27,7 +27,7 @@
<link>
<name>board</name>
<type>2</type>
<locationURI>CHIBIOS/os/hal/boards/ST_STM32F4_DISCOVERY</locationURI>
<locationURI>CHIBIOS/os/hal/boards/OLIMEX_STM32_E407_REV_D</locationURI>
</link>
<link>
<name>os</name>

View File

@ -92,7 +92,7 @@ include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk
# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk
include $(CHIBIOS)/os/hal/boards/NONSTANDARD_STM32F4_BARTHESS1/board.mk
include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_E407_REV_D/board.mk
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk

View File

@ -54,7 +54,7 @@ static THD_FUNCTION(blink_thd, arg){
(void)arg;
while (true) {
chThdSleepMilliseconds(100);
palTogglePad(GPIOB, GPIOB_LED_R);
palTogglePad(GPIOC, GPIOC_LED);
}
}
@ -64,7 +64,7 @@ static THD_FUNCTION(blink_thd, arg){
static void anabiosis(void) {
chSysLock();
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
PWR->CR |= (PWR_CR_PDDS | PWR_CR_LPDS | PWR_CR_CSBF | PWR_CR_CWUF);
PWR->CR |= (PWR_CR_PDDS | PWR_CR_LPDS | PWR_CR_CSBF | PWR_CR_CWUF);
RTC->ISR &= ~(RTC_ISR_ALRBF | RTC_ISR_ALRAF | RTC_ISR_WUTF | RTC_ISR_TAMP1F |
RTC_ISR_TSOVF | RTC_ISR_TSF);
__WFI();
@ -243,7 +243,7 @@ static const ShellCommand commands[] = {
*
*/
static const ShellConfig shell_cfg1 = {
(BaseSequentialStream *)&SD2,
(BaseSequentialStream *)&SD6,
commands
};
@ -276,7 +276,7 @@ int main(void){
rtcSTM32SetPeriodicWakeup(&RTCD1, NULL);
/* Shell initialization.*/
sdStart(&SD2, &ser_cfg);
sdStart(&SD6, &ser_cfg);
shellInit();
shellCreateStatic(&shell_cfg1, waShell, sizeof(waShell), NORMALPRIO);

View File

@ -31,8 +31,6 @@
* 0...3 Lowest...Highest.
*/
#define STM32_USE_REVISION_A_FIX
#define STM32F4xx_MCUCONF
/*
@ -46,7 +44,7 @@
#define STM32_CLOCK48_REQUIRED TRUE
#define STM32_SW STM32_SW_PLL
#define STM32_PLLSRC STM32_PLLSRC_HSE
#define STM32_PLLM_VALUE 8
#define STM32_PLLM_VALUE 12
#define STM32_PLLN_VALUE 336
#define STM32_PLLP_VALUE 2
#define STM32_PLLQ_VALUE 7
@ -235,11 +233,11 @@
* SERIAL driver system settings.
*/
#define STM32_SERIAL_USE_USART1 FALSE
#define STM32_SERIAL_USE_USART2 TRUE
#define STM32_SERIAL_USE_USART2 FALSE
#define STM32_SERIAL_USE_USART3 FALSE
#define STM32_SERIAL_USE_UART4 FALSE
#define STM32_SERIAL_USE_UART5 FALSE
#define STM32_SERIAL_USE_USART6 FALSE
#define STM32_SERIAL_USE_USART6 TRUE
#define STM32_SERIAL_USART1_PRIORITY 12
#define STM32_SERIAL_USART2_PRIORITY 12
#define STM32_SERIAL_USART3_PRIORITY 12