-
Notifications
You must be signed in to change notification settings - Fork 644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bus is in Slave Mode with Arduino core for the ESP32 release v2.0.1 #360
Comments
Hi whogarden, I'm having the same issue now, has yours resolved yet? |
Hi speedlao, |
Thanks for the reply. my problem solved just now. In my case is using u8g2 lib for SSD1306 OLED. So, have a nice day, cheers! |
I have the same problem on Heltec LoRa32 v2. [ 28][E][Wire.cpp:283] setClock(): Bus is in Slave Mode |
Hi Logos7 |
I used u8g2 lib for SSD1306 OLED. I used the following type: U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(SCL_OLED, SDA_OLED, RST_OLED); |
bool TwoWire::setClock(uint32_t frequency)
{
esp_err_t err = ESP_OK;
#if !CONFIG_DISABLE_HAL_LOCKS
//acquire lock
if(lock == NULL || xSemaphoreTake(lock, portMAX_DELAY) != pdTRUE){
log_e("could not acquire lock");
return false;
}
#endif
if(is_slave){
log_e("Bus is in Slave Mode");
err = ESP_FAIL;
} else {
err = i2cSetClock(num, frequency);
}
#if !CONFIG_DISABLE_HAL_LOCKS
//release lock
xSemaphoreGive(lock);
#endif
return (err == ESP_OK);
} |
Sorry, something went wrong with line endings... |
In your Heltec LoRa32 v2, I can see that |
Yes. |
And did you set the correct level on gpio16 (oled rst)? |
Yes. Even reset it manually... |
without your code, I am unable to help you further... |
see |
Thank you he played a role for me. |
A variant for the begin method has been included in the ESP32 Wire library.
If we try to make the following call:
The compiler will find that the call to the begin method will detect that its first parameter is of type byte (uint8_t), therefore it will consider that the variant to call is the second...ERROR.
Cheers |
Bonjour et merci pour l'astuce. |
Describe the bug
Nothing is displayed on an oled sh1106 with
ESP32 dev board
SSD1306SimpleDemo.ino (it's your example code)
To Reproduce
I use
ESP32 dev board
An SH1106
Wire sda to gpio21, scl to gpio22
Flash SSD1306SimpleDemo.ino with Arduino core for the ESP32 release v2.0.1
an nothing is displayed on the oled screen.
If I go back to Arduino core for the ESP32 release v2.0.0, it's working
Sample code
Provide a MCVE below.
Expected behavior
Debug level "Debug"
[ 10][I][esp32-hal-i2c-slave.c:234] i2cSlaveInit(): Initialising I2C Slave: sda=22 scl=22 freq=100000, addr=0x15
[ 11][D][esp32-hal-i2c-slave.c:494] i2c_slave_set_frequency(): Fifo thresholds: rx_fifo_full = 28, tx_fifo_empty = 4
[ 28][E][Wire.cpp:283] setClock(): Bus is in Slave Mode
[ 33][E][Wire.cpp:308] beginTransmission(): Bus is in Slave Mode
[ 39][E][Wire.cpp:331] endTransmission(): Bus is in Slave Mode
[ 45][E][Wire.cpp:308] beginTransmission(): Bus is in Slave Mode
[ 51][E][Wire.cpp:331] endTransmission(): Bus is in Slave Mode
[ 57][E][Wire.cpp:308] beginTransmission(): Bus is in Slave Mode
[ 63][E][Wire.cpp:331] endTransmission(): Bus is in Slave Mode
[ 68][E][Wire.cpp:308] beginTransmission(): Bus is in Slave Mode
[ 74][E][Wire.cpp:331] endTransmission(): Bus is in Slave Mode
[ 80][E][Wire.cpp:308] beginTransmission(): Bus is in Slave Mode
Additional context
Compile wire used :
Wire version 2.0.0 dans le dossier: C:\Users\me\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.1\libraries\Wire
The text was updated successfully, but these errors were encountered: