Re: New from ST: "Nucleo" boards
Posted: Sat Aug 23, 2014 1:21 pm
"break" makes the main() return and go boom.
Giovanni
Giovanni
ChibiOS Web Boards
https://forum.chibios.org/
Code: Select all
#define STM32_SW STM32_SW_PLL
#define STM32_PLLSRC STM32_PLLSRC_HSI
#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1
#define STM32_PLLMUL_VALUE 9
Code: Select all
while (true) {
palTogglePad(GPIOA, GPIOA_LED_GREEN);
for (volatile int i = 0; i < 1000000; ++i)
;
// chThdSleepMilliseconds(1);
}
Code: Select all
#define CH_CFG_NO_IDLE_THREAD FALSE
Code: Select all
#include "ch.h"
#include "hal.h"
int main () {
halInit();
chSysInit();
while (true) {
palTogglePad(GPIOA, GPIOA_LED_GREEN);
chThdSleepMilliseconds(500);
}
return 0;
}