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.

Starterware: GPIO max speed

Tool/software: Starterware

Hello! Could someone help me.

I am using the BeagleBoneBlack and the StartWare. I want to use the GPIO2 as a fast digital interface.

When I use the following code, I get the changing of the signal level every 40 ns.

while(1)
{
HWREG(GPIO2_INSTANCE_ADDRESS + GPIO_DATAOUT) = (1<<9); HWREG(GPIO2_INSTANCE_ADDRESS + GPIO_DATAOUT) = 0;
}

When I want to read the data, I spend 40 ns to write and about 200 ns  to read using the following code:

while(1)
{
HWREG(GPIO2_INSTANCE_ADDRESS + GPIO_DATAOUT) = (1<<9); HWREG(GPIO2_INSTANCE_ADDRESS + GPIO_DATAOUT) = 0;
HWREG(GPIO2_INSTANCE_ADDRESS + GPIO_DATAIN);
}

The debounce is off. The peripheral clock is 100 Mhz (period is equal to 10 ns). The pll_mpu is about 1 GHz.

Is it possible to work with GPIO faster? What is doing the CPU so much time? At the datasheet I can read "the GPIO_DATAIN read command has a 3 OCP cycle latency due to the data in sample gating mechanism. When the AUTOIDLE bit is not set, the GPIO_DATAIN read command has a 2 OCP cycle latency", but 3 OCP is equal to 30 ns.

Best regards, Alex.