This content has been marked as final. Show 2 replies
Are you calling this from within a GPIO callback (or any other interrupt context) by any chance? If yes, then this error will occur.
You will need to move your code out to a RTOS user thread.
Thanks, I created a thread and it worked.