Issues with using multiprocessing and TwoWire I2C
Posted: Thu Jun 02, 2022 2:04 pm
Good Morning!
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.
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.