Search found 6 matches

by chofsass
Fri May 01, 2020 11:43 pm
Forum: General Discussion
Topic: Dual Core Synchronization
Replies: 10
Views: 1345

Re: Dual Core Synchronization

could Arduino's Wire library not be multi core safe for some reason?
by chofsass
Fri May 01, 2020 11:35 pm
Forum: General Discussion
Topic: Dual Core Synchronization
Replies: 10
Views: 1345

Re: Dual Core Synchronization

The class implements scope guard (RAII) pattern so the lock is acquired when the constructor is called and released when the destructor is called. If you look in the code you can see that I am caching the error in a map _failures[_tag]++; for reporting later. So, I think I have a pretty good lead on...
by chofsass
Fri May 01, 2020 7:27 pm
Forum: General Discussion
Topic: Dual Core Synchronization
Replies: 10
Views: 1345

Re: Dual Core Synchronization

#include "STI2c.h" #include "SMCommon.h" #include "Wire.h" #define TRACKER() printf("[I2C TRACKER] %u\n", __LINE__); std::map<uint8_t, std::string> I2cErrorNameLookup = { { i2c_err_t::I2C_ERROR_OK, "I2C_ERROR_OK" }, { i2c_err_t::I2C_ERROR_DEV, "I2C_ERROR_DEV" }, { i2c_err_t::I2C_ERROR_ADDR_NACK, "I...
by chofsass
Fri May 01, 2020 3:20 pm
Forum: General Discussion
Topic: Dual Core Synchronization
Replies: 10
Views: 1345

Re: Dual Core Synchronization

Okay, what is your question? Also, it may help if you post your source code and are more precise than 'lots of errors'. Sorry let me be more clear. So, I am using the I2C bus on one core (CORE_0) across multiple task on the same core. I am using the xSemaphoreCreateMutex() function provided by free...
by chofsass
Thu Apr 30, 2020 7:49 pm
Forum: General Discussion
Topic: Dual Core Synchronization
Replies: 10
Views: 1345

Dual Core Synchronization

I have multiple tasks on the same core accessing the I2C bus using a freeRTOS mutex for synchronization an that is working. But once I try to use the I2C bus from a task on a different core I get a lot of errors. I am guessing this is a synchronization issue but I'm not sure. I have tried to use a c...
by chofsass
Mon Apr 06, 2020 3:47 pm
Forum: ESP32 IDF
Topic: Power Management - Automatic Light Sleep - Issues
Replies: 1
Views: 506

Power Management - Automatic Light Sleep - Issues

Hi, I am using esp-idf v3.3.1. I have setup automatic light sleep and I have 2 issues. The first issue is that the tick counter is shifting by about 10 milliseconds of a one second period. The second is that the printf() function which is using the UART doesn't appear to be sleep safe (the UART is d...

Go to advanced search