Search found 133 matches

by meowsqueak
Mon Sep 04, 2017 10:05 pm
Forum: General Discussion
Topic: LWIP read() blocks CPU
Replies: 3
Views: 1082

Re: LWIP read() blocks CPU

I've confirmed my own error by simplifying my code, switching to "single CPU" mode, and also printing the Core ID to be sure, and a blocking read does not suspend all tasks on the CPU. I think my original problem was related to task priority or a blocked queue. Thanks for the response and sorry for ...
by meowsqueak
Mon Sep 04, 2017 6:08 am
Forum: General Discussion
Topic: Advice on application architecture - Sensors/WiFi/MQTT
Replies: 13
Views: 3680

Re: Advice on application architecture - Sensors/WiFi/MQTT

After realising above that only the read/write bit transactions are timing sensitive and need protection, I moved my top-level taskENTER_CRITICAL calls to wrap just the bit read/write - this means that interrupts get disabled/enabled much more often, but for a significantly shorter period of time ov...
by meowsqueak
Mon Sep 04, 2017 5:34 am
Forum: General Discussion
Topic: Advice on application architecture - Sensors/WiFi/MQTT
Replies: 13
Views: 3680

Re: Advice on application architecture - Sensors/WiFi/MQTT

https://github.com/nodemcu/nodemcu-firmware/blob/dev-esp32/components/platform/onewire.c There's one thing I don't understand about that code - when reading bits around line 378 the pin is put into INPUT mode (via onewire_rmt_attach_pin, line 200), then at 381 the wire is put into open-drain mode, ...
by meowsqueak
Mon Sep 04, 2017 5:13 am
Forum: General Discussion
Topic: Advice on application architecture - Sensors/WiFi/MQTT
Replies: 13
Views: 3680

Re: Advice on application architecture - Sensors/WiFi/MQTT

https://github.com/nodemcu/nodemcu-firmware/blob/dev-esp32/components/platform/onewire.c Thanks for that - looking at the code I can see that it uses the RMT to handle each "bit slot" - that makes a lot more sense as I was thinking that I needed to protect the entire byte as "time critical" - but i...
by meowsqueak
Mon Sep 04, 2017 4:36 am
Forum: General Discussion
Topic: Advice on application architecture - Sensors/WiFi/MQTT
Replies: 13
Views: 3680

Re: Advice on application architecture - Sensors/WiFi/MQTT

That's an interesting idea. I looked at the TRM (chapter 12) to understand how it works. Unfortunately, I'm not sure it's usable in this scenario, because the 1-Wire protocol requires the CPU to drive the wire for a period of time, and then immediately put the pin into input mode in anticipation of ...
by meowsqueak
Mon Sep 04, 2017 4:14 am
Forum: General Discussion
Topic: JTAG debuggers
Replies: 24
Views: 7534

Re: JTAG debuggers

In general, how reliable should debugging via JTAG be on this platform? I'm not sure whether I've got it working as well as to be expected. I've managed to get my JTAG debugger (BusPirate v2go, v7.0 firmware) talking to the special ESP32 version of OpenOCD, and I've even been able to run GDB remotel...
by meowsqueak
Mon Sep 04, 2017 1:01 am
Forum: General Discussion
Topic: LWIP read() blocks CPU
Replies: 3
Views: 1082

Re: LWIP read() blocks CPU

I'll put together a small example and share that soon. It will also help me to verify that I'm not making a mistake elsewhere. I'll report back when it's available.
by meowsqueak
Mon Sep 04, 2017 12:28 am
Forum: General Discussion
Topic: Advice on application architecture - Sensors/WiFi/MQTT
Replies: 13
Views: 3680

Advice on application architecture - Sensors/WiFi/MQTT

I'd like to ask if anyone can help me figure out the "best practice" architecture for my relatively simple ESP32 application please. I'm using the ESP-IDF with C, on a "DOIT" ESP32 board. I have a OneWire bus with five DS18B20 temperature sensors attached, and my testing with these shows the set-up ...
by meowsqueak
Sun Sep 03, 2017 11:58 pm
Forum: General Discussion
Topic: vTaskSuspendAll on Core0 halt tasks on Core1 too
Replies: 2
Views: 1378

Re: vTaskSuspendAll on Core0 halt tasks on Core1 too

I'm not sure if it's related, but I'm calling vTaskSuspendAll() to ensure no task switch while in the middle of a timing-sensitive GPIO bit-bash routine (followed by xTaskResumeAll()), and the LWIP stack continues to run (so is presumably running on the other CPU) but then asserts: components/freert...
by meowsqueak
Sun Sep 03, 2017 9:46 pm
Forum: General Discussion
Topic: LWIP read() blocks CPU
Replies: 3
Views: 1082

LWIP read() blocks CPU

I'm trying to integrate the ESP-MQTT library with my ESP-IDF application, which uses FreeRTOS. https://github.com/tuanpmt/espmqtt My application has two tasks - one collecting sensor data, the other publishing this data via MQTT to an external broker. In addition, there needs to be a way for MQTT su...

Go to advanced search