By trying to help an member "RTOSman" you can see here: http://forum.chibios.org/phpbb/viewtopic.php?f=21&t=3155
I made a few test and here is my configuration:
- ChibiOS 3.0.4
- Nucléo F401 RE board
The code juste blink the on board LED.
Code: Select all
#include "ch.h"
#include "hal.h"
/*
* LED blinker thread, times are in milliseconds.
*/
static THD_WORKING_AREA(waThread1, 128);
static THD_FUNCTION(Thread1, arg){
uint32_t time = ST2MS(chVTGetSystemTime());
(void)arg;
chRegSetThreadName("blinker");
while (true){
palTogglePad(GPIOA, GPIOA_LED_GREEN);
time += 1000;
chThdSleepUntil(MS2ST(time));
}
}
/*
* Application entry point.
*/
int main(void){
/*
* System initializations.
* - HAL initialization, this also initializes the configured device drivers
* and performs the board-specific initializations.
* - Kernel initialization, the main() function becomes a thread and the
* RTOS is active.
*/
halInit();
chSysInit();
/*
* Creates the blinker thread.
*/
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
/*
* Normal main() thread activity, in this demo it does nothing except
* sleeping in a loop.
*/
while (true){
chThdSleepMilliseconds(1);
}
}
As a result, the on board led blink but after 7 minutes of running it turn off and stop blink.
Did I made miss something?
How can I used the debugger to catch such event?
Cheers,
Theo