Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

Running FreeRTOS ON MY STM32F1 Board causes interrupt problem

Posted by prasaddait on October 30, 2017

I have three Threads Running in y code in main function I am declaring 3 Threads and suspend Two of them. My Interrupt Routine calls a function which after words resumes the one Task named "Swing". But While this task is running whenever interrupt occurs it does not run at all. Code is as follows: int main(void) {

/* USER CODE BEGIN 1 */

/* USER CODE END 1 */

/* MCU Configuration----------------------------------------------------------*/

/* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init();

/* USER CODE BEGIN Init */

/* USER CODE END Init */

/* Configure the system clock */ SystemClock_Config();

/* USER CODE BEGIN SysInit */

/* USER CODE END SysInit */

/* Initialize all configured peripherals */ MXGPIOInit(); MXTIM3Init(); MXTIM4Init(); MXUSART1UARTInit(); MXUSART2UARTInit(); MXI2C2Init();

/* USER CODE BEGIN 2 / HALUARTReceiveIT(&huart2,(uint8t *)RxData,1); HALTIMICStartIT(&htim3,TIMCHANNEL2); HALTIMICStartIT(&htim4,TIMCHANNEL_1); / USER CODE END 2 */

/* USER CODE BEGIN RTOSMUTEX / / add mutexes, ... / / USER CODE END RTOSMUTEX */

/* USER CODE BEGIN RTOSSEMAPHORES / / add semaphores, ... / / USER CODE END RTOSSEMAPHORES */

/* USER CODE BEGIN RTOSTIMERS / / start timers, add new ones, ... / / USER CODE END RTOSTIMERS */

/* Create the thread(s) / / definition and creation of defaultTask */ osThreadDef(defaultTask, StartDefaultTask, osPriorityNormal, 0, 128); defaultTaskHandle = osThreadCreate(osThread(defaultTask), NULL);

/* USER CODE BEGIN RTOS_THREADS / / add threads, ... */ osThreadDef(SwingTask, Swing, osPriorityNormal, 0, 128); SwingTaskHandle = osThreadCreate(osThread(SwingTask), NULL);

osThreadDef(Task1, Task1, osPriorityNormal, 0, 100);
osThreadCreate(osThread(Task1), NULL);
vTaskSuspend(defaultTaskHandle);
vTaskSuspend(SwingTaskHandle);

vTaskStartScheduler();

/* USER CODE END RTOS_THREADS */

/* USER CODE BEGIN RTOS_QUEUES / / add queues, ... */

/* USER CODE END RTOS_QUEUES */

/* Start scheduler */ osKernelStart();

/* We should never get here as control is now taken by the scheduler */

/* Infinite loop / / USER CODE BEGIN WHILE / while (1) { / USER CODE END WHILE */

/* USER CODE BEGIN 3 */

}

/* USER CODE END 3 */

}


Running FreeRTOS ON MY STM32F1 Board causes interrupt problem

Posted by rtel on October 30, 2017

But While this task is running whenever interrupt occurs it does not run at all.

What doesn't run - the interrupt or the task?

See http://www.freertos.org/FAQHelp.html noting the bits specifically about ARM Cortex-m.

Also see http://www.freertos.org/RTOS-Cortex-M3-M4.html noting the bit specifically about STM32.


Running FreeRTOS ON MY STM32F1 Board causes interrupt problem

Posted by prasaddait on October 31, 2017

Actually Interrupt is not Running..


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS