cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55 Thread FTD Wireless Stack (v1.10) not ACKing when ot command sent

It appears that v1.10 of the Thread FTD binary does not work properly. When a command is sent (line 4 below), the code stalls in an infinite loop, waiting for an ACK from the M0 processor.

static void APP_THREAD_DeviceConfig(void)
{
  otError error;
  error = otInstanceErasePersistentInfo(NULL);
  if (error != OT_ERROR_NONE)
  {
    APP_THREAD_Error(ERR_THREAD_ERASE_PERSISTENT_INFO,error);
  }

From the snippet below, the code stalls at "Wait_Getting_Ack_From_M0()" because it never receives an interrupt from the coprocessor (i.e., HW_IPCC_Tx_Handler() never gets called).

void Ot_Cmd_Transfer(void)
{
  /* OpenThread OT command cmdcode range 0x280 .. 0x3DF = 352 */
  p_thread_otcmdbuffer->cmdserial.cmd.cmdcode = 0x280U;
  /* Size = otCmdBuffer->Size (Number of OT cmd arguments : 1 arg = 32bits so multiply by 4 to get size in bytes)
   * + ID (4 bytes) + Size (4 bytes) */
  uint32_t l_size = ((Thread_OT_Cmd_Request_t*)(p_thread_otcmdbuffer->cmdserial.cmd.payload))->Size * 4U + 8U;
  p_thread_otcmdbuffer->cmdserial.cmd.plen = l_size;
 
  TL_OT_SendCmd();
 
  /* Wait completion of cmd */
  Wait_Getting_Ack_From_M0();
}

I verified that this code indeed does work properly with v1.8 of the FTD Thread stack.

1 REPLY 1

This is no longer an issue. I found out that if the FreeRTOS settings aren't set correctly, the application fails to properly complete. In my case, it results in either APP_THREAD_DeviceConfig not fully completing or APP_THREAD_StateNotif not being called. I modified FreeRTOS/Thread settings (e.g., heap size, debugger support) to match that of the ioc in the FreeRTOS Thread example by ST and it worked.