This is Old forum link suggests the possibility of posting to a queue before the scheduler starts using xQueueSendToBackFromISR. However, at least for the CortexM4 port, this doesn’t work at all, dying in the vPortValidateInterruptPriority assert because ulMaxPRIGROUPValue is still 0.
Is there some workaround, or just don’t do it?
This is for a SysLog, where I’d like to queue items even if the scheduler isn’t started. Perhaps the better way is to start items with vApplicationDaemonTaskStartupHook, but that requires some careful splitting out of os and non os items…
I think it should be possible to send to a queue before the scheduler starts using the regular queue send function (not the ISR version) providing sending doesn’t trigger a context switch. Not triggering a context switch means the block time must be 0, and there must not be a task blocked on the queue waiting for the data (which there can’t be if the scheduler isn’t running).
I have used the QueueSend function pre-scheduler start. I think you need to set the block time to 0, and not just be trusting that the queue has room, or an assert might fire (I would need to check that).
That is a basic requirement for operations pre-scheduler, they must not be ABLE to block, so the block time needs to be 0.