DavidArmstrong / SCL3300

Arduino library for interfacing with the Murata SCL3300 Inclinometer via SPI
MIT License
20 stars 11 forks source link

Slow response from sensor, excessive reset calls and error flagging #34

Open MickTheMechanic opened 5 months ago

MickTheMechanic commented 5 months ago

I am using your library to communicate with an ESP32.

I change the spi pin configuration as follows: SPI.begin(23,18,19,5)

code works fine when using the Murata breakout board, but when using my own boards with exactly the same layout and pin configuration, and genuine Murata chips, I am getting very poor performance.

i am Printing the error flags inside the else statement before the reset takes place, here is what I am getting:

For error flag one I get a few different flags 512 768 896 2816 3968

Ad for error flag 2 528

Does this indicate a software problem, hardware problem, or a chip malfunction/manufacturer problem?

Thanks 🙏

DavidArmstrong commented 3 months ago

I apologize for not commenting on this issue sooner. ( I literally just saw this. ) If the hardware setup to your ESP32 device is identical to both the breakout board and your home-made boards, this eliminates both the library coding and the ESP32 itself as causes for the issues you are observing. That leaves your home-made boards as the source of the error. Take the error numbers you are getting, convert them to hexadecimal, and then compare them to error flag bit explanations in the Murata SCL3300 documentation. That will help understand what the device is telling you. I don't know, but suspect that the delicate nature of these devices means that special handling is needed when mounting them on a PC board. The documentation states such as well.