I have been playing with microprocessor programming for a while and now i am starting to dive into RTOS world. I succesfully ran demo application for ST Primer. Now i would like to create a simples application (1 task) that would toggle a specified PIN on and off on my prototype board (which is tested and works with other code). I have a STM32F101C6T6 processor. I tried to run this code, but it doesn’t work.
int main( void )
/* Start the tasks defined within this file/specific to this demo. */
xTaskCreate( prvTestTask, ( signed portCHAR * ) "Test", mainCHECK_TASK_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
/* Start the scheduler. */
/* Will only get here if there was not enough heap space to create the
idle task. */
void prvTestTask( void *pvParameters )
const portTickType xFrequency = 1;
// Initialise the xLastWakeTime variable with the current time.
xLastWakeTime = xTaskGetTickCount();
for( ;; )
vTaskDelayUntil( &xLastWakeTime, xFrequency );
When i run ToggleLed in infinite loop in main (not launch kernel) it seems to work. Any help will be appreciated. One information that may be useful. When i run application and pause it it shows 0x0 address as PC and executes CMP R0, #0x0. I am not an assembler guy (i have some basics, but i always used C as lowest level programming language). IF anyone could provide simplest "toggle the ping" example of task which works on this processor i will be really grateful.