-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Improvement: introduce a new lightweight method to check if the VS1053 chip is connected #24
Comments
Hi @wmarkow! Thanks for feedback! A good idea, why not to add such method. I would suggest to add a proper comment in code describing a purpose of this new functionality. For sure the SCI_STATUS const doesn't exist yet and would need to be created.
I'm currently involved in several other projects. It's hard to split between different topics. I don't have enough spare time at the moment and it may take longer to handle your requests. Especially when it's about testing changes before releasing... Would you like to provide a pull request to solve this issue? |
That's not a problem. Take your time. In the meantime I will use in my project my own repository (that is froked from yours) which contains all of proposed fixes.
PR already provided. |
Approved and merged, thanks! |
I propose to introduce a new method that will check if the VS1053 chip is connected and able to exchange data to the microcontroller. I know about
testComm(const char *header)
but this seems to do a bit more that just checking if the chip is connected.I propose a new method as below:
It just reads the STATUS register. If the chip is not connected correctly then SPI will mostly read (according to my current expeirence with various boards) either zeros or ones (it depends on the platform I think). According to the VS1053 this Sparkfun datasheet the STATUS register after reset will have value different than 0x0000 and different that 0xFFFF and probably in 99.9% have - during the normal operation/configuration by the end user- also a value different than 0x000 and 0xFFF.
The idea is: when STATUS register is 0x000 or 0xFFFF then we have some hardware failure (the chip is not correctly powered up, not correctly connected and so on).
The text was updated successfully, but these errors were encountered: