Hi,
I see that xSemaphoreGiveFromISR() not functional from ISR with STM32F746NG.
HAL
GPIOTogglePin is working fine when it is called in ISR. But, xSemaphoreGiveFromISR is not working.
Is there any STM32F746NG configuration is missing to make it work with STM32F746NG?
NOTE:
1. Target board & CPU: STM32F746G-DISCO, STM32F746NG
2. FreeRTOS project is created from STM32CubeMx
3. Used TIM3 for Timebase Source and TIM2 for 1sec interrupt generation using internal clock
4. Refer below section for definition of configKERNEL
INTERRUPTPRIORITY and configMAX
SYSCALLINTERRUPT_PRIORITY
References:
main()
void Thread2(void const * argument)
{
uint8
t txData[20] = “Hello from Thread2rn”;
while(1)
{
if(xSemaphoreTake(myBinarySem01Handle, portMAXDELAY)) {
HAL
GPIOTogglePin(GPIOI,GPIO
PIN1);
HAL
UARTTransmit(&huart1, txData, 20, 5);
osDelay(100);
}
}
}
Timer Interrupt Callback
void HAL
TIMPeriodElapsedCallback(TIM
HandleTypeDef *htim)
{
if (htim->Instance == TIM3) {
HALIncTick(); //TIM3 used for Timebase Source
}
else if(htim->Instance == TIM2) {
/* HAL
GPIOTogglePin(GPIOI,GPIO
PIN1);
LED blink working fine when below SemaphoreGiveFromISR commented */
xSemaphoreGiveFromISR(myBinarySem01Handle,NULL);
}
}
define NVIC
PRIOBITS 4
define configPRIO
BITS 4
define configLIBRARYLOWEST
INTERRUPTPRIORITY 15
define configLIBRARY
MAXSYSCALL
INTERRUPTPRIORITY 5
define configKERNEL
INTERRUPTPRIORITY ( configLIBRARY
LOWESTINTERRUPT
PRIORITY << (8 – configPRIOBITS) )
define configMAX
SYSCALLINTERRUPT
PRIORITY ( configLIBRARYMAX
SYSCALLINTERRUPT
PRIORITY << (8 – configPRIOBITS) )