cancel
Showing results for 
Search instead for 
Did you mean: 

What are the potential causes cab be when combining the MQTT client, HTTPD, and FreeRT

DK.7
Senior

Problem: The project MQTT client + HTTPD + FreeRTOS = HardFault!  (STM32F767ZI - nucleo)

If only the MQTT client + FreeRTOS are used, everything works fine.
If only the HTTPD + FreeRTOS are used, everything works fine.

The MQTT client + FreeRTOS work fine, but as soon as we initialize HTTPD, the project hangs after 10-180 minutes.
Moreover, HTTPD web server is in minimal configuration.

In FreeRTOSConfig.h variables were increased:
#define configTOTAL_HEAP_SIZE ((size_t)150000) (MQTT client + FreeRTOS or HTTPD + FreeRTOS works fine individually, even with HEAP = 30,000! However, when combined, it results in a HardFault error!)
In lwipopts.h, the following was increased:
#define MEM_SIZE 1024*30
#define MEMP_NUM_SYS_TIMEOUT (LWIP_NUM_SYS_TIMEOUT_INTERNAL + 1)
#define TCP_MSS 1460
#define MEMP_NUM_TCP_SEG 17
#define MQTT_OUTPUT_RINGBUF_SIZE 1024
#define MQTT_REQ_MAX_IN_FLIGHT 10

1 REPLY 1