Crashing coming out of DPM (LMAC ASSERT)

Hello,

With DPM enabled, after disconnecting from AP (WFQAP), we put da16200 to sleep early to save power using `AT+SETSLEEP2EXT=3600,1` command. When we wake it up with GPIO, we get the following crash (LMAC ASSERT(vif_entry->type == VIF_STA) ERROR Reboot !!!). We're on SDK 3.2.4.0, running just AT commands.

16:56:22 -->
16:56:22 --> Wakeup source is 0x90
16:56:22 --> Configure GPIOA11 for wake-up
16:56:22 -->
16:56:22 --> System Mode : Station Only (0)
16:56:22 --> >>> Start DA16X Supplicant ...
16:56:22 --> >>> DA16x Supp Ver2.7 - 2022_03
16:56:22 --> >>> MAC address (sta0) : d4:3d:39:f2:4b:66
16:56:22 --> [wpas_network_disabled] ssid disabled
16:56:22 --> >>> sta0 interface add OK
16:56:22 --> >>> Start STA mode...
16:56:22 --> Enabling multi-pin coexistence
16:56:22 --> Coexistence Setting: rf_meas_btcoex(1, 0, 0)
16:56:22 -->
16:56:22 --> >>> UART1 : Clock=80000000, BaudRate=115200
16:56:22 --> >>> UART1 : DMA Enabled ...
16:56:22 --> [AT-CMD] UDP session OPEN (Port: 5733)
16:56:25 --> OK
16:56:25 --> OK
16:56:26 --> 0
// Connected to SSID above (normal wake up via gpio below)
16:58:14 --> Wakeup source is 0x90
16:58:14 --> Configure GPIOA11 for wake-up
16:58:14 --> >>> Start DA16X Supplicant ...
16:58:14 --> >>> TIM STATUS: 0x00000010
16:58:14 --> >>> TIM : FAST
16:58:14 --> Enabling multi-pin
16:58:14 --> coexistence
16:58:14 --> Coexistence Setting: rf_meas_btcoex(1, 0, 0)
16:58:14 -->
16:58:14 --> +ATPROV=STATUS 0
16:58:20 --> OK
16:58:20 -->
16:58:20 --> >>> Network Interface (wlan0) : DOWN
16:58:20 --> .[1;31m[wpa_supplicant_event_disassoc] CTRL-EVENT-DISCONNECTED bssid=f0:79:59:75:ee:00 reason=3 locally_generated=1
16:58:20 --> .[0m
16:58:20 -->
// Disconnect using WFQAP
16:58:20 --> ### User Call-back : Wi-Fi disconnected ( reason_code = 3 ) ...
// Go to sleep using AT+SETSLEEP2EXT=3600,1
// Then wake up using GPIO
16:58:36 -->
16:58:36 --> Wakeup source is 0x90
16:58:36 --> Configure GPIOA11 for wake-up
16:58:36 --> Connection information lost Event in DPM Wakeup --> reconnect
16:58:36 --> [DPM_TM] Delete tid : 5 ~ 15 (lvl.1).
16:58:36 --> [D–
16:58:40 -->
16:58:40 --> Wakeup source is 0x0
16:58:40 --> [dpm_init_retmemory] DPM INIT CONFIGURATION(1)
16:58:40 -->
16:58:40 -->
16:58:40 --> .******************************************************
16:58:40 --> .* DA16200 SDK Information
16:58:40 --> .* ---------------------------------------------------
16:58:40 --> .*
16:58:40 --> .* - CPU Type : Cortex-M4 (120MHz)
16:58:40 --> .* - OS Type : FreeRTOS 10.4.3
16:58:40 --> .* - Serial Flash : 4 MB
16:58:40 --> .* - SDK Version : V3.2.4.6 ST
16:58:40 --> .* - F/W Version : FRTOS-GEN01-01-48589f13c-003246
16:58:40 --> .* - F/W Build Time : Feb 9 2023 16:13:33
16:58:40 --> .* - Boot Index : 0
16:58:40 --> .*
16:58:40 --> .******************************************************
16:58:40 -->
16:58:40 --> Configure GPIOA11 for wake-up
16:58:40 -->
16:58:40 --> System Mode : Station Only (0)
16:58:40 --> >>> Start DA16X Supplicant ...
16:58:40 --> >>> DA16x Supp Ver2.7 - 2022_03
16:58:40 --> >>> Wi-Fi mode : b/g/n -> b/g (for DPM)
16:58:40 --> >>> MAC address (sta0) : d4:3d:39:f2:4b:66
16:58:40 --> [wpas_network_disabled] ssid disabled
16:58:40 --> >>> sta0 interface add OK
16:58:40 --> >>> Start STA mode...
16:58:40 --> Enabling multi-pin coexistence
16:58:40 --> Coexistence Setting: rf_meas_btcoex(1, 0, 0)
16:58:40 -->
16:58:40 --> >>> UART1 : Clock=80000000, BaudRate=115200
16:58:40 --> >>> UART1 : DMA Enabled ...
16:58:40 --> [AT-CMD] UDP session OPEN (Port: 5733)
// Go to sleep using AT+SETSLEEP2EXT=3600,1
16:59:00 -->
// Further wake up using GPIO trigger the assert below
16:59:00 --> Wakeup source is 0x90
16:59:00 --> Configure GPIOA11 for wake-up
16:59:00 --> LMAC ASSERT(vif_entry->type == VIF_STA) ERROR Reboot !!!
16:59:00 --> [DPM
16:59:05 -->
16:59:05 --> Wakeup source is 0x0
16:59:05 --> [dpm_init_retmemory] DPM INIT CONFIGURATION(1)
16:59:05 -->
16:59:05 -->
16:59:05 --> .******************************************************
16:59:05 --> .* DA16200 SDK Information
16:59:05 --> .* ---------------------------------------------------
16:59:05 --> .*
16:59:05 --> .* - CPU Type : Cortex-M4 (120MHz)
16:59:05 --> .* - OS Type : FreeRTOS 10.4.3
16:59:05 --> .* - Serial Flash : 4 MB
16:59:05 --> .* -
16:59:05 --> SDK Version : V3.2.4.6 ST
16:59:05 --> .* - F/W Version : FRTOS-GEN01-01-48589f13c-003246
16:59:05 --> .* - F/W Build Time : Feb 9 2023 16:13:33
16:59:05 --> .* - Boot Index : 0
16:59:05 --> .*
16:59:05 --> .******************************************************
16:59:05 -->
16:59:05 --> Configure GPIOA11 for wake-up
16:59:05 -->
16:59:05 --> System Mode : Station Only (0)
16:59:05 --> >>> Start DA16X Supplicant ...
16:59:05 --> >>> DA16x Supp Ver2.7 - 2022_03
16:59:05 --> >>> Wi-Fi mode : b/g/n -> b/g (for DPM)
16:59:05 --> >>> MAC address (sta0) : d4:3d:39:f2:4b:66
16:59:05 --> [wpas_network_disabled] ssid disabled
16:59:05 --> >>> sta0 interface add OK
16:59:05 --> >>> Start STA mode...
16:59:05 --> Enabling multi-pin coexistence
16:59:05 --> Coexistence Setting: rf_meas_btcoex(1, 0, 0)
16:59:05 -->
16:59:05 --> >>> UART1 : Clock=80000000, BaudRate=115200
16:59:05 --> >>> UART1 : DMA Enabled ...
16:59:05 --> [AT-CMD] UDP session OPEN (Port: 5733)

Parents
  • Hi Konstantin,

    Apologies for the delay.
    Our Team was able to recreate your issue. 
    Indeed, the SETSLEEP2EXT command has not been designed so that it can be used with the DPM enabled. 
    So, before invoking SETSLEEP2EXT command, DPM mode should be disabled by AT+DPM=0 command. Then, the device will be restarted, and you will be able to invoke SETSLEEP2EXT to configure the device is Sleep 2 mode.


    Please let me know if you have any questions.

    Kind Regards,
    OV_Renesas

  • We don't want to keep toggling DPM on and off. Is there a command we can use to request early sleep in Abnormal DPM?

  • Hi Konstantin,

    Thank you for the reply.
    We have implemented an API for your requirement.
    Please find the attached zip file and apply it in your project.
    Please share any feedback necessary.

    early_sleep_command_03102023.zip

    Kind Regards,
    OV_Renesas

  • Hi,

    Thank yo for the patch. We verified that it works but had a couple of questions:

    1. Why add a whole new command as opposed to just fix the existing SETSLEEP2EXT?

    2. What SDK was this patched based on? 3.2.4.0?

    3. Is there any plan to have this fix be included in the upcoming SDK release? We would prefer to not have to maintain a separate patch, which would make migrating SDKs more difficult.

    Thanks,

    Konstantin

  • Hi Konstantin,

    Thank you for the reply.
    I have forwarded your questions to the team and I will get back to you as soon as possible.

    Kind Regards,
    OV_Renesas

  • Hi Konstantin,

    Let me try to answer your questions:

    #1. The existing SETSLEEP2EXT command has not been designed so that it can be used with DPM enabled. We cannot simply change the behavior of a command.

    #2. The changes have been generated based on v3.2.4.

    #3. We don't have any plan to have this change included in the upcoming release yet. but we will consider it.

    We could also provide you for a patch based on v3.2.6 if you want to use the latest SDK.

    Please let us know if you have any other questions.

    Kind Regards,
    OV_Renesas

  • It looks like there is a disconnect in the DPM Manual docs. The screenshot from the REN_UM-WI-030_DA16200_DA16600_DPM_User_Manual_1v4_MAS_20230117.pdf implies that CLRDPMSLPEXT works in abnormal DPM but it does not. Even after I send this command, the da16200 goes to sleep in 30 seconds. And SETDPMSLPEXT also does nothing in abnormal DPM.

Reply
  • It looks like there is a disconnect in the DPM Manual docs. The screenshot from the REN_UM-WI-030_DA16200_DA16600_DPM_User_Manual_1v4_MAS_20230117.pdf implies that CLRDPMSLPEXT works in abnormal DPM but it does not. Even after I send this command, the da16200 goes to sleep in 30 seconds. And SETDPMSLPEXT also does nothing in abnormal DPM.

Children
No Data