Calling or initilising I2C from within a task
Posted: Wed Dec 07, 2022 4:44 am
Is there some trick I missed about calling I2C from within a task?
if I create a task and try and do a periodic call to an I2C slave it blocks and nothing continues.
This is on an S3 using esp-idf V5.0
SDA 38
SCL 39
I2C is started outside the task.
However if I try to start it from within the task it blocks at the init
At which point I haven't yet determined.
....
Actually just calling the init function does not even run the function.
the first line is
which prints nothing.
This function is the init function with a separate component that functions fine when called from app main just not from within the task,
What have I missed here.
Any insight would be gratefully appreciated.
Thanks,
Gregory
if I create a task and try and do a periodic call to an I2C slave it blocks and nothing continues.
This is on an S3 using esp-idf V5.0
SDA 38
SCL 39
I2C is started outside the task.
However if I try to start it from within the task it blocks at the init
At which point I haven't yet determined.
....
Actually just calling the init function does not even run the function.
the first line is
Code: Select all
printf("Init in %s\n",__FUNCTION__);
This function is the init function with a separate component that functions fine when called from app main just not from within the task,
What have I missed here.
Any insight would be gratefully appreciated.
Thanks,
Gregory