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.

TM4C1231H6PM: Debugging GPIO ports does not work if they run on AHB bus

Part Number: TM4C1231H6PM

hi fellows,

when I have the AHB Bus enabled (GPIOHBCTL) I cannot see the register content in the Debug Mode and get the following error message.

CORTEX_M4_0: Trouble Reading Memory Block at 0x40025518 on Page 0 of Length 0x4: Debug Port error occurred.

Is this an expected behaviour?

Greets

Side notes: I do not use Tivaware but I strictly follow the initalization suggestion from page 673 10.3 Initalization and Configuration of the data sheet.

  • Hello Johannes,

    That would mean the peripheral has not been correctly configured.

    For TivaWare, to enable AHB, we use the following code:

    SysCtlGPIOAHBEnable(SYSCTL_PERIPH_GPIOF);

    I imagine you are missing that SysCtl setting. When I removed that line, I was able to recreate your error.

    By the way, it is a rare case but Bob was incorrect in the post he had made which you linked. TivaWare does not use AHB by default for TM4C123x devices, it uses APB by default.

    Best Regards,

    Ralph Jacobi

  • Hi Ralph,

    thanks for your reply. Pretty embarrassing. I just realized that there are two "debug registers" in the Code Composer Studio. So if the AHB is activated I have to use the GPIO_PORTx_AHB if its deactivated the GPIO_PORTx register must be used. I assume this is due to different addressing.

  • Hi Johannes,

    I wouldn't say that's embarrassing at all, it isn't very clear really! But yes, it is due to different addressing. Section 10.4 Register Map in the device datasheet outlines the addressing.

    Best Regards,

    Ralph Jacobi