Search found 621 matches

by PeterR
Thu Feb 25, 2021 7:05 pm
Forum: General Discussion
Topic: Creating users with different access levels to set parameters on my ESP32
Replies: 5
Views: 3586

Re: Creating users with different access levels to set parameters on my ESP32

Webserver. RESTful needs a webserver and is about how the interface is presented and manipulated really rather than being an answer itself (e.g. I could use HTTP GET to update parameters but that is not RESTful). Lets say that your webserver is index.html with linked pages /users.html and /parameter...
by PeterR
Wed Feb 24, 2021 5:40 pm
Forum: General Discussion
Topic: ESP32 uart event example not able to compile as CPP
Replies: 3
Views: 3788

Re: ESP32 uart event example not able to compile as CPP

C++ is not C! C++17 even removes trigraths although I think ESP toolchain is C++11/14 ATM. Won't be long though. Also you might have different compiler flags in your make file from C to CPP. I often do. I would say that C++ warnings and errors are there for a reason. Code developed in C might miss t...
by PeterR
Tue Feb 16, 2021 11:18 pm
Forum: General Discussion
Topic: multi-thread I2C synchronization
Replies: 11
Views: 17713

Re: multi-thread I2C synchronization

Like Wifi says, mutex. May add an extra mutex but cost is low and you can sleep safe. Its not normal to use a device/driver from multiple threads. If the driver has to cover these RT bases then the driver would get fat and slow. So best that these particular use/cases are handled at the application ...
by PeterR
Tue Feb 16, 2021 11:08 pm
Forum: General Discussion
Topic: ESP32 as SPI to WiFi bridge
Replies: 2
Views: 3895

Re: ESP32 as SPI to WiFi bridge

Hey, Your post is not very clear: I have Host MCU with LwIP stack which creates complete WiFi frames What is a 'complete Wifi frame' & how does having a complete Wifi frame relate to your problem? but this variant suggesting to use AT commands over SPI, and i already have completed TCP/IP packages, ...
by PeterR
Fri Feb 12, 2021 11:49 am
Forum: ESP-IDF
Topic: MQTT problem
Replies: 6
Views: 7824

Re: MQTT problem

There is a lot to go wrong from an MQTT client to a remote server! Looks like you timeout, no response (CONACK) from server. As I remember it the 'transport_read() error' indicates no data returned. There were a couple of similar reports though so I modified the error report for clarity. If so then ...
by PeterR
Thu Feb 11, 2021 1:34 pm
Forum: General Discussion
Topic: Dual Core access to memory
Replies: 5
Views: 4465

Re: Dual Core access to memory

If; (a) ESP32, (b) 32 bit or less read/writes, (c) one task only reads, one task only writes and (d) DRAM memory then you will be ok.

You will understand why you might not be ok if you used PSRAM.

Personally I would use both belt and braces and so std::atomic.
by PeterR
Thu Feb 11, 2021 10:59 am
Forum: General Discussion
Topic: Dual Core access to memory
Replies: 5
Views: 4465

Re: Dual Core access to memory

OK. That makes sense. 1) Obviously the ADC would have to be 32 bits or less. 2) As long as you are using DRAM, write/read in an atomic unit then that's fine (e.g. uint32_t results = reading; rather than memcpy) A 24bit ADC might not work with certain optimisations e.g. if you pack the array. I would...
by PeterR
Wed Feb 10, 2021 10:23 pm
Forum: General Discussion
Topic: Dual Core access to memory
Replies: 5
Views: 4465

Re: Dual Core access to memory

It does not matter if the data is out of sync for a while It is not clear what you mean by this. Am I correct? It depends but I would say no. I am sure that you understand the multitasking issues. Its easy to overlook execution order issues however: https://www.modernescpp.com/index.php/sequential-...
by PeterR
Wed Feb 10, 2021 10:00 pm
Forum: ESP-IDF
Topic: SPI delay time between transactions.
Replies: 3
Views: 4310

Re: SPI delay time between transactions.

80uS is a little more than I would expect. I measured around 20uS with DMA enabled and around 16uS without DMA. I doubt that the OS tick period has much to do with this, 80uS is much faster than any reasonable scheduler tick. The main issue is that the SPI driver reprograms the hardware when you sta...
by PeterR
Mon Jan 18, 2021 11:57 pm
Forum: General Discussion
Topic: SDS011 particle sensor
Replies: 5
Views: 5503

Re: SDS011 particle sensor

What do you have connected to 5V vin i.e. what power source? The device needs around 70mA & so should be good with most power supplies. ESP gets a little dodgy on USB power when running hot and with peripherals. An external PSU is recommended. Is the device 5V or 3.3V logic? You might need level shi...