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

BMI270 Initialization Causes I2C NACK After Writing to Register 0x70 #26

Open
Oliver0804 opened this issue Sep 24, 2024 · 1 comment
Open

Comments

@Oliver0804
Copy link

截圖 2024-09-24 下午1 30 53
Description:

I'm working with the BMI270 sensor and trying to initialize it by writing 0x01 to register 0x70. However, after performing this write operation, all subsequent I2C communications result in a NACK (No Acknowledgment).

Here is the initialization sequence I am using:

Set the BMI270 to sleep mode.
Write 0x01 to register 0x70.
All subsequent I2C communication results in NACK.
I've checked the I2C bus signals, and the initial write seems successful, but any attempt to communicate with the sensor after that point fails.

My setup:

MCU: NRF52840
I2C speed: 100K
Has anyone encountered this issue before, or does anyone have suggestions on what might be causing this behavior?

Any insights or help would be appreciated!

@Oliver0804
Copy link
Author

*** Booting nRF Connect SDK 3758bcbfa5cd ***
I2C device i2c@40004000 ready


uart:~$ Successfully wrote data 0xB6 to register 0x7E
Successfully wrote data 0x02 to register 0x7C
Successfully wrote data 0x00 to register 0x59
Successfully wrote data 0x00 to register 0x5B
Successfully wrote data 0x00 to register 0x5C
Successfully wrote data 0xC8 to register 0x5E
Successfully wrote data 0x2E to register 0x5F
Successfully wrote data 0x00 to register 0x60
Successfully wrote data 0x2E to register 0x61
Successfully wrote data 0x80 to register 0x62
Successfully wrote data 0x2E to register 0x63
Successfully wrote data 0x3D to register 0x64
Successfully wrote data 0xB1 to register 0x65
Successfully wrote data 0xC8 to register 0x66
Successfully wrote data 0x2E to register 0x67
Successfully wrote data 0x00 to register 0x68
Successfully wrote data 0x2E to register 0x69
Successfully wrote data 0x80 to register 0x6A
Successfully wrote data 0x2E to register 0x6B
Successfully wrote data 0x91 to register 0x6C
Successfully wrote data 0x03 to register 0x6D
Successfully wrote data 0x80 to register 0x6E
Successfully wrote data 0x2E to register 0x6F
Successfully wrote data 0xBC to register 0x70
Successfully wrote data 0xB0 to register 0x71
Successfully wrote data 0x80 to register 0x72
Successfully wrote data 0x2E to register 0x73
Successfully wrote data 0xA3 to register 0x74
Successfully wrote data 0x03 to register 0x75
Successfully wrote data 0xC8 to register 0x76
Successfully wrote data 0x2E to register 0x77
Successfully wrote data 0x00 to register 0x78
Successfully wrote data 0x2E to register 0x79
Successfully wrote data 0x80 to register 0x7A
Successfully wrote data 0x2E to register 0x7B
Successfully wrote data 0x00 to register 0x7C
Successfully wrote data 0xB0 to register 0x7D
Successfully wrote data 0x00 to register 0x5B
Successfully wrote data 0x01 to register 0x5C
Successfully wrote data 0x50 to register 0x5E
Successfully wrote data 0x30 to register 0x5F
Successfully wrote data 0x21 to register 0x60
Successfully wrote data 0x2E to register 0x61
Successfully wrote data 0x59 to register 0x62
Successfully wrote data 0xF5 to register 0x63
Successfully wrote data 0x10 to register 0x64
Successfully wrote data 0x30 to register 0x65
Successfully wrote data 0x21 to register 0x66
Successfully wrote data 0x2E to register 0x67
Successfully wrote data 0x6A to register 0x68
Successfully wrote data 0xF5 to register 0x69
Successfully wrote data 0x80 to register 0x6A
Successfully wrote data 0x2E to register 0x6B
Successfully wrote data 0x3B to register 0x6C
Successfully wrote data 0x03 to register 0x6D
Successfully wrote data 0x00 to register 0x6E
Successfully wrote data 0x00 to register 0x6F
Successfully wrote data 0x00 to register 0x70
Successfully wrote data 0x00 to register 0x71
Successfully wrote data 0x08 to register 0x72
Successfully wrote data 0x19 to register 0x73
Successfully wrote data 0x01 to register 0x74
Successfully wrote data 0x00 to register 0x75
Successfully wrote data 0x22 to register 0x76
Successfully wrote data 0x00 to register 0x77
Successfully wrote data 0x75 to register 0x78
Successfully wrote data 0x00 to register 0x79
Successfully wrote data 0x00 to register 0x7A
Successfully wrote data 0x10 to register 0x7B
Successfully wrote data 0x00 to register 0x7C
Successfully wrote data 0x10 to register 0x7D
Successfully wrote data 0x00 to register 0x5B
Successfully wrote data 0x02 to register 0x5C
Successfully wrote data 0xD1 to register 0x5E
Successfully wrote data 0x00 to register 0x5F
Successfully wrote data 0xB3 to register 0x60
Successfully wrote data 0x43 to register 0x61
Successfully wrote data 0x80 to register 0x62
Successfully wrote data 0x2E to register 0x63
Successfully wrote data 0x00 to register 0x64
Successfully wrote data 0xC1 to register 0x65
Successfully wrote data 0x80 to register 0x66
Successfully wrote data 0x2E to register 0x67
Successfully wrote data 0x00 to register 0x68
Successfully wrote data 0xC1 to register 0x69
Successfully wrote data 0x80 to register 0x6A
Successfully wrote data 0x2E to register 0x6B
Successfully wrote data 0x00 to register 0x6C
Successfully wrote data 0xC1 to register 0x6D
Successfully wrote data 0x80 to register 0x6E
Successfully wrote data 0x2E to register 0x6F
Successfully wrote data 0x00 to register 0x70
Successfully wrote data 0xC1 to register 0x71
Successfully wrote data 0x80 to register 0x72
Successfully wrote data 0x2E to register 0x73
Successfully wrote data 0x00 to register 0x74
Successfully wrote data 0xC1 to register 0x75
Successfully wrote data 0x80 to register 0x76
Successfully wrote data 0x2E to register 0x77
Successfully wrote data 0x00 to register 0x78
Successfully wrote data 0xC1 to register 0x79
Successfully wrote data 0x80 to register 0x7A
Successfully wrote data 0x2E to register 0x7B
Successfully wrote data 0x00 to register 0x7C
Successfully wrote data 0xC1 to register 0x7D
Successfully wrote data 0x00 to register 0x5B
Successfully wrote data 0x03 to register 0x5C
Successfully wrote data 0x80 to register 0x5E
Successfully wrote data 0x2E to register 0x5F
Successfully wrote data 0x00 to register 0x60
Successfully wrote data 0xC1 to register 0x61
Successfully wrote data 0x80 to register 0x62
Successfully wrote data 0x2E to register 0x63
Successfully wrote data 0x00 to register 0x64
Successfully wrote data 0xC1 to register 0x65
Successfully wrote data 0x80 to register 0x66
Successfully wrote data 0x2E to register 0x67
Successfully wrote data 0x00 to register 0x68
Successfully wrote data 0xC1 to register 0x69
Successfully wrote data 0x80 to register 0x6A
Successfully wrote data 0x2E to register 0x6B
Successfully wrote data 0x00 to register 0x6C
Successfully wrote data 0xC1 to register 0x6D
Successfully wrote data 0x80 to register 0x6E
Successfully wrote data 0x2E to register 0x6F
Successfully wrote data 0x00 to register 0x70
Successfully wrote data 0xC1 to register 0x71
Successfully wrote data 0x80 to register 0x72
Successfully wrote data 0x2E to register 0x73
Successfully wrote data 0x00 to register 0x74
Successfully wrote data 0xC1 to register 0x75
Successfully wrote data 0x80 to register 0x76
Successfully wrote data 0x2E to register 0x77
Successfully wrote data 0x00 to register 0x78
Successfully wrote data 0xC1 to register 0x79
Successfully wrote data 0x80 to register 0x7A
Successfully wrote data 0x2E to register 0x7B
Successfully wrote data 0x00 to register 0x7C
Successfully wrote data 0xC1 to register 0x7D
Successfully wrote data 0x00 to register 0x5B
Successfully wrote data 0x04 to register 0x5C
Successfully wrote data 0x80 to register 0x5E
Successfully wrote data 0x2E to register 0x5F
Successfully wrote data 0x00 to register 0x60
Successfully wrote data 0xC1 to register 0x61
Successfully wrote data 0x80 to register 0x62
Successfully wrote data 0x2E to register 0x63
Successfully wrote data 0x00 to register 0x64
Successfully wrote data 0xC1 to register 0x65
Successfully wrote data 0x80 to register 0x66
Successfully wrote data 0x2E to register 0x67
Successfully wrote data 0x00 to register 0x68
Successfully wrote data 0xC1 to register 0x69
Successfully wrote data 0x80 to register 0x6A
Successfully wrote data 0x2E to register 0x6B
Successfully wrote data 0x00 to register 0x6C
Successfully wrote data 0xC1 to register 0x6D
Successfully wrote data 0x80 to register 0x6E
Successfully wrote data 0x2E to register 0x6F
Successfully wrote data 0x00 to register 0x70
Successfully wrote data 0xC1 to register 0x71
Successfully wrote data 0x80 to register 0x72
Successfully wrote data 0x2E to register 0x73
Successfully wrote data 0x00 to register 0x74
Successfully wrote data 0xC1 to register 0x75
Successfully wrote data 0x80 to register 0x76
Successfully wrote data 0x2E to register 0x77
Successfully wrote data 0x00 to register 0x78
Successfully wrote data 0xC1 to register 0x79
Successfully wrote data 0x80 to register 0x7A
Successfully wrote data 0x2E to register 0x7B
Successfully wrote data 0x00 to register 0x7C
Successfully wrote data 0xC1 to register 0x7D
Successfully wrote data 0x00 to register 0x5B
Successfully wrote data 0x05 to register 0x5C
Successfully wrote data 0x80 to register 0x5E
Successfully wrote data 0x2E to register 0x5F
Successfully wrote data 0x00 to register 0x60
Successfully wrote data 0xC1 to register 0x61
Successfully wrote data 0x80 to register 0x62
Successfully wrote data 0x2E to register 0x63
Successfully wrote data 0x00 to register 0x64
Successfully wrote data 0xC1 to register 0x65
Successfully wrote data 0x80 to register 0x66
Successfully wrote data 0x2E to register 0x67
Successfully wrote data 0x00 to register 0x68
Successfully wrote data 0xC1 to register 0x69
Successfully wrote data 0x80 to register 0x6A
Successfully wrote data 0x2E to register 0x6B
Successfully wrote data 0x00 to register 0x6C
Successfully wrote data 0xC1 to register 0x6D
Successfully wrote data 0x80 to register 0x6E
Successfully wrote data 0x2E to register 0x6F
Successfully wrote data 0x00 to register 0x70
Successfully wrote data 0xC1 to register 0x71
Successfully wrote data 0x80 to register 0x72
Successfully wrote data 0x2E to register 0x73
Successfully wrote data 0x00 to register 0x74
Successfully wrote data 0xC1 to register 0x75
Successfully wrote data 0x80 to register 0x76
Successfully wrote data 0x2E to register 0x77
Successfully wrote data 0x00 to register 0x78
Successfully wrote data 0xC1 to register 0x79
Successfully wrote data 0x80 to register 0x7A
Successfully wrote data 0x2E to register 0x7B
Successfully wrote data 0x00 to register 0x7C
Successfully wrote data 0xC1 to register 0x7D
Successfully wrote data 0x00 to register 0x5B
Successfully wrote data 0x06 to register 0x5C
Successfully wrote data 0x80 to register 0x5E
Successfully wrote data 0x2E to register 0x5F
Successfully wrote data 0x00 to register 0x60
Successfully wrote data 0xC1 to register 0x61
Successfully wrote data 0x80 to register 0x62
Successfully wrote data 0x2E to register 0x63
Successfully wrote data 0x00 to register 0x64
Successfully wrote data 0xC1 to register 0x65
Successfully wrote data 0x80 to register 0x66
Successfully wrote data 0x2E to register 0x67
Successfully wrote data 0x00 to register 0x68
Successfully wrote data 0xC1 to register 0x69
Successfully wrote data 0x80 to register 0x6A
Successfully wrote data 0x2E to register 0x6B
Successfully wrote data 0x00 to register 0x6C
Successfully wrote data 0xC1 to register 0x6D
Successfully wrote data 0x80 to register 0x6E
Successfully wrote data 0x2E to register 0x6F
Successfully wrote data 0x00 to register 0x70
Successfully wrote data 0xC1 to register 0x71
Successfully wrote data 0x80 to register 0x72
Successfully wrote data 0x2E to register 0x73
Successfully wrote data 0x00 to register 0x74
Successfully wrote data 0xC1 to register 0x75
Successfully wrote data 0x80 to register 0x76
Successfully wrote data 0x2E to register 0x77
Successfully wrote data 0x00 to register 0x78
Successfully wrote data 0xC1 to register 0x79
Successfully wrote data 0x80 to register 0x7A
Successfully wrote data 0x2E to register 0x7B
Successfully wrote data 0x00 to register 0x7C
Successfully wrote data 0xC1 to register 0x7D
Successfully wrote data 0x00 to register 0x5B
Successfully wrote data 0x07 to register 0x5C
Successfully wrote data 0x80 to register 0x5E
Successfully wrote data 0x2E to register 0x5F
Successfully wrote data 0x00 to register 0x60
Successfully wrote data 0xC1 to register 0x61
Successfully wrote data 0x80 to register 0x62
Successfully wrote data 0x2E to register 0x63
Successfully wrote data 0x00 to register 0x64
Successfully wrote data 0xC1 to register 0x65
Successfully wrote data 0x80 to register 0x66
Successfully wrote data 0x2E to register 0x67
Successfully wrote data 0x00 to register 0x68
Successfully wrote data 0xC1 to register 0x69
Successfully wrote data 0xE0 to register 0x6A
Successfully wrote data 0x5F to register 0x6B
Successfully wrote data 0x00 to register 0x6C
Successfully wrote data 0x00 to register 0x6D
Successfully wrote data 0x00 to register 0x6E
Successfully wrote data 0x00 to register 0x6F
Successfully wrote data 0x01 to register 0x70
Failed to write data 0x00 to register 0x71 (Error -5)
BMI270 initialization failed with error code -2
BMI270 sensor initialization failed
Failed to write register address 0x03 (Error -5)
fail
Failed to write register address 0x03 (Error -5)
fail
Failed to write register address 0x03 (Error -5)
fail
Failed to write register address 0x03 (Error -5)
fail
Failed to write register address 0x03 (Error -5)

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

1 participant