Right! I send and recive very short messages (2-4 bytes) so the overhead is very high.
uart_set_rx_timeout(SERIAL_PORT, 0); => Fails
uart_set_rx_timeout(SERIAL_PORT, 1); => 14 messages/s
uart_set_rx_timeout(SERIAL_PORT, 2); => 14 messages/s
uart_set_rx_timeout(SERIAL_PORT, 10); => 7 messages/s
uart ...
Search found 44 matches
- Thu Mar 06, 2025 1:21 pm
- Forum: ESP-IDF
- Topic: Serial write-read slower than expected
- Replies: 5
- Views: 3689
- Wed Mar 05, 2025 4:39 pm
- Forum: ESP-IDF
- Topic: Serial write-read slower than expected
- Replies: 5
- Views: 3689
Re: Serial write-read slower than expected
Still having the same problem, using this row takes two or three times the above script
buf_idx = uart_read_bytes(SERIAL_PORT, buf, len, to);
TickType_t t = xTaskGetTickCount();
uart_dev_t* uart_reg = (uart_dev_t*) REG_UART_BASE(SERIAL_PORT);
while (buf_idx < len) {
if (uart_reg->status.rxfifo ...
buf_idx = uart_read_bytes(SERIAL_PORT, buf, len, to);
TickType_t t = xTaskGetTickCount();
uart_dev_t* uart_reg = (uart_dev_t*) REG_UART_BASE(SERIAL_PORT);
while (buf_idx < len) {
if (uart_reg->status.rxfifo ...
- Tue Feb 04, 2025 10:47 am
- Forum: IDEs for ESP-IDF
- Topic: Use a GUI debugger for VSCode and gdbStub (idf monitor)
- Replies: 0
- Views: 3044
Use a GUI debugger for VSCode and gdbStub (idf monitor)
Hello,
i'm using latest esp-idf and vsCode and its extension to build and flash software.
I don't have a JTAG interface but I read I can enable ESP_SYSTEM_GDBSTUB_RUNTIME to debug using program serial.
I did that, now when i click Ctrl+C in "idf monitor" (automatically started by VSCode using the ...
i'm using latest esp-idf and vsCode and its extension to build and flash software.
I don't have a JTAG interface but I read I can enable ESP_SYSTEM_GDBSTUB_RUNTIME to debug using program serial.
I did that, now when i click Ctrl+C in "idf monitor" (automatically started by VSCode using the ...
- Thu Nov 23, 2023 7:23 am
- Forum: ESP-IDF
- Topic: idf 3.0.9 WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT on good APs
- Replies: 3
- Views: 6772
Re: idf 3.0.9 WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT on good APs
Nope, only a workaround (when fails i try also other aps with same SSID fixing the MAC in the config)
- Mon Sep 04, 2023 9:02 am
- Forum: ESP-IDF
- Topic: Max size for std::vector
- Replies: 1
- Views: 2714
Max size for std::vector
Hello, i'm using large std::vector in my code. In some rare eventualities one of them grow larger than 32k.
My code crashes when i perform a push_back in a vector<u8> that has 32768 elements. If i catch the exception I have std::bad_alloc and it's like libsupc++/new_op.cc @ line 54
I have esp_get ...
My code crashes when i perform a push_back in a vector<u8> that has 32768 elements. If i catch the exception I have std::bad_alloc and it's like libsupc++/new_op.cc @ line 54
I have esp_get ...
- Fri Sep 01, 2023 8:22 pm
- Forum: ESP-IDF
- Topic: Use ota partition to store NVS
- Replies: 0
- Views: 4085
Use ota partition to store NVS
Hello,
I have a data logger that connects to wifi and send data to a server, but server/wifi could goes down and in that case now it stores data in ram sending them as soon as the server is reachable again.
Since I have to store multiple bytes (es 20bytes/s) ram space runs out after few hours (I ...
I have a data logger that connects to wifi and send data to a server, but server/wifi could goes down and in that case now it stores data in ram sending them as soon as the server is reachable again.
Since I have to store multiple bytes (es 20bytes/s) ram space runs out after few hours (I ...
- Tue Aug 29, 2023 7:29 am
- Forum: ESP-IDF
- Topic: Library to print enum names
- Replies: 0
- Views: 1146
Library to print enum names
Hello,
there are a lot of enum in esp-idf and it's a little uncomfortable to print them directly as int for debug, because I must open code or browser to check the meaning of the number.
I uses esp_err_to_name for esp_err_t, but it will be useful to have a similar function for wifi_event_t, wifi ...
there are a lot of enum in esp-idf and it's a little uncomfortable to print them directly as int for debug, because I must open code or browser to check the meaning of the number.
I uses esp_err_to_name for esp_err_t, but it will be useful to have a similar function for wifi_event_t, wifi ...
- Tue Aug 29, 2023 7:00 am
- Forum: ESP-IDF
- Topic: Problem with C++ and derived class
- Replies: 4
- Views: 3406
Re: Problem with C++ and derived class
I found the problem: I forgot a protected prm p; inside prmHandler class header hence the compiler also tried to build a prm::prm() when I build prmHandler.
Sorry for wasting your time
Sorry for wasting your time
- Mon Aug 28, 2023 2:57 pm
- Forum: ESP-IDF
- Topic: Problem with C++ and derived class
- Replies: 4
- Views: 3406
Re: Problem with C++ and derived class
I don't get the point.
since in the code I use
delete prmObj;
i have the error described here , because I must define ~prm as virtual.
Now, when i call "delete prmObj" the compiler switches between ~prm() and ~prmHandler() depending on type of prmObj.
In cpp I have implemented
prm::~prm ...
since in the code I use
delete prmObj;
i have the error described here , because I must define ~prm as virtual.
Now, when i call "delete prmObj" the compiler switches between ~prm() and ~prmHandler() depending on type of prmObj.
In cpp I have implemented
prm::~prm ...
- Fri Aug 04, 2023 2:48 pm
- Forum: ESP-IDF
- Topic: Problem with C++ and derived class
- Replies: 4
- Views: 3406
Problem with C++ and derived class
Hello,
Above a summary of my code:
///////////// .h files /////////////
class prm {
public:
prm(char * a, uint16_t b, bool c, bool d, int e);
virtual ~prm();
...
class prmHandler : public prm{
public:
prmHandler(char * a, uint16_t b, bool c, bool d, int e, std::string f, int g, int h ...
Above a summary of my code:
///////////// .h files /////////////
class prm {
public:
prm(char * a, uint16_t b, bool c, bool d, int e);
virtual ~prm();
...
class prmHandler : public prm{
public:
prmHandler(char * a, uint16_t b, bool c, bool d, int e, std::string f, int g, int h ...