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.

CC3200(与DS1302实时时钟联调) IO口 能不能同时读写,怎样配置

Other Parts Discussed in Thread: CC3200

TI 工程师:

    我在使用cc3200的外设时遇到如下问题:

    使用CC3200与实时时钟(DS1302)通信,DS1302接口为 RST、DAT、CLK三线,DAT线要既能读也能写,SPI是无法用的,使用I2C貌似又有很多疑问。

如果使用IO口则该IO口应该既能读也能写,该怎样配置?有没有其他建议?

    目前我的方法为需要读数值时将IO口 配置为输入MAP_GPIODirModeSet(GPIOA1_BASE, 0x4, GPIO_DIR_MODE_IN);

    在写数据时将IO口配置为输出MAP_GPIODirModeSet(GPIOA1_BASE, 0x4, GPIO_DIR_MODE_OUT);

     同时每次切换时调用     MAP_PRCMPeripheralClkDisable(PRCM_GPIOA1, PRCM_RUN_MODE_CLK);

                                              MAP_UtilsDelay(50);
                                              MAP_PRCMPeripheralClkEnable(PRCM_GPIOA1, PRCM_RUN_MODE_CLK);

    目前该方法还未奏效,请给些建议。

   谢谢!