2014-08-14 09:46 AM
hi,
I'm novice with STM32CubeMX HAL + FreeRTOS with KEIL MDK-ARM ulink2 I have problems, with SysTick probably, HAL_RCC_ClockConfig, because it genere HardFault_Handler. When xPortSysTickHandler() in SysTickHandler() in ''stm32f4xx_it.c'' is in comment, there's no hard fault... and without RTos , I have no problems. Do you know the problem or do you have basic exemples for STM32F4xx HAL+FreeRTOS ? merci Jose Ferreira2014-08-14 10:31 AM
If you go to your user directory in Windows you should see a folder ''STM32Cube''. In there go to ''STM32Cube->Repository->STM32Cube_FW_F4_V1.3.0->Projects->STM324xG_EVAL->Applications->FreeRTOS''. It will have several examples for the OS. Additionally, other board demos exist that may be more specific to your needs.
2014-08-18 12:07 AM
Hello,
I had the same problem and traced it down to the priority group. For some reason, it is set to NVIC_PRIORITYGROUP_0 with no way to change it in the GUI. This grouping only allows for subpriorities but no priority. Forcing it to NVIC_PRIORITYGROUP_3 solves the problem. Roland.2014-08-18 07:29 AM
Actually, I meant NVIC_PRIORITYGROUP_4.
The priority group is global to the NVIC, but for some reason the generated code includes a HAL_NVIC_SetPriorityGrouping each time you have a peripheral requiring interrupts. And in my case, I don't know how I got the MX generator to have NVIC_PRIORITYGROUP_0 in my code, therefore preventing freeRTOS exception servicing.2014-08-19 02:49 AM
Hi,
I solve the problem by regenerating code with STM32Cube MX with theses changes in FreeRTOS config : USE_PREEMPTION : disabled USE_TRACE_FACILITY : disabled now it seems ok and I can discover my first RTOS... Thanks to Roland and Jared José2014-08-19 03:44 AM
once faced the same problem, read following thread for another solution: [DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Java/STM32CUBE%20%2b%20FreeRTOS%20%2b%20RTC%20HardFault&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21]STM32CUBE + FreeRTOS + RTC HardFault