Skip to content

Device failed to setup on new chips #10

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

Closed
MattMills opened this issue Aug 22, 2021 · 3 comments
Closed

Device failed to setup on new chips #10

MattMills opened this issue Aug 22, 2021 · 3 comments

Comments

@MattMills
Copy link

Subject of the issue

Purchased several https://www.sparkfun.com/products/15805, tested two chips on example1, both emit "Device failed to setup"... however if I comment out the infinite loop they appear to work fine. I did check the device ID and it is reporting 0x117 so the issue is in this code:

if (_i2cPort->endTransmission() != 0)
	{
		return false;
	}

If I check the status code coming from endTransmission it's 7 == I2C_ERROR_CONTINUE

Your workbench

  • What development board or microcontroller are you using?
    ESP32S2
  • What version of hardware or breakout board are you using?
  • How is the breakout board wired to your microcontroller?
    Qwiic
  • How is everything being powered?
    USB-C
  • Are there any additional details that may help us help you?

Steps to reproduce

  1. Load example 1.
  2. Press Upload

Expected behavior

It should work

Actual behavior

It doesn't.

@nseidle
Copy link
Member

nseidle commented Sep 1, 2021

I've tested on ESP32 and works fine. I'll get setup with the S2 shortly. I suspect it's core related since the S2 is so new (19 hours old at the time of writing).

@MattMills
Copy link
Author

I'm pretty positive it's just due to the changes in the Espressif libraries required for the ESP32S2, they implemented I2C_ERROR_CONTINUE which is somehow related to I2C pending write. I was able to get the library working by commenting out some of the I2C return code checking. I had to do the same on the MS5637 to get it going.

@nseidle
Copy link
Member

nseidle commented Oct 14, 2021

Yep, indeed. The ESP32 S2 core is not yet respecting repeated starts. See this issue. If you pull the latest ESP32 Arduino core repo, it should help.

@nseidle nseidle closed this as completed Oct 14, 2021
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

2 participants