Skip to content

新版本2.0.0-beta.1测出2个的问题 (IDFGH-13697) #73

Open
@guo652917087

Description

@guo652917087

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate.
  • Provided a clear description of your suggestion.
  • Included any relevant context or examples.

Issue or Suggestion Description

1、modbus tcp slave的问题。使用modbus poll工具,只要连接到4-5个,就出现连接好几种致命问题,包括socket导致tcp task卡死,系统看门狗报错没及时喂狗,换到旧版本就正常。
2.使用2个modbus rtu master,esp32s3模块,使用UART1和UART2,两个串口同时工作时,不能收到RS485的数据。

调试发现:在port_serial.c文件,153行,修改
LOG为INFO,ESP_LOGI(TAG, "%s, data event, len: %d.", port_obj->base.descr.parent_name, (int)event.size);
直接用模块,串口线接到RX、TX,往esp32s3模块发串口数据,经常不能触发收到消息的这段代码打印(偶尔反复重启后有打印)。但是如果主动调用uart_read_bytes去读取串口收取数据,一直能收到。
从这里判断在port_serial.c文件,240行:
err = uart_driver_install(pserial->ser_opts.port, MB_BUFFER_SIZE, MB_BUFFER_SIZE,
MB_QUEUE_LENGTH, &pserial->uart_queue, MB_PORT_SERIAL_ISR_FLAG);

这里注册使用串口中断收取数据,不能正确触发,也就是不能收到数据。
回到RS485板子上,在调用mbc_master_send_request后,一直超时。但是主动uart_read_bytes去读取数据解码,数据返回是正确的。

已经试过 CONFIG_FMB_TIMER_USE_ISR_DISPATCH_METHOD=y 打开或者关闭,依旧没有用,就是uart收取中断失效了。

总结,2.0新版本modbus RTU,串口收取中断无效!!!!我看旧版本队列使用全局变量 static QueueHandle_t xMbUartQueue;,新版本动态分配内存,这样spiram的内存,会不会中断失效呢?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions