Hi,
looking at the traces from the logic analyzer I see that the one I did on the Teensy show a very stable 100KHz clock signal. On the trace I did on the ESP32 the clock signal is more like 98-99kHz, and does have some weird ticks, like for instance the 65kHz tick in the screenshot below.
With regards to the FreeRTOS tick period, it is set to 100, which I assume is the default since I haven't changed it.
Issues with I2C? Only 1 of 4 devices found by i2cscanner.c
Re: Issues with I2C? Only 1 of 4 devices found by i2cscanner.c
Aha ... and THERE is the issue ... the current FreeRTOS Tick rate is 1000HZ, 1KHz or 1 tick per milliseconds ... see:
https://github.com/espressif/esp-idf-te ... onfig#L126
So what this means is that your sdkconfig/make menuconfig is not the default with respect to the latest available ESP-IDF-Template.
When creating new projects, I do not recommend copying an existing project from your file system and then tweaking it. Rather, extract/download the latest ESP-IDF-Template for each new project you build.
https://github.com/espressif/esp-idf-te ... onfig#L126
So what this means is that your sdkconfig/make menuconfig is not the default with respect to the latest available ESP-IDF-Template.
When creating new projects, I do not recommend copying an existing project from your file system and then tweaking it. Rather, extract/download the latest ESP-IDF-Template for each new project you build.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Issues with I2C? Only 1 of 4 devices found by i2cscanner.c
Aha, very nicely troubleshooted.
I did infact copy this folder based from a previous project. The template I'm working out from is about 25 days old, did the default value get changed more recently than that?
I did infact copy this folder based from a previous project. The template I'm working out from is about 25 days old, did the default value get changed more recently than that?
Re: Issues with I2C? Only 1 of 4 devices found by i2cscanner.c
Interestingly, if we select the line and then click blame ... direct link here:
https://github.com/espressif/esp-idf-te ... onfig#L126
We see that the line has never changed from its original value created on 2016-08-18. However, that doesn't mean that something else somewhere in the repository didn't over-ride that value.
https://github.com/espressif/esp-idf-te ... onfig#L126
We see that the line has never changed from its original value created on 2016-08-18. However, that doesn't mean that something else somewhere in the repository didn't over-ride that value.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
-
- Posts: 27
- Joined: Sun Jan 01, 2017 9:21 pm
Re: Issues with I2C? Only 1 of 4 devices found by i2cscanner.c
I noticed a reliability aspect during my endurance test of the MCP23017. After several hours the "flashing of leds "stops" while the I2C digitaWrite() receives the correct information. The rest of the endurance test (Oled displays) and more works as expected. Never used RTOS so my first concern was RTOS. Several tasks sending messages via a queue to MCP and Oleds works like a charm.
Reading this forum I checked the generic_i2c_rw.h and it defines following:
/* this is just a timeout. It doesn't actually wait 1 second */
#define BEGIN_TIMEOUT (1000 / portTICK_RATE_MS)
Following the discussion this timeout is very generous.
I added "extra" pullups for the I2C and wait .........yes I don't have a good scope
Thx for the excellent works for MCP and Oled!
Reading this forum I checked the generic_i2c_rw.h and it defines following:
/* this is just a timeout. It doesn't actually wait 1 second */
#define BEGIN_TIMEOUT (1000 / portTICK_RATE_MS)
Following the discussion this timeout is very generous.
I added "extra" pullups for the I2C and wait .........yes I don't have a good scope
Thx for the excellent works for MCP and Oled!
Jan Jansen
Amsterdam
The Netherlands
Amsterdam
The Netherlands
Who is online
Users browsing this forum: Google [Bot], noweare and 189 guests