Hello community,
I am currently working on IWR6843ISK board with a custom app based on OOB lab from MMWave industrial Toolbox 4.7.0. My SDK version is 03.05.00.04, compiler ti-cgt-arm_16.9.6.LTS.
I need to reset my app when asked. I use "SOC_softReset(gMmwMssMCB.socHandle, &errCode)" in my main.c which works fine when I only use CLI_task.
But when I create a RTOS Timer at 1ms, this same function never exit and my app freeze.
I tested with a watchdog , and my app resets successfully. I don't understand.
I tried adding HwiP_disable() before SOC_softReset but it also failed.
Here is a snippet:
void MmwDemo_Reset()
{
int32_t errCode;
//Reset Software -- this part fails
if (!SOC_softReset(gMmwMssMCB.socHandle, &errCode))
MmwDemo_writeLog("Error: Warm Soft Reset failed with error %d\n", errCode);
//this part works
/*Watchdog_Handle watchdogHandle = NULL;
Watchdog_Params watchdogParams;
// Initialize the Watchdog driver
Watchdog_init();
// Initialize the Watchdog driver default parameters
Watchdog_Params_init(&watchdogParams);
watchdogParams.resetMode = Watchdog_RESET_ON;
//watchdogParams.callbackFxn = watchdogCallback;
watchdogParams.debugStallMode = Watchdog_DEBUG_STALL_ON;
watchdogParams.windowSize = Watchdog_WINDOW_100_PERCENT;
// T-expire = (preloadValue+1) x 2 ^ 13 / RTICLK1 ; RTICLK1=20MHz
watchdogParams.preloadValue = 1954; // 80.03 mSec
watchdogParams.socHandle = gMmwMssMCB.socHandle;
//watchdogParams.esmHandle = esmHandle; // required in callback mode only
// Open the Watchdog driver
watchdogHandle = Watchdog_open(0, &watchdogParams);
while(1);*/
}
void MmwDemo_CANInit(uint8_t taskPriority)
{
Timer_Params timerParams;
Timer_Handle myTimer;
Error_Block eb;
Error_init(&eb);
Can_Initalize();
Semaphore_Params semParams;
Semaphore_Params_init(&semParams);
semParams.mode = Semaphore_Mode_BINARY;
sem = Semaphore_create(0, &semParams, NULL);
//Initialize the Task sensorConfig
Task_Params taskParams;
Task_Params_init(&taskParams);
taskParams.priority = taskPriority;
Task_create(mmwDemo_CAN_task, &taskParams, NULL);
//Timer for 1ms update
Timer_Params_init(&timerParams);
timerParams.period = 1000U;
timerParams.periodType = Timer_PeriodType_MICROSECS;
timerParams.arg = 1;
myTimer = Timer_create(Timer_ANY, gestionTimerIsr, &timerParams, &eb);
if (myTimer == NULL)
{
System_abort("Timer create failed");
}
return;
}
static void gestionTimerIsr(UArg arg0)
{
static uint16_t cpt_1Hz = 1000;
// Rhythm: 1000Hz / 1000 = 1Hz
if( cpt_1Hz <= 0 )
{
cpt_1Hz=1000;
gestionA1Hz = TRUE;
}
cpt_1Hz--;
//counting stuff...
//Enable task to run each ms
Semaphore_post(sem);
}
Tasks, timer and radar works fine apparently, but Reset don't fire. When I comment "myTimer = Timer_create(Timer_ANY, gestionTimerIsr, &timerParams, &eb);" Reset works again.
Can you help me please ?
Fabien