micro-ROS / freertos_apps

Sample applications for FreeRTOS + micro-ROS
Apache License 2.0
81 stars 50 forks source link

[BUG] UDP transport with stm32f767zi hangs after a while, and network disconnected. #96

Closed ZhenshengLee closed 2 years ago

ZhenshengLee commented 2 years ago

Issue template

Steps to reproduce the issue

https://github.com/ZhenshengLee/ros2_mcu/tree/master/libs/custom_stm32f767zi

compile and flash with udp configuration. colcon.meta is https://github.com/ZhenshengLee/ros2_mcu/blob/master/mcu_ws/colcon.meta app-colcol.meta is https://github.com/ZhenshengLee/ros2_mcu/blob/master/apps/int32_publisher/app-colcon.meta

Expected behavior

ping stm32 device success, udp connectiong success, with agent output info. as long as possible.

Actual behavior

ping failer, and udp connection hangs, agent output hangs. After a period of time, around 500s

Additional information

This issue may be related with https://github.com/micro-ROS/micro_ros_setup/issues/295 https://github.com/micro-ROS/micro_ros_setup/issues/469 https://github.com/micro-ROS/freertos_apps/issues/40

the STM32 auto-generated code is by using STM32CubeMX 6.4.0 and Firmware v1.16.0

ZhenshengLee commented 2 years ago

I tried to change FreeRTOSConfig.h and main.c accoring to https://github.com/micro-ROS/freertos_apps/issues/40#issuecomment-736597706

But did't solve that.

Acuadros95 commented 2 years ago

@ZhenshengLee Please increase the value of INTERFACE_THREAD_STACK_SIZE 500 here: LWIP/Target/ethernetif.c#L42 and give feedback.

ZhenshengLee commented 2 years ago

@ZhenshengLee Please increase the value of INTERFACE_THREAD_STACK_SIZE 500 here: LWIP/Target/ethernetif.c#L42 and give feedback.

@Acuadros95 I changed INTERFACE_THREAD_STACK_SIZE from 350 to 1350. It seems work. And I will give it a long-term test.

ZhenshengLee commented 2 years ago

@Acuadros95

24-hour int32_publisher through udp test successed. Closing this.