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