This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CDCEL913: 寄存器写不进去,读出来全是0x07

Part Number: CDCEL913
Other Parts Discussed in Thread: CDCE913

逻辑分析仪测试接收到单片机发出来的数据没有问题,但是读出来cdcel913的数据全部是0x07;

下面是主要测试的代码片段,mcu为stm32f446,i2c频率为50khz

uint8_t testcode[]= {
0x01,0x00,0xb4,0x12,0x02,
0x50,0x40,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,
0x6d,0x02,0x00,0x00,0xfe,
0xd0,0x03,0x63,0xfe,0xd0,
0x03,0x60
};

for(int i=0;i<0x20;i++)
{
cdce913_I2C_WriteByte(i,testcode[i]);
HAL_Delay(1);
HAL_FMPI2C_Mem_Read(&hfmpi2c1, SLAVE_READ, i, FMPI2C_MEMADD_SIZE_8BIT, &read_data, 1, 1000);
read_databuf[i] = read_data;
HAL_Delay(5);
}

下面是逻辑分析仪抓取到写入时的波形