Skip to content

Comments

WIP: Add basic read example for ESP32-based systems#14

Open
sssilver wants to merge 1 commit intoqrasmont:masterfrom
sssilver:sssilver/esp32-read-example
Open

WIP: Add basic read example for ESP32-based systems#14
sssilver wants to merge 1 commit intoqrasmont:masterfrom
sssilver:sssilver/esp32-read-example

Conversation

@sssilver
Copy link

Note: this code panics!

This is an attempt to add a basic read example for ESP32 systems (implemented on an ESP32S3 dev board by Espressif).

I have the Adafruit BMI270 board with the following wiring:

SDA -> GPIO2
SCL -> GPIO8
ADR -> GPIO1
CS  -> GPIO3

However for some reason when running my code, I get the following output:

I (179) boot: Loaded app from partition at offset 0x10000
I (180) boot: Disabling RNG early entropy source...
DEBUG Reset Spi2
DEBUG Enable Spi2 false
DEBUG Reset Spi3
DEBUG Enable Spi3 false
DEBUG Reset I2cExt0
DEBUG Enable I2cExt0 false
DEBUG Reset I2cExt1
DEBUG Enable I2cExt1 false
DEBUG Reset Rmt
DEBUG Enable Rmt false
DEBUG Reset Ledc
DEBUG Enable Ledc false
DEBUG Reset Mcpwm0
DEBUG Enable Mcpwm0 false
DEBUG Reset Mcpwm1
DEBUG Enable Mcpwm1 false
DEBUG Reset Pcnt
DEBUG Enable Pcnt false
DEBUG Reset ApbSarAdc
DEBUG Enable ApbSarAdc false
DEBUG Reset Gdma
DEBUG Enable Gdma false
DEBUG Reset I2s0
DEBUG Enable I2s0 false
DEBUG Reset I2s1
DEBUG Enable I2s1 false
DEBUG Reset Usb
DEBUG Enable Usb false
DEBUG Reset Aes
DEBUG Enable Aes false
DEBUG Reset Twai0
DEBUG Enable Twai0 false
DEBUG Reset Timg1
DEBUG Enable Timg1 false
DEBUG Reset Sha
DEBUG Enable Sha false
DEBUG Reset Uart1
DEBUG Enable Uart1 false
DEBUG Reset Uart2
DEBUG Enable Uart2 false
DEBUG Reset Rsa
DEBUG Enable Rsa false
DEBUG Reset Hmac
DEBUG Enable Hmac false
DEBUG Reset LcdCam
DEBUG Enable LcdCam false
TRACE Enable Timg0 0 -> 1
DEBUG Enable Timg0 true
TRACE Enable Spi2 0 -> 1
DEBUG Enable Spi2 true
DEBUG Reset Spi2
ERROR panicked at 'Chip ID is 0, which is invalid'

I'm not sure what would cause chip ID to read as 0, but the rest of the code seems correct, so as long as we can fix that, we can merge this.

@sssilver
Copy link
Author

Some things that I have observed with my oscilloscope on the BMI module that may be of interest:

  • CS remains high the whole time except for a brief instant when resetting the board
  • ADR is low the whole time
  • SCL is high when resetting, then quickly becomes low and stays low
  • SDA is high when resetting, then quickly becomes low and stays low

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.

1 participant