MY application is using SDK 12.2, SD132 v3.1 and freeRTOS. I'm trying to debug a sensor that uses TWI. When I enable logging. #define NRF_LOG_ENABLED 1, NRF_LOG_BACKEND_SERIAL_USES_UART 0 and, NRF_LOG_BACKEND_SERIAL_USES_RTT 1
I start to get hardfaults. I've implemented the fix here, but I still get the hardfaults. If I set NRF_LOG_ENABLED 0, the hardfaults stop.
To use logging with with freeRTOS I enable it with:
#if NRF_LOG_ENABLED
err_code = NRF_LOG_INIT(NULL);
APP_ERROR_CHECK(err_code);
// Start execution.
if (pdPASS != xTaskCreate(logger_thread, "LOGGER", 256, NULL, 3, &m_logger_thread))
{
APP_ERROR_HANDLER(NRF_ERROR_NO_MEM);
}
#endif //NRF_LOG_ENABLED
Which I copied from the ble_app_hrs_freertos example.
Any ideas as to why I'm getting Hardfaults when I turn on logging, or suggestions on how to debug it? Thanks