-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Subject of the issue
The begin()
function, calls getAngleEn()
and depends on this register being false
. For applications where the angle needs to be measured, this register will be true
and the begin()
function will return false
after a power-on reset.
Your workbench
- What development board or microcontroller are you using?
- What version of hardware or breakout board are you using?
- Rev 1
- How is the breakout board wired to your microcontroller?
- Traces within PCB
- How is everything being powered?
- USB
- Are there any additional details that may help us help you?
Steps to reproduce
void setup() {
if(!sensor.begin(TMAG5273_I2C_ADDRESS_INITIAL)) {
while(1); // Stop further code execution
}
sensor.setAngleEn(0x01);
}
After this is executed in setup()
on Arduino, the begin()
function continually returns false
and the code hangs up with the infinite loop. No, this behavior cannot be ignored as more advanced implementations would need to know if initialization actually fails.
Expected behavior
sensor.begin()
returns true
when initialization is successful even if the AngleEn register is set to 1.
Actual behavior
sensor.begin()
returns false
when initialization is successful, but the AngleEn register is set to 1.
Metadata
Metadata
Assignees
Labels
No labels