Hi,
Somehow the thread " https://www.dialog-semiconductor.com/support-posts/da16200-mqtt-dpm " was bricked.
So opening this new one.
"""PM_Dialog
Hi Premsai,
According to our Team internally, we need some extra info regarding that issue. Please check below.
1. dpm status
2. mqtt configuration
Can you please share that screenshots from your side?
Regards,
PM_Dialog"""
Reply:
Since i'm not allowed to share confidential information some of the info are masked.Please find the snapshots.
Prem Sai
Thanks for the support.
From the testing i had from my end I could find at some time (say 1-3 times when tested for 12 Hrs) the DA16200 module wake up from DPM and accordingly wakes up HOST MCU without any message received .From the debug log i could find some error log from DA16200 ">> ASSERT StackOverflow:mqtt_sub 318 !!!" what does this indicate?
Thanks
Hi Prem Sai,
This means that stack size should be increased. Please try to increase the stack size - refer to section 9.1 Find/Optimize Stack Size for Your Application
https://www.dialog-semiconductor.com/sites/default/files/2021-12/UM-WI-…
Did you solve the wake up issue?
PM_Dialog
"Did you solve the wake up issue? "
>>From the testing i had from my end I could find at some time (say 1-3 times when tested for 12 Hrs) the DA16200 module wake up from DPM and accordingly wakes up HOST MCU without any message received.
"This means that stack size should be increased. Please try to increase the stack size - refer to section 9.1 Find/Optimize Stack Size for Your Application"
>>Is there any AT commands for doing the same?.This is shown when I've used "SDKV3.2.2.0_MQTTPING.zip" and not when "DA16200 DA16600 FreeRTOS SDK Image v3.2.2.0" used.
Please find attached the newly generated image (SDKV3.2.2_MQTT_stacksize.zip) with increased stack size ( from 320 bytes to 1024 bytes).
We ran it on our side and can not see the stack size overflow related message so far.
If you still get the error message, please get the information for stack size and increase it accordingly.
In the meantime, please find a diff file with the changes should be done in the SDK v3.2.2.0. You could apply this modifications in your SW, build the project and genarate your own image.
diff --git a/apps/da16200/get_started/include/user_main/config_generic_sdk.h b/apps/da16200/get_started/include/user_main/config_generic_sdk.h index 3918d79..6733c66 100644 --- a/apps/da16200/get_started/include/user_main/config_generic_sdk.h +++ b/apps/da16200/get_started/include/user_main/config_generic_sdk.h @@ -119,7 +119,7 @@ #undef __SUPPORT_UART2__ // Support UART2 // AT-CMD features - #undef __SUPPORT_ATCMD__ // Support AT-CMD + #define __SUPPORT_ATCMD__ // Support AT-CMD #ifdef __SUPPORT_ATCMD__ #if defined (__BLE_COMBO_REF__) #undef __ATCMD_IF_UART1__ // AT-CMD over UART1 diff --git a/apps/da16200/get_started/include/user_main/sys_common_features.h b/apps/da16200/get_started/include/user_main/sys_common_features.h index 8e8ffde..9e0ace5 100644 --- a/apps/da16200/get_started/include/user_main/sys_common_features.h +++ b/apps/da16200/get_started/include/user_main/sys_common_features.h @@ -288,7 +288,7 @@ #endif //__SUPPORT_WIFI_PROVISIONING__ #undef __SUPPORT_HTTP_SERVER_FOR_ATCMD__ - #undef __SUPPORT_HTTP_CLIENT_FOR_ATCMD__ + #define __SUPPORT_HTTP_CLIENT_FOR_ATCMD__ #undef __SUPPORT_LMAC_RF_CMD__ // lmac/rf feature commands #undef __SUPPORT_PERI_CMD__ // peri. feature commands diff --git a/apps/da16200/get_started/src/user_main/system_start.c b/apps/da16200/get_started/src/user_main/system_start.c index 08564a6..2967d47 100644 --- a/apps/da16200/get_started/src/user_main/system_start.c +++ b/apps/da16200/get_started/src/user_main/system_start.c @@ -443,6 +443,7 @@ void config_gpio_button(void) } +#include "dpmrtm_patch.h" void trigger_mcu_wakeup_gpio(void) { #if defined ( __TRIGGER_DPM_MCU_WAKEUP__ ) @@ -450,7 +451,9 @@ void trigger_mcu_wakeup_gpio(void) UINT32 pin; UINT16 write_data; - if (dpm_mode_is_enabled() == TRUE && dpm_mode_is_wakeup() == TRUE) { + struct dpm_param *dpmp = GET_DPMP(); + + if (dpm_mode_is_enabled() == TRUE && dpmp->st.status == DPM_ST_UC) { _da16x_io_pinmux(PIN_FMUX, FMUX_GPIO); gpio = GPIO_CREATE(GPIO_UNIT_A); diff --git a/core/system/src/common/main/sys_apps.c b/core/system/src/common/main/sys_apps.c index 4a3cb38..4ced24c 100644 --- a/core/system/src/common/main/sys_apps.c +++ b/core/system/src/common/main/sys_apps.c @@ -780,7 +780,7 @@ static const app_task_info_t sys_apps_table[] = #endif // __SUPPORT_DPM_EXT_WU_MON__ #if defined ( __SUPPORT_MQTT__ ) - { APP_MQTT_SUB, mqtt_auto_start, 320, (tskIDLE_PRIORITY + 7), TRUE, TRUE, UNDEF_PORT, RUN_STA_MODE }, + { APP_MQTT_SUB, mqtt_auto_start, 1024, (tskIDLE_PRIORITY + 7), TRUE, TRUE, UNDEF_PORT, RUN_STA_MODE }, #endif // __SUPPORT_MQTT__ #if defined ( __HTTP_SVR_AUTO_START__ )
Question : can you please let us know which functions are you currently using on your project?
Best regards,
Thanks for the detailed support.
I've used SDKV3.2.2_MQTT_stacksize.zip and so far the issues are clear.Interrupt is received only when message received via MQTT.
>>> Currently we are using only AT commands to do the following functionality
>MQTT for IoT.
>DPM mode and as Wake up source of HOST MCU.
Η Prem Sai,
Gald that is working. With regards to your follow up question, please refer to the diff file. The example that with all the modifications has been shared with you.