STM32L4R9 use the HAL library debugging IIC Notes

Use Code STM32 Cubemx generated, use the IIC's drive, but still can not read and write, so use a logic analyzer, we found originally written in the address 0x58 0x20, and therefore must have the wrong address. So, are summarized as follows:

1, the logic analyzer needs a good IIC agreement, currently used tools are: DSView logic analyzer.
2, keil debug line can only write once, can represent is correct, the logic analyzer is the correct method to judge.
3, in the case of not analyze the reasons, first determine the correct hardware power, you have the correct voltage.
4 oscilloscope probes will have normal circumstances can not be used, therefore, found that when there is no waveform need for a probe, the error may not be the code.
5, used to build DuPont line of circuit board debugging, need to make sure to firmly connect Dupont line.

Guess you like

Origin www.cnblogs.com/CodeWorkerLiMing/p/11828942.html