Hi Team,
On s32k144 with FreeRTOS, we are doing a non-blocking i2c read which is having a delay of 1ms via OSIF_TimeDelay(1). During which we notice a WDOG being triggered.
I doubt if this is an actual watchdog; The CFSR register contents are follows:
if the register addresses are correct, then I believe the IMPRECISERR and FORCED bit are set which means there is a hard fault.
The stack usage is within the limit.
Wondering why would a vTaskDelay() cause a fault? Can somebody please shed some light or direct to the right forum for attention?
Thanks.
Solved! Go to Solution.
Hi,
Yes, this is not WDOG but a bus fault exception.
It looks like the issue discussed here:
https://community.nxp.com/t5/S32K/S32K142-lpi2c-is-not-working-with-freeRTOS-integration/m-p/875028
"As the driver uses FreeRTOS API, the driver must be initialized and used inside a FreeRTOS task after the scheduler is started."
Regards,
Daniel
Hi,
Yes, this is not WDOG but a bus fault exception.
It looks like the issue discussed here:
https://community.nxp.com/t5/S32K/S32K142-lpi2c-is-not-working-with-freeRTOS-integration/m-p/875028
"As the driver uses FreeRTOS API, the driver must be initialized and used inside a FreeRTOS task after the scheduler is started."
Regards,
Daniel
Hi @danielmartynek,
Thanks for the prompt response. I was performing the driver init outside the task context, and with this change it works fine.
We have similar usage in other projects and we don't see this failure. Can we get more information on the root cause for this error so it helps me to re-structure them based on the failure scenario?
Regards,
Pavan