Using LM3S9b9x processors I want to increase the speed of IO port pins by using high performance GPIO so i added the following:
void hpgpio()
{
unsigned long *GPIOHBCTL = (unsigned long *)0x400fe06c;
*GPIOHBCTL = 0x1ff;}
when I call this function at start of a large working software program the program quits operating. Should I do the GIOP calls different after setting high performance GIO?
Is there a systems call to accomplish this?
Jim,
How does the program quit operating? Is it going into a fault ISR? Before you can write to any register you must enable the clock for the peripheral module. It seems like you are trying to write to all GPIOHBCTL port registers. Then you need to enable all port clock peripherals. From the LM3S9b9x datasheet:
"To use the pins in a particular GPIO port, the clock for the port must be enabled by setting the appropriate GPIO Port bit field (GPIOn) in the RCGC2 register"
Here is an example from using driver's library:
SysCtlPeripheralEnable(SYSCTL_PERIPH_PORTA);
SysCtlPeripheralEnable(SYSCTL_PERIPH_PORTB);
SysCtlPeripheralEnable(SYSCTL_PERIPH_PORTC);
etc...
Please let me know if this helps.
Regards,
Damian
Damian Szmulewicz Jim, How does the program quit operating? Is it going into a fault ISR? Before you can write to any register you must enable the clock for the peripheral module. It seems like you are trying to write to all GPIOHBCTL port registers. Then you need to enable all port clock peripherals. From the LM3S9b9x datasheet: "To use the pins in a particular GPIO port, the clock for the port must be enabled by setting the appropriate GPIO Port bit field (GPIOn) in the RCGC2 register" Here is an example from using driver's library: SysCtlPeripheralEnable(SYSCTL_PERIPH_PORTA); SysCtlPeripheralEnable(SYSCTL_PERIPH_PORTB); SysCtlPeripheralEnable(SYSCTL_PERIPH_PORTC); etc... Please let me know if this helps. Regards, Damian
I figured out that when using HP GPIO BUS I must specificy the unit as GPIO_PORTH_AHB_BASE instead of GPIO_PORTH_BASE.
This solved my problems. Jim