顶。我的也是。我使用的是硬件方式,不是IO口模拟IIC时序的。
在nRF51寄存器说明书v3.0.pdf第145页,
28.3 Shared resources
The TWI shares registers and other resources with other peripherals that have the same ID as the TWI.
Therefore, you must disable all peripherals that have the same ID as the TWI before the TWI can be
configured and used. Disabling a peripheral that has the same ID as the TWI will not reset any of the
registers that are shared with the TWI. It is therefore important to configure all relevant TWI registers
explicitly to secure that it operates correctly.
The Instantiation table in Instantiation on page 17 shows which peripherals have the same ID as the TWI.
17页:
ID Base address Peripheral Instance Description
4 0x40004000 SPI SPI1 SPI master 1
4 0x40004000 SPIS SPIS1 SPI slave 1
4 0x40004000 TWI TWI1 Two-wire interface master 1