cancel
Showing results for 
Search instead for 
Did you mean: 

USB Host FreeRTOS Assertion fails

Johanan1
Associate II
Posted on October 31, 2014 at 20:02

As soon as the USB disk is connected, I get an assertion fail, with this comment above this assertion:

/

* The following assertion will fail if a service routine (ISR) for

an interrupt that has been assigned a priority above

configMAX_SYSCALL_INTERRUPT_PRIORITY calls an ISR safe FreeRTOS API

function.  ISR safe FreeRTOS API functions must *only* be called

from interrupts that have been assigned a priority at or below

configMAX_SYSCALL_INTERRUPT_PRIORITY.

*/

 configASSERT( ucCurrentPriority >= ucMaxSysCallPriority );

I tried to change the OTG_FS_IRQn priority as follows:

HAL_NVIC_SetPriority(OTG_FS_IRQn, configMAX_SYSCALL_INTERRUPT_PRIORITY+1, 0);

But this did not make any change.

I found this happand just as soon as this is called:

 

osMessagePut ( phost->os_event, USBH_PORT_EVENT, 0);

Any ideas how to fix this?

Thanks
1 REPLY 1
Johanan1
Associate II
Posted on November 03, 2014 at 08:01

problem solved by help from FreeRTOS forum:

 HAL_NVIC_SetPriority(OTG_FS_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY , 0);