ESP32 multiprocessing with two I2C communication channels

dmr-rocha
Posts: 4
Joined: Thu Jun 02, 2022 1:59 pm

ESP32 multiprocessing with two I2C communication channels

Postby dmr-rocha » Wed Jun 15, 2022 12:51 am

Hello!

I'm doing a project in which I use the two processors separately and two I2C channels ( TwoWire ), where in each processor I use an I2C channel.

The Zero Processor is used for sensor reading routines through the I2C channel (INA219, BME680, ADS1115, DS1302), storing the values in global variables .

The Processor A use for the other routines and control of the LCD and keyboard, both I2C and demonstration of the values of the global variables .

In the compilation everything works , but after turning on Esp32 it works for a few seconds and then crashes.

I'm using I2C as follows :

TwoWire I2C_1 = TwoWire ( 0);
TwoWire I2C_2 = TwoWire ( 1);

I2C_ 1.begin (21, 22, 100000);
I2C_ 2.begin (15, 4, 100000);

The Processors I am creating as follows :

xTaskCreatePinnedToCore ( CoreZero , " CoreZero ", 16392, NULL, 5, NULL, 0);
delay ( 500);

xTaskCreatePinnedToCore ( CoreOne , " CoreOne ", 16392, NULL, 5, NULL, 1);
delay ( 500);

void loop( ) {

vTaskDelete ( NULL);

}

Observation:

The processors being used one without routine in the other works perfectly, however the two connected together does not work.

I need help trying to clarify the problem and whoever helps me to clarify I will give a payment.

Thanks.
Attachments
bug.txt
(2.01 KiB) Downloaded 146 times
1655252881383.jpg
1655252881383.jpg (3.87 MiB) Viewed 1154 times
1655252881396.jpg
1655252881396.jpg (3.99 MiB) Viewed 1154 times

ESP_Sprite
Posts: 9052
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 multiprocessing with two I2C communication channels

Postby ESP_Sprite » Wed Jun 15, 2022 1:17 am

Can you post your (full) code?

User avatar
gtjoseph
Posts: 81
Joined: Fri Oct 15, 2021 10:55 pm

Re: ESP32 multiprocessing with two I2C communication channels

Postby gtjoseph » Wed Jun 15, 2022 11:00 am


Who is online

Users browsing this forum: No registered users and 196 guests