遇到个奇怪的问题,在OAL层通过以下操作寄存器,失败:
volatile S5PC100_IIC_REG *i2c = NULL; i2c = (S5PC100_IIC_REG *)OALPAtoVA(S5PC100_BASE_REG_PA_I2C1, FALSE); i2c->IICCON = 0xA9;
|
发现原来是因为没有打开芯片的iic时钟信号
volatile S5PC100_SYSCON_CLK_REG *syscon = NULL; syscon = (S5PC100_SYSCON_CLK_REG *)OALPAtoVA(S5PC100_BASE_REG_PA_SYSCON_CLK, FALSE); // enable iic2 clk syscon->CLK_GATE_D1_4 |= (0x1<<5);
|
阅读(2586) | 评论(0) | 转发(0) |