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

ESP32S3 not working at all #7

Open
kennythum opened this issue Apr 26, 2024 · 2 comments
Open

ESP32S3 not working at all #7

kennythum opened this issue Apr 26, 2024 · 2 comments

Comments

@kennythum
Copy link

Hello and greetings. I tried the library using with ESP32S3, but unfortunately the library did not working at all T__T.
I tried Parallel/SPI/16bit all failed to get any reading. I did using other library found on the internet, managed to get some readings from SPI...

@leollo98
Copy link
Owner

Hello, have you tested the Dev Branch or just the main one? What's the repo of the other library?

@cuu123
Copy link

cuu123 commented Nov 18, 2024

The spi example using ESP32S3 works I tested last week, but you gotta be really careful with the spi functions in the cpp file. Here's the code I modified.

// ESP32S3 PICO SPI2
SPIClass SPI2(HSPI);

//
AD7606_SPI::AD7606_SPI(int MISO, int MOSI, int SCK, int CS, int CONVSTA, int CONVSTB, int BUSY, int RESET)
{
_RESET = RESET;
pinMode(_RESET,OUTPUT);
_CS = CS;
pinMode(_CS,OUTPUT);
_CONVSTA = CONVSTA;
pinMode(_CONVSTA,OUTPUT);
_CONVSTB = CONVSTB;
pinMode(_CONVSTB,OUTPUT);
_BUSY = BUSY;
digitalWrite(_CS, 0);
digitalWrite(_CONVSTA, 0);
digitalWrite(_CONVSTB, 0);
digitalWrite(_RESET, 0);
SPI2.begin(SCK,MISO,MOSI,CS);
SPI2.beginTransaction(SPISettings(20000000, MSBFIRST, SPI_MODE2));
//SPI2.setBitOrder(SPI_MSBFIRST);
//SPI2.setClockDivider(0x2000);
//SPI2.setDataMode(SPI_MODE3);
reset();
};

And using SPI2 in the other related functions like AD7606_SPI::read etc.

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

No branches or pull requests

3 participants