OLED SSD1306 I2C Address

For general Flowcode discussion that does not belong in the other sections.
gregobac
Posts: 9
http://meble-kuchenne.info.pl
Joined: Fri Sep 10, 2021 8:59 am
Been thanked: 1 time

Re: OLED SSD1306 I2C Address

Post by gregobac »

I tried to add the print 'test' in the loop. The problem is same.
Else, in I2C software emulation, i detect an activity on the I2C bus ( GPIO 22 and 21 ). The default frequency is 1 Khz. Oled screen wakes up with a random plot pixel .
The watchdog reset the ESP32 every 4 seconds.

With the Hardware configuation , there are no activity on the I2C bus , and this error message is send in loop by COM :
" [0;31mE (383) i2c: i2c_master_cmd_begin(1166): i2c driver not installed[0m "

LeighM
Valued Contributor
Posts: 394
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 69 times
Been thanked: 208 times

Re: OLED SSD1306 I2C Address

Post by LeighM »

What hardware module are you using?
As Martin said, have you first done a simple LED flash project?
This checks that the device/project is configured correctly.

gregobac
Posts: 9
Joined: Fri Sep 10, 2021 8:59 am
Been thanked: 1 time

Re: OLED SSD1306 I2C Address

Post by gregobac »

My Hardware is an ESP WROOM 32.
Yes , the LED test is OK.
With the simple TEST I2C ESP32 program, with channel in software mode, i can read the activity on the oscilloscope .
With channel in channel 1 or 2 mode, there are no activity.
Attachments
TEST I2C ESP32.fcfx
(8.12 KiB) Downloaded 104 times

BenR
Matrix Staff
Posts: 1706
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: OLED SSD1306 I2C Address

Post by BenR »

Hello,

Your test won't work on the ESP32 hardware as the I2C on the ESP32 device has to be done in transaction mode. It's a common limitation of the hardware and seen on a lot of more modern powerful devices.

This might be a better test.
TEST I2C ESP32.fcfx
(8.84 KiB) Downloaded 119 times
I've checked the SSD1306 I2C LCD component and it looks like it's already using the transaction mode so this should be working correctly. In fact we have moved all i2c related components over to using transactions now so that ESP32, RPI and ST Arm will work as expected.

gregobac
Posts: 9
Joined: Fri Sep 10, 2021 8:59 am
Been thanked: 1 time

Re: OLED SSD1306 I2C Address

Post by gregobac »

Thank you Ben,

I've updated libraries, but i have always the error message in debug COM port :

[0;31mE (372) i2c: i2c_param_config(647): i2c clock choice is invalid, please check flag and frequency[0m
[0;31mE (382) i2c: i2c_master_cmd_begin(1166): i2c driver not installed[0m

No activity in Hardware I2C mode

More, i have these error in Component Debugger :

Image

MJU20
Posts: 237
Joined: Tue Dec 08, 2020 5:11 pm
Has thanked: 75 times
Been thanked: 50 times

Re: OLED SSD1306 I2C Address

Post by MJU20 »

Any news on this one?

I've tried an SSD1306 OLED on the ESP32 Wroom and nothing works.
I've got pull up resistors on the SDA/SDL from 10k.

Tried several settings for the I2C speed, I use a few IO's for the software I2C.

The display sometimes gives me a result ("Test"), but most of the time it is busy doing strange things.
Sometimes there is no activity, sometimes it switches on random pixels and starts clearing the display (slowly) column by column.
After a while my text is shown.

It takes about 5 seconds after power up to see the first signs of life on the display.
Strange.

I see that the watchdog timer is been triggered every 4 seconds.
Tried to switch this of in idf.py but still the watchdog is triggered.

Any more suggestions?

LeighM
Valued Contributor
Posts: 394
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 69 times
Been thanked: 208 times

Re: OLED SSD1306 I2C Address

Post by LeighM »

The "I2Ç clock choice" bug has recently been fixed, could you try a full component library update and try again

MJU20
Posts: 237
Joined: Tue Dec 08, 2020 5:11 pm
Has thanked: 75 times
Been thanked: 50 times

Re: OLED SSD1306 I2C Address

Post by MJU20 »

I update the library almost every time I use FC (these days, every day).

So this post was written with the last updates and there are no more updates available.
I flashed the project again with no updates available and nothing changes..

LeighM
Valued Contributor
Posts: 394
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 69 times
Been thanked: 208 times

Re: OLED SSD1306 I2C Address

Post by LeighM »

Have you got a delay icon in your main program loop?
This usually keeps the watchdog (and task scheduler) happy.
Otherwise, you might need to post a program that demonstrates the issue and hopefully someone can take a look.
I can't at the moment (didn't bring laptop on caravan holiday :D

MJU20
Posts: 237
Joined: Tue Dec 08, 2020 5:11 pm
Has thanked: 75 times
Been thanked: 50 times

Re: OLED SSD1306 I2C Address

Post by MJU20 »

Hi Leigh,

The FC program looks like this at the moment:
Nieuw-1.jpg
Nieuw-1.jpg (133.87 KiB) Viewed 2076 times
This is how it's at this moment, I've been fondling with settings all the time.
Including changing stuff in the sdkconfig file.

Have a nice holiday!

(in my house it's now 22°C, outside it's 32°C so i'm staying in) :mrgreen:

Post Reply