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.

GPIO toggling testing using Test code provided...

Other Parts Discussed in Thread: OMAP3530

Hi TI support team,

I am working with OMAP3530 evm and I need to toggle the specific GPIOs using the test gpio (As attached) provided in the C:\WINCE700\platform\EVM_OMAP3530\SRC\test\testGPIO.   Can you please let know how to do this test...Am I need to use CTK to achieve this.  Please suggest the flow of the testing.  It would be of great help.

5226.testGPIO.zip

  • Dear Karthick,
    Greetings!!!

    1. DWORD config[2] = {id,GPIO_DIR_OUTPUT};

    Storing the GPIO number with GPIO direction(either input or output mode)


    2. HANDLE h = CreateFile(L"GIO1:",..,..,..)

    Here, you are trying to open the GPIO instance 1 and storing the handle in Handle variable h

    3. DeviceIoControl(h,IOCTL_GPIO_SETMODE,config,sizeof(config),NULL,0,NULL,NULL);

    Here you are using DeviceIoControl that is mapped with GPIO driver XXX_IoControl and here you are using

    IOCTL_GPIO_SETMODE - basically set the mode of the passed GPIO number and mode in config array


    4. DeviceIoControl(h,IOCTL_GPIO_SETBIT,config,sizeof(config),NULL,0,NULL,NULL);

    IOCTL_GPIO_SETBIT - basically set the configured GPIO bit means you are writting on the bit


    5. DeviceIoControl(h,IOCTL_GPIO_CLRBIT,config,sizeof(config),NULL,0,NULL,NULL);

    IOCTL_GPIO_CLRBIT - its clearing the set bit


    If anything is missing then please ask...

    If you think that the above is the answer of your query then please mark it as an answer...
  • thanks partap.!
  • Dear Karthick,
    If your problem resolved then please mark it as a like....

    ~Thanks

  • For this gpio toggling test no need of CTK. Can make use of test application given under:
    \WINCE700\platform\EVM_OMAP3530\SRC\test\testGPIO
    While making build, it will generate a GpioTest.exe application under:
    \WINCE700\OSDesigns\OSDesign3\OSDesign2\RelDir\EVM_OMAP3530_ARMV7_Release

    that can be used to test the gpio toggling. To achieve this, once OS image downloaded to the target device, go to Target tab in VS2008, select Run Programs and choose GpioTest.exe and run it.
    Set a break point if you need to understand the flow of the code by Step into or Step over....that's it.

    Regards,
    Karthick