您好!
谢谢。此致、
维贾伊·巴拉吉
嵌入式设计工程师
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.
您好!
谢谢。此致、
维贾伊·巴拉吉
嵌入式设计工程师
Vijay、您好!
连续时钟告诉我主器件(FR59941)要么卡在循环写入中、要么读取所有零、这会导致您的软件出现问题。
您可能还需要查看 TI Resource Explorer 中的 MSP430FR59941 I2C 示例。 或许可以与您的代码进行比较、看看您是否忽略了某些内容。
Bruce、您好!
代码:
uint8_t rtc_i2c_Init (void)
{
P5DIR |= BIT0 | BIT1;
P5SEL0 |= BIT0 | BIT1;
P5SEL1 &=~(BIT0 | BIT1);
UCB1CTLW0 = 0x0F91;/*主器件、I2C 模式、SMCLK、发送模式和复位使能*/
UCB1BRW = 39;/*波特率= SMCLK/40 = 16MHz / 40 = 400kHz */
UCB1CTLW0 = 0x0F90;/*禁用复位*/
返回1U;
}
这是我的 I2C 配置。