Skip to content
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

Add compatibility to Arduino Core 3.0.x and ESP32-IDF 5.xx #358

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

cskzoli
Copy link

@cskzoli cskzoli commented Oct 15, 2024

There are some breaking changes in ESP32 Arduino core 2.x to 3.0 in Timer API:
https://docs.espressif.com/projects/arduino-esp32/en/latest/migration_guides/2.x_to_3.0.html

Add IDF version check and compatible timer setting.

Tested on ESP32 and DSC PC1616, all functions working.

@frankonski
Copy link

So you know, these changes do not work for me on the master branch. Using an ESP32-S2 at the moment, and it is like I'm not getting any readings and/or there is a synchronization issue between timer1 and the clock interrupt.

I'd also be curious to try to simply leverage ESP32 PINs for VSPI MISO, VSPI MOSI and VSPI SCK, and get rid of the 250ms interrupt timer to read the data line after an clock change. Looking at https://www.gammon.com.au/spi, I wonder if keybus is simply using something like "Mode 1 - clock is normally low (CPOL = 0), and the data is sampled on the transition from high to low (trailing edge) (CPHA = 1)" ... reading the data line on the trailing edge would prevent having to read 250ms after a CHANGE...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants