I’m trying to run FreeRtos on STM32F101C8. I have 2 simple tasks:
static void vLCDTask( void *pvParameters )
{
(void)(*pvParameters);
for(;;)
{
GPIOB->ODR &= 0x03FF;
vTaskDelay(1);
}
}
static void vLSDTask( void *pvParameters )
{
(void)(*pvParameters);
for(;;)
{
GPIOB->ODR |= 0xFC00;
vTaskDelay(1);
}
}
I debug with IAR jtag emulator and see that each of them is executed only once. After that program goes to HardFault Exception. If I add one more task – it goes through 3 tasks. If I replace xTaskDelay by TaskYield() it works good. I use IAR 5.41 compiler.Thanks