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.

Howto toggle a GPIO on EVM816x

Hi

Can anybody tell me how to make a simple application that runs on the DSP in the C6A1868 (EVM816x board) and toggles a GPIO pin?

I am an absolute newbie to the whole world of ARM / DSP / CCS / Linux, so I really do not know where to start.

I have managed to make a "Hello World" application and to download and run it using the JTAG, but I can not find any exaples that enables me to toggle a GPIO.

Best

Jens

  • This thread leads to some further hints:

    Maybe it helps,
    regards,

    Joern.

  • HI

    Yes it is the EVM from digital, and I have already tried with the BLS that they supply. 

    It seems to me that the evm816x_gpio.h is not for the C6A8168 processor, since the GPIO controller base is defined to 

    #define GPIO_BASE               ( 0x01c67000 )
    but for the C6A8168 GPIO0 is at address 0x4803200
    I have tried with a main function like this
    
    
    EVM816X_GPIO_init         ( );
    EVM816X_GPIO_setDirection (GPIO27, GPIO_OUT);
    EVM816X_GPIO_setOutput (GPIO27, 1);
    but it crashes when executing the first init function.
    
    
    Jens
  • FYI

    I have made some progress on making a GPIO toggle.

    - I have modified the evm816x_gpio.h from Digital Spectrum, so it matches the C6A8168 (base address and register structure).

    - I have updated the GEL file evm816x.gel to setup the pin that I want to toggle
       #define conf_gp0_io6 (CTRL_MODULE_BASE_ADDR + 0x0CA0)

    Setup_PADCTRL( )
    {
    ...
    WR_MEM_32(conf_gp0_io6 , 2); // GPMC A23
    ...

    - Then I have made a program that runs on the ARM that toggels GP0[26] 

    #include <stdio.h>
    #include "evm816x.h"
    #include "evm816x_gpio.h"

    void main(void) 
    {
    long int i, j;
    EVM816X_GPIO_setDirection(GPIO26, GPIO_OUT);
    while (1)
    {
    EVM816X_GPIO_setOutput(GPIO26, j);
    j ^= 1;
    }
    }

    This is obviously great, but it does not solve my problem, since I need to access the GPIO from the DSP.
    I have read in the Reference manual that the GPIO is connected to the L4 interconnect, which the DSP can access through a System MMU, but I have absolutely no idea about how to do this.
    So I would greatly appreciate it if somebody could point me in the right direction
    Thanks
    Jens Biltoft