I am attempting to make a custom driver for the i2c peripheral on the ESP32-S3. I am using the technical document as a guide: https://documentation.espressif.com/esp ... ual_en.pdf
I went through the GPIO and I2C chapters and set the config registers accordingly, and the SCL line is constantly high (I can see the SDA line changing when I set the command registers).
I have made sure to set the SYSTEM_PERIPHERAL_CLK_EN register and reset the SYSTEM_PERIPHERAL_RST_EN registers to be able to modify the internal registers for the i2c peripheral.
I am using pin 7 for the SCL line and pin 8 for the SDA line.
The board is connected to an MPU-6050, which already has pull-up resistors.
Is there anything else I need to configure for the SCL line to be active?
I2C Custom Driver - ESP32-S3
-
MicroController
- Posts: 2672
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: I2C Custom Driver - ESP32-S3
Assuming that SDA is actually putting out I2C data, you'll have to double-check the SCL config: Signal routing (IOMUX,GPIO matrix), output enable, open drain. And make sure there's no other GPIO or peripheral setup happening for that pin afterwards which would 'steal' the pin from the I2C.I went through the GPIO and I2C chapters and set the config registers accordingly ... (I can see the SDA line changing ...)
(Btw, for convenience I just kept all the config&setup stuff from the 'legacy' I2C driver as-is and only replaced the actual transaction handling (API+ISR) to suit my needs.)
Who is online
Users browsing this forum: Qwantbot and 2 guests