I want to control GPIO8(13) and GPIO8(15) using HWREG function which is provided in starterware_1_20_04_01.
However, the output control of GPIO8(13) and GPIO8(15) haven't been successful.
Please refer to below code as follows.
HWREG(SET_DATA8) |= (0x00002000); // Set FPGA L1/DSP J4 GPIO8(13) READ DATA TABLE Command.
while (!( (HWREG(IN_DATA67)&(0x10000000)) == 0x10000000)) // GPIO7[12] DATA not Empty Ready
{
HWREG(SET_DATA8) |= (0x00008000); // Set FPGA M3/DSP G1 GPIO8(15) tClk Set
Delay(10);
HWREG(CLR_DATA8) |= (0x00008000); // Clear FPGA M3/DSP G1 GPIO8(15) tClk Reset
}
In this code, what I am trying to do is to use GPIO8 Pin 13 as select signal, and generate a series of pulses using GPIO8 Pin15. Interesting thing is that when I use both pins in the same GPIO group as shown above code, try to turn a pin on and hold it as on-state, and generate a pulse train using the other pin, the first pin is affected by the later pin's operation. Especially, if I set GPIO8 PIN 13 on and cycling on-and-off of GPIO8 PIN 15, GPIO8 PIN 13 turns off at the moment GPIO8 Pin15 transits from logic state 1 to 0. So I wonder what is happening behind this. Since I am just clearing GPIO8 PIN15 by the code 'HWREG(CLR_DATA8) |= (0x00008000);', I expect only GPIO8 Pin15 turns off with other pin staying as same. Am I wrong on this? Plese correct me if I am wrong on this.