Skip to content

Conversation

@PaulZC
Copy link
Contributor

@PaulZC PaulZC commented Feb 8, 2023

This release:

  • Corrects a tricky bug which meant the chip was always in Auto-Set-Reset mode
  • Updates the SPI examples
    • It's rare, but I've sometimes seen begin fail on SPI as the chip returns the wrong Product ID (0xFF instead of 0x30)
    • Performing a softReset fixes it - by making the chip re-read its OTP memory
    • It's OK to call softReset so long as you have called begin at least once. (Calling softReset before begin will cause a crash.)

Set the TM_T bit using shadow memory - instead of doing a read-modify-write.

Reading INT_CTRL_0_REG returns 0x61 (OTP_Read, Auto_SR_En and TM_M). I don't know why...
Set the SW_RST bit using shadow memory instead of read-modify-write.

INT_CTRL_1_REG reads as 0x61: the two reserved bits and BW_0 are set.
If we do read-modify-write, we set the bandwidth to 200Hz.
It's rare, but I have seen the mag fail to start on SPI. Reading the PROD_ID returns 0xFF instead of 0x30. Doing a softReset fixes it. (It is OK to call softReset if begin has been called first.)
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.

Wrong values every 16th time Set/Reset does not seem to work. Anyone have a solution for this?

2 participants