Search found 12 matches

by EarthAndy
Wed Jul 03, 2024 7:38 pm
Forum: ESP-IDF
Topic: Issues with UART controlling Isolated RS485/MODBUS
Replies: 3
Views: 1356

Re: Issues with UART controlling Isolated RS485/MODBUS

SOLVED! I started going over the API docs in detail and found this: The ESP32 UART controllers themselves do not support half-duplex communication as they cannot provide automatic control of the RTS pin connected to the RE/DE input of RS485 bus driver. However, half-duplex communication can be achi...
by EarthAndy
Tue Jul 02, 2024 6:15 pm
Forum: ESP-IDF
Topic: Issues with UART controlling Isolated RS485/MODBUS
Replies: 3
Views: 1356

Re: Issues with UART controlling Isolated RS485/MODBUS

Yes. There is no other circuitry that would pull or hold the TX_en line high. TX goes directly to the isolator TX_in. RX goes directly to the isolator RX_out. TX_en goes directly to the isloator TX_en. Most of the Message packets are properly bracketed by the TX_en (high while the packet is being se...
by EarthAndy
Tue Jul 02, 2024 2:11 pm
Forum: ESP-IDF
Topic: Issues with UART controlling Isolated RS485/MODBUS
Replies: 3
Views: 1356

Issues with UART controlling Isolated RS485/MODBUS

I am currently working with a PCBA that has a esp32s2 chip that uses a UART channel to control a VFD over a simple MODBUS interface. The module is set up to use UART serial that is connected to a RS485 Field Isolator with RX, TX, and TX_enable. When my module sends a packet, it sets TX_enable in ord...
by EarthAndy
Mon Jun 03, 2024 3:19 pm
Forum: ESP-IDF
Topic: MQTT Client causes Chip Hardlock
Replies: 12
Views: 2934

Re: MQTT Client causes Chip Hardlock

I was able to solve my issue by moving some stuff like .bss to the SPIRAM. I did also some changes in the menuconfig, I can post them in a few days, right now I am traveling. But you don’t have SPIRAM, right? Well, maybe it will help somehow. Yeah, this is kind of the path that I'm going down - it ...
by EarthAndy
Mon Jun 03, 2024 3:13 pm
Forum: ESP-IDF
Topic: MQTT Client causes Chip Hardlock
Replies: 12
Views: 2934

Re: MQTT Client causes Chip Hardlock

E.g., this log message "E (5056) McuCanBusChannel_Esp32: FAILED to Queue TWAI Message for Transmit!" before the reboot, is that expected to be happening? If not, I'd first go looking into where/why this happens, checking (error) return values to locate and identify the problem. The TWAI error messa...
by EarthAndy
Fri May 31, 2024 4:04 pm
Forum: ESP-IDF
Topic: MQTT Client causes Chip Hardlock
Replies: 12
Views: 2934

Re: MQTT Client causes Chip Hardlock

Back with a bump and another plea for direction on this issue. I've reached a build where I cannot get MQTT to not-crash with any of my admittedly hacky methods to mitigate the issue. I've mentioned them above, but did not clearly show what I was using to get around this issue. Prepare to be nauseat...
by EarthAndy
Thu May 16, 2024 6:35 pm
Forum: ESP-IDF
Topic: MQTT Client causes Chip Hardlock
Replies: 12
Views: 2934

Re: MQTT Client causes Chip Hardlock

I was just able to catch a hardlock. After I had a build that I knew would lock up, I tried to turn on the Task Watchdog, and see what I could see (and if it would still lock up): I (4896) DEV_MQTT_Client: [DEV] MQTT_EVENT_BEFORE_CONNECT I (4896) MCU_MQTT_Client_ESP32: MCU_MQTT_Client_ESP32 Connecte...
by EarthAndy
Thu May 16, 2024 2:10 pm
Forum: ESP-IDF
Topic: MQTT Client causes Chip Hardlock
Replies: 12
Views: 2934

Re: MQTT Client causes Chip Hardlock

I wasn't able to reproduce a mqtt hardlock in this configuration. It's nearly impossible to say "I want to reproduce it now", it's more of a "well, this build has the problem". Sometimes I can go hours without it showing up, and sometimes I can barely figure out a combination of tweaks to make it wo...
by EarthAndy
Wed May 15, 2024 9:38 pm
Forum: ESP-IDF
Topic: MQTT Client causes Chip Hardlock
Replies: 12
Views: 2934

Re: MQTT Client causes Chip Hardlock

I tried quickly to turn on the Task Watchdogs but that borked all of my TWAI/CAN stuff - TWAI driver quit working altogether. :shock:
by EarthAndy
Tue May 14, 2024 7:27 pm
Forum: ESP-IDF
Topic: MQTT Client causes Chip Hardlock
Replies: 12
Views: 2934

MQTT Client causes Chip Hardlock

I have a system based on an ESP32-S3 (N8) that uses Ethernet and the ESP-IDF MQTT client ) and I experience hardlocks in my system in a way I want to say is intermittent, but happen at the same place in my code in a deterministic manner. PRIV_REQUIRES mqttclient #include "mqtt_client.h" The hardlock...