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.

C6657 GPIO管脚复用



你好,ti的专家,我有个c6657GPIO管脚复用的问题

手册上说GPIO管脚复用是通过寄存器CHIP_PIN_CONTROL_0和CHIP_PIN_CONTROL_1来控制,我找到这两个寄存的地址,然后往里面写值,操作如下:

Uint32 CHIP_PIN_CONTROL_0=0x02620580;

*(volatile unsigned int *)CHIP_PIN_CONTROL_0=0x00000000; 

Uint32 CHIP_PIN_CONTROL_1=0x02620584;

*(volatile unsigned int *)CHIP_PIN_CONTROL_1=0x00000000;

然后调用KeyStone_common.c里面的函数KeyStone_print_device_info()添加两行把gpBootCfgRegs->CHIP_PIN_CONTROL_0和gpBootCfgRegs->CHIP_PIN_CONTROL_1的值打印出来:

printf("CHIP_PIN_CONTROL_0 = 0x%08x\n",gpBootCfgRegs->CHIP_PIN_CONTROL_0);

printf("CHIP_PIN_CONTROL_1 = 0x%08x\n",gpBootCfgRegs->CHIP_PIN_CONTROL_1);

结果不符合预期,结果如下:

CHIP_PIN_CONTROL_0=0xdbfcdf0f

CHIP_PIN_CONTROL_1=0xbf3fdaf7

 请问哪里出问题了?