Skip to main content
Johanan1
Associate III
October 31, 2014
Question

USB Host FreeRTOS Assertion fails

  • October 31, 2014
  • 1 reply
  • 511 views
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
    This topic has been closed for replies.

    1 reply

    Johanan1
    Johanan1Author
    Associate III
    November 3, 2014
    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);