

I spent a whole day and night on New Year's Eve debugging a chip. Debugging against the datasheet, I finally found the problem: the chip's communication protocol is not standard SPI, but resembles a variant of SPI used by certain specific DSP chips. The open-source code I referred to was not written carefully against the datasheet, so not all commands could run. The test procedures of many open-source chip drivers are not thorough enough and only test a few working modes of the chip, so they should be used with caution. Before using open-source code, be sure to read the datasheet and have a basic understanding of the chip's protocol, commands, and related registers, so that you can locate problems quickly when they occur. Many embedded beginners now start with Arduino or MicroPython and focus only on application-layer development and quickly implementing "cool-looking" features. They do not even have the basic ability to write a driver from a datasheet, and only take the vendor-supplied driver and call the library. This is a major obstacle on the path of becoming an embedded engineer!