This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

xQueueSendFromISR returns without pdTRUE

we develop 52832 from the project "ble_app_hrs_freertos" , in nRF5_SDK_14.2.0.

occasionally,  xQueueSendFromISR  returns  without  pdTRUE in Interrupt handler.

so  xQueueSendFromISR should sent message to a normal task , but  this  make the program fail.

i try to put xQueueSendFromISR in a loop to retry 1000 times, this improve the problem, but  occasionally , it get fail

i think there is enough heap and queue room. but what make xQueueSendFromISR wrong.

 thanks for someone  to give  some guide 

Parents Reply Children
  • The only way this would not return true is if the Queue it's trying to send is full. So you need to figure out why the consumer of this queue not pulling the items out or you need to increase the size of the queue. 

    One more thing. When queue is full and the producer is given an error, then it common for the producer task to retry after sometime to see if the consumer has pulled out few months items from the queue to make space for new request to push an item.

    From your description it feels like the task that needs to pull items is given a lower priority than it should have been.

  • Thanks for you help,and this is beijing time ,late to reply.
    we will make more experiment particularly for the state of the Queue .The probability of the error is not too big.
    thanks and verify answer

Related