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.

General Purpose I/O on 6713

Hi,

I am trying to use the GP I/O pins on the J1 peripheral, but I can't get it to work.  To test, I'd like to toggle a pin.  I've included csl_gpio.h, csl_gpiohal.h

So far, I have this:

//define

GPIO_Handle hGpio;

//and this is in main()
hGpio = GPIO_open(GPIO_DEV0,GPIO_OPEN_RESET);
GPIO_pinEnable(hGpio,GPIO_PIN3);
GPIO_pinDirection(hGpio, GPIO_PIN3,GPIO_OUTPUT);

 

Does anybody have any examples on how to do this?

Thanks.

  • HI,

    Did you pull pin75 (DC_DET) low on J3?  This pin is used to detect daughter cards, and if it is not pulled low the headers are not enabled.

    -Devin

  • Hi Devin,

    Thanks for your reply.  I just tied pin 75 to pin to pin 77 (ground) and tried it again.  When I step through the program, I can see some registers change value, in particular the GPVAL, so I feel like the program is doing something, just not what I want.  Any ideas?

    Thanks.

    #define CHIP_6713 1
    #include <stdio.h>
    #include <c6x.h>
    #include <csl.h>
    #include <csl_mcbsp.h>
    #include <csl_irq.h>
    #include <csl_gpio.h>
    #include <csl_gpiohal.h>
    #include "dsk6713.h"

    //definitions
    GPIO_Handle hGpio;
    unsigned b=0;

    void main()
    {

     DSK6713_init();        // Initialize the board support library, must be called first

        hGpio = GPIO_open(GPIO_DEV0,GPIO_OPEN_RESET);
        GPIO_pinEnable(hGpio,GPIO_PIN3);
        GPIO_pinDirection(hGpio, GPIO_PIN3,GPIO_OUTPUT);

        GPIO_pinWrite(hGpio,GPIO_PIN3,b);

    }