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.

dm8148的GPIO空间不可访问



你好!

       我最近用CCS5去调试DM8148时发现GPIO的空间不可访问,报错如下:

CortexA8: Trouble Reading Memory Block at 0x48032000 on Page 0 of Length 0x160: (Error -2030 @ 0x0) Internal error: Access to unknown or invalid register was requested. Restart the application. If error persists, please report the error. (Emulation package 5.0.747.0)

      我用CCS5的Memory Browser 去查看GPIO的寄存器空间也都是“?”,我也查了不是时钟的问题因为和它用同一时钟的RTC的空间都可以访问。

  • 你好,

    是GPIO模块自身的时钟没有打开吧。

    请看看CM_ALWON_GPIO_0_CLKCTRL/CM_ALWON_GPIO_1_CLKCTRL的配置。

  • 原因是GPIO的时钟没有使能

    通过配置 CM_ALWON_GPIO_0_CLKCTRL = 0x02 来使能GPIO0的时钟

    通过配置 CM_ALWON_GPIO_1_CLKCTRL = 0x02 来使能GPIO1,2, 3的时钟

    通过配置 PINCNTL[270:1] 引脚功能配置寄存器来配置GPIO对应的引脚为GPIO的功能

    如:PINCNTL62] = 0x000C0080; 配置了引脚PIN62 为GPIO0[7]的功能

    另外GPIO1[7 - 10] 有特殊的用途,如果要作为GPIO来用的话还需要配置

    MLBP_SIG_IO_CTRL Register = 0x48140E18

    MLBP_DAT_IO_CTRL Register = 0x48140E18
    这两个寄存器