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.

UART interrupt doesn't work after adding helloworld to existing project

Hi,

Thanks to your help. I have implemented UART interrupt and GPIO interrupt successfully. Also, clock timer is working correctly with interrupts.

And then I need NDK to transmit sensor data to server.

So, I added helloWorld project to my project.

After adding, helloWorld on EVM6678l is working without problem. I verified using helloworld winapp dos program.

But UART interrupt didn't work. Clock timer is working correctly. I think GPIO interrupt is working.

Could check my *.cfg file?

I think I'm using interrupt 7 used by NIMU.

Thanks in advance.

Baeyoung

1727.nara_dsp.cfg

  • Hi,

    I hope, it won't conflict between UART and NDK since NDK hello world example has UART prints.

    1)
    "platform_write" is the API used to print logs on UART console.

    char *VerStr = "\nTCP/IP Stack 'Hello World!' Application\n\n";

    /* Get information about the platform so we can use it in various places */
    memset( (void *) &gPlatformInfo, 0, sizeof(platform_info));
    (void) platform_get_info(&gPlatformInfo);

    (void) platform_uart_init();
    (void) platform_uart_set_baudrate(115200);

    platform_write(VerStr);

    2)

    Do you have "EVM_init" in your project code and executing ?


    /*************************************************************************
    * @b EVM_init()
    *
    * @n
    *
    * Initializes the platform hardware. This routine is configured to start in
    * the evm.cfg configuration file. It is the first routine that BIOS
    * calls and is executed before Main is called. If you are debugging within
    * CCS the default option in your target configuration file may be to execute
    * all code up until Main as the image loads. To debug this you should disable
    * that option.
    *
    * @param[in] None
    *
    * @retval
    * None
    ************************************************************************/
    void EVM_init()
    {
    platform_init_flags sFlags;
    platform_init_config sConfig;
    /* Status of the call to initialize the platform */
    int32_t pform_status;

    /*
    * You can choose what to initialize on the platform by setting the following
    * flags. Things like the DDR, PLL, etc should have been set by the boot loader.
    */
    memset( (void *) &sFlags, 0, sizeof(platform_init_flags));
    memset( (void *) &sConfig, 0, sizeof(platform_init_config));

    sFlags.pll = 0; /* PLLs for clocking */
    sFlags.ddr = 0; /* External memory */
    sFlags.tcsl = 1; /* Time stamp counter */
    #ifdef _SCBP6618X_
    sFlags.phy = 0; /* Ethernet */
    #else
    sFlags.phy = 1; /* Ethernet */
    #endif
    sFlags.ecc = 0; /* Memory ECC */

    sConfig.pllm = 0; /* Use libraries default clock divisor */

    pform_status = platform_init(&sFlags, &sConfig);

    /* If we initialized the platform okay */
    if (pform_status != Platform_EOK) {
    /* Initialization of the platform failed... die */
    while (1) {
    (void) platform_led(1, PLATFORM_LED_ON, PLATFORM_USER_LED_CLASS);
    (void) platform_delay(50000);
    (void) platform_led(1, PLATFORM_LED_OFF, PLATFORM_USER_LED_CLASS);
    (void) platform_delay(50000);
    }
    }
    }

    Generally, in keystone devices, we have "EVM_init" function to initialize the platform code and it will execute while loading the *.out to DSP core.
    Need to have the "EVM_init" function in your code and the following code should present in *.cfg.

    Startup.lastFxns.$add('&EVM_init');
  • Dear Titus,
    Thanks for your answer.
    Actually, I am using EVM_init() as the user first startup function. And I enabled UART register for interrupt and then started BIO_start().
    But stacktest is using platform_uart_init(), so UART control register is initialized. so I commented platform_uart_init() in Stacktest().
    I am wondering where I set UART control register for interrupt.
    Thanks so much.
    Baeyoung
  • Hi,
    UART source code is available in the following location.
    C:\ti\pdk_C6678_1_1_2_6\packages\ti\platform\evmc6678l\platform_lib\src
    evmc66x_uart.c
    platform.c
  • Dear Titus,

    Thanks for your update.

    You saved me a lot of time.

    Bye

    Baeyoung

  • Thanks for your update.