Project

General

Profile

OMAP GPIO

Added by Simon Wong over 12 years ago

Hi,

I'm having trouble accessing the OMAP GPIO pins as detailed in the "MityARM-1810 PROFIBUS Dev Kit" documentation from the DSP.

I am assuming the OMAP_GP0_xx pins means bank 0, and xx means the offset. I'm using the core library in the MDK. I'm using the following code to toggle the GPIO pin:


tcDspGpio *gpio;
// bank 0, offset 0 should be J701 pin 25
bank = 0;
offset = 0;
val = 0;

gpio = tcDspGpio::GetInstance();
gpio->ConfigurePin(bank, offset, true);

while (true) {
    val = !val;
    gpio->SetPinValue(bank, offset, val);
    TSK_sleep(1000);
}

Using a scope to probe J701 pin 25 always results in a HIGH (3.3V). Any ideas on what might be wrong?

Thanks


Replies (2)

RE: OMAP GPIO - Added by Michael Williamson over 12 years ago

Hi Simon,

I don't see anything wrong here, but you might want to ensure that the pin-mux configuration is setup for this particular GPIO. I thought that the stock ARM linux kernel provided by Critical Link did this for you, but if you are not using it (or I am mistaken about how it works) then that could be the problem.

Looking at the DspSyscfg.cpp code, I see that there isn't an entry for GPIO0_0 in the PinmuxFuncs[] array, so one needs to be added. If it's not obvious how to do that, let me know and I can give you the table entry. After that make a call to:

tcDspSyscfg::SetPinMuxConfig(GPIO0_0);

-Mike

RE: OMAP GPIO - Added by Simon Wong over 12 years ago

Hi Mike,

It turns out I didn't enable the Industrial Board I/O option in the kernel. After I enabled it (and enabled MUX debug output to verify the GPIO pins are configured correctly), I can toggle the GPIO pins.

Thanks,
- Simon

    (1-2/2)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)