On the EK-TM4C129XL, when I use this GPIO initialization code:
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOJ); ROM_GPIOPinTypeGPIOOutput(GPIO_PORTJ_BASE, GPIO_PIN_1);
I can then write to PJ1 with
GPIO_PORTJ_AHB_DATA_R = ...
And everything works.
Does this use the AHB or the APB? Or do I need to initialize with
SysCtlGPIOAHBEnable(SYSCTL_PERIPH_GPIOJ); GPIOPinTypeGPIOOutput(GPIO_PORTJ_AHB_BASE, GPIO_PIN_1);
Because the above doesn't work, it gets stuck inside the second call.
I am asking because I would like to control the data register with
*((uint32_t *)(MY_PORT_BASE + TIVA_GPIO_DATA_REGISTER_OFFSET)) = ...;
And I'm not sure whether to use GPIO_PORTJ_BASE or GPIO_PORTJ_AHB_BASE for MY_PORT_BASE