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.

Unable to run platform_test example and no output on UART terminal

Hi,

I am using the 6678 evm board (shannon board), and was running the platform test example.

Actually I am trying to get some output on UART terminal. Switch configuration is: 

(off, off, on, off)1,2 (on, on, on, on)3 (on, on, on, off)4 (on, on, on, on)

In UART, I got some problems initially like no return from function platform_init() function, so I use gel file evmc6678l.c to initialize pll and ddr. My gel out put is showing one error as highlighted "L1P error detection logic enable is failed".

Following is the required information:

1. Path of GEL file:

C:\Texas Instruments\ccsv5\ccs_base_5.0.3.00028\emulation\boards\evmc6678l\gel

Following changes were done in default gel file:

//Changes made in gel file

StartUp( )
{
i2cprog=0;

Setup_Memory_Map( );
OnTargetConnect();       <====== Added ======
}

=========

2.  Output of GEL file execution:

TMS320C66x_0: GEL Output: Setup_Memory_Map...
TMS320C66x_0: GEL Output: Setup_Memory_Map... Done.
TMS320C66x_0: GEL Output:
Connecting Target...
TMS320C66x_0: GEL Output: DSP core #0
TMS320C66x_0: GEL Output: C6678L GEL file Ver is 1.5
TMS320C66x_0: GEL Output: Setup Cache...
TMS320C66x_0: GEL Output: L1P = 32K
TMS320C66x_0: GEL Output: L1D = 32K
TMS320C66x_0: GEL Output: L2 = ALL SRAM
TMS320C66x_0: GEL Output: Setup Cache... Done.
TMS320C66x_0: GEL Output: PLL1 Setup...
TMS320C66x_0: GEL Output: PLL1 Setup for DSP @ 1000.0 MHz.
TMS320C66x_0: GEL Output: SYSCLK2 = 333.3333 MHz, SYSCLK5 = 200.0 MHz.
TMS320C66x_0: GEL Output: SYSCLK8 = 15.625 MHz.
TMS320C66x_0: GEL Output: PLL1 Setup... Done.
TMS320C66x_0: GEL Output: Power on all PSC modules and DSP domains...
TMS320C66x_0: GEL Output: Power on all PSC modules and DSP domains... Done.
TMS320C66x_0: GEL Output: PA PLL is using SYSCLK/ALTCORECLK as the input
TMS320C66x_0: GEL Output: PA PLL is in PLL mode
TMS320C66x_0: GEL Output: PA PLL fixed output divider = 1
TMS320C66x_0: GEL Output: PA PLL programmable multiplier = 21
TMS320C66x_0: GEL Output: PA PLL programmable divider = 1
TMS320C66x_0: GEL Output: the output frequency should be 21 times the PA reference clock
TMS320C66x_0: GEL Output: configSGMIISerdes Setup... Begin
TMS320C66x_0: GEL Output:
SGMII SERDES has been configured.
TMS320C66x_0: GEL Output: Enabling EDC ...
TMS320C66x_0: GEL Output: L1P error detection logic enable is failed. <============ ERROR ==========
TMS320C66x_0: GEL Output: L2 error detection/correction logic is enabled.
TMS320C66x_0: GEL Output: MSMC error detection/correction logic is enabled.
TMS320C66x_0: GEL Output: Enabling EDC ...Done
TMS320C66x_0: GEL Output: Configuring CPSW ...
TMS320C66x_0: GEL Output: Configuring CPSW ...Done
TMS320C66x_0: GEL Output: DDR begin (1333 auto)
TMS320C66x_0: GEL Output: XMC Setup ... Done
TMS320C66x_0: GEL Output:
DDR3 initialization is complete.
TMS320C66x_0: GEL Output: DDR done

=========

3. Sample code:

void main (int argc, char *argv[])
{
platform_init_flags init_flags;
platform_init_config init_config;
platform_info p_info;
uint32_t led_no=0;
char message[]="Hello World\n";
uint32_t length=strlen((char *)message);
uint32_t i;


/* Set default values */
memset(&init_flags, 0x01, sizeof(platform_init_flags));
memset(&init_config, 0x0, sizeof(platform_init_config)); // Changed: 20120709
init_flags.pll=0;
init_flags.ddr=0;
memset(&init_flags, 0x00, sizeof(platform_init_flags));
printf("Platform is running part 1 \n");
if (platform_init(&init_flags, &init_config) != Platform_EOK) {
printf("Platform failed to initialize, errno = 0x%x \n", platform_errno);
return;
}
printf("Platform is running part 2 \n");
// platform_write_configure(PLATFORM_WRITE_PRINTF);
platform_write_configure(PLATFORM_WRITE_UART);
if(platform_uart_init()!= Platform_EOK);
        printf("Platform is running part 2 Failed\n");
printf("Platform is running part 3 \n");
if(platform_uart_set_baudrate(115200)!= Platform_EOK)
       printf("Platform is running part 3 Failed\n");
printf("Platform is running part 4\n");
//platform_get_info(&p_info);
for(i=0;i<length;i++)
{
printf("Platform is running part 5 [%d]\n",i);
if(platform_uart_write(message[i])!= Platform_EOK)
{
printf("platform_uart_write failed, errno = 0x%x \n", platform_errno);
//return;
}
}

printf("Platform is running part 6 \n");

}

=========

4. Program output on CCS console after running using CCS:

[TMS320C66x_0] Platform is running part 1
[TMS320C66x_0] Platform is running part 2
[TMS320C66x_0] Platform is running part 3
[TMS320C66x_0] Platform is running part 4
[TMS320C66x_0] Platform is running part 5 [0]

==================================================

It seems that platform_uart_write() is not returning back. Hanged or stuck in forever looping.

Can anyone suggest what can be the issue.

Thanks 

Anurag

  • For the UART Output you need to make sure you have the correct pins jumpered as in Figure 3.3 of the EVM's Technical Reference Manual.  Assuming you're doing this over the miniUSB header (which is over the XDS100v1) you'll need to change it from the default of pin3-5 & pin4-6 to pin1-3 and pin 2-4 jumpered.  Note you'd need an external emulator if you want to do UART over the USB port on the board and emulation.

    As for the error, start by looking at the value of the L1PEDSTAT register after the gel has executed. Is it 0x1?  If not try writing 0x1 to L1PEDCMD and check again.  It's not critical for this to be enabled, but it would be interesting if for some reason you could not enable it.

    L1PEDSTAT - 0x01846404

    L1PEDCMD - 0x01846408

    Best Regards,
    Chad

  • Hello Chad,

    Thanks for the reply.

    I am able to run diagnostics test utility provided in TI gui interface. If I write any string on the UART ,same is visible at Hyper terminal connected through mini usb. My board has also external emulator connected to it.

    Problem is, if I am running platform test example to check UART, no prints are observed at the hyper terminal connected. In code I verified that plaform_uart_write(), is not returning back.

    Also, If I connect  to mini usb of external emulator on board ,connection is refused by hyper terminal. Kindly give some suggestion for this.

    Thanks

    Anurag 

  • Hi,

    To verify the UART following are the steps I followed:

    1. Configure DIP switch to POST mode.

    2. Change yellow connector position to lower side to connect to RS-232 port.

    3. Run your program or platform test example. Make sure that you are calling uart init function in your program. 

    4. Connect to target using CCS, select your *.out file and press F8 to run.

    5. Check prints on your hyperterminal/tera term which ever you are using.

    Thanks

    Anurag