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.
这是引脚初始代码
void InitI2CGpio(void)
{
EALLOW;
GpioCtrlRegs.GPBPUD.bit.GPIO32 = 0; // Enable pull-up for GPIO32 (SDAA)
GpioCtrlRegs.GPBPUD.bit.GPIO33 = 0; // Enable pull-up for GPIO33 (SCLA)
GpioCtrlRegs.GPBDIR.bit.GPIO32 =1;
GpioCtrlRegs.GPBDIR.bit.GPIO33 =1;
GpioCtrlRegs.GPBMUX1.bit.GPIO32 = 1; // Configure GPIO32 for SDAA operation
GpioCtrlRegs.GPBMUX1.bit.GPIO33 = 1; // Configure GPIO33 for SCLA operation
EDIS;
}
#define SDAA GpioDataRegs.GPBDAT.bit.GPIO32 // (SDAA)
#define SCLA GpioDataRegs.GPBDAT.bit.GPIO33 // (SCLA)
执行下面代码无法拉低
SCLA=0;
SDAA=0;