Board: BBB, A6
AM335X_StarterWare_02_00_01_01
CCSv5.5, Windows7
Hi,
I modified the project gpioLEDBlink with the intention to additionally toggle GPIO1[1], but all I can see on the scope is a constant HIGH level.
This is how GPIO1[1] is set:
void GPIO1Pin1PinMuxSetup(void) { volatile unsigned int var2, var3; var2 = *(unsigned int *) (SOC_CONTROL_REGS + CONTROL_CONF_GPMC_AD(1));
HWREG(SOC_CONTROL_REGS + CONTROL_CONF_GPMC_AD(1)) = (1<<4) + (0<<3) + 7; //Offset 0x804 is for conf_gpmc_ad1 ( for gpio1[1]) // with pull-up resistor enabled var3 = *(unsigned int *)(SOC_CONTROL_REGS + CONTROL_CONF_GPMC_AD(1)); }
The result here is var2 = var3 = 0x31, i.e. MODE0 and the write operation did not change anything.
In the memory browser this is shown:
offset to Control Module contents
----------------------------------------
0x800 0x31
0x804 0x31 for GPIO1[1]
0x808 0x31
0x80C 0x31
0x810 0x27
0x814 0x27 for GPIO1[5]
etc.
Applying the appropriate function to GPIO1[5] provides a positive result, i.e. GPIO1[5] toggles.
But that is only because the register already had been set to 0x27 (MODE7), writing to the register is not possible.
And no, I have not switched to user mode. The function above is invoked right after GPIO1Pin23PinMuxSetup() (which resides in Debug library), the original function from project gpioLEDBlink.
So the question is what has to be done to write to that register, for instance to conf_gpmc_ad1 at offset 0x804?
Does anybody have an idea?
Thank you!
Martin