Hi,
I am using Spectrum Digital DM6446 Evaluation board and using CCS V 5 for debugging and also using Spectrum Digital emulator XDS 560 v2 LC traveler.
Trying to run sample application given on spectrum website, I am trying LED application,video application and ddr2 tests in a while loop as shown below.
The code will run for few counts like sometimes 10, 20, 30 and hangs these count also not same in each run. I am able to run infinitely if i run only on test in while loop like only LED or only DDR2 test, what might be the problem?
#include "stdio.h"
#include "davincievm.h"
#include "davincievm_uart.h"
#include "davincievm_i2c.h"
#include "davincievm_led.h"
#include "davincievm_nandflash.h"
#include "davincievm_ddr.h"
Uint8 TESTPASS[16]="Test Executed..!";
Uint8 TESTSTART[15]="Test Started..!";
/* ------------------------------------------------------------------------ *
* *
* main( ) *
* *
* ------------------------------------------------------------------------ */
void main( void )
{
Int16 count=0,i=0;
UART_Handle UartHandle;
/* Initialize BSL */
DAVINCIEVM_init( );
UartHandle = DAVINCIEVM_UART_open( 0, 115200 );
DAVINCIEVM_LED_init( );// for LED test
tvp5146_init( );// for Video test
while(1)
{
for ( i = 0 ; i < 15 ; i++ )//15
{
// TX
while( DAVINCIEVM_UART_xmtReady( UartHandle ) ); // Check for TX ready
DAVINCIEVM_UART_putChar( UartHandle, TESTSTART[i] ); // TX 1 byte
}
ddr_test();
DAVINCIEVM_waitusec( 250000 );
nandflash_test( );
DAVINCIEVM_waitusec( 250000 );
led_test( );
DAVINCIEVM_waitusec( 250000 );
video_loopback_test( );
DAVINCIEVM_waitusec( 250000 );
for ( i = 0 ; i < 16 ; i++ )//16
{
// TX
while( DAVINCIEVM_UART_xmtReady( UartHandle ) ); // Check for TX ready
DAVINCIEVM_UART_putChar( UartHandle, TESTPASS[i] ); // TX 1 byte
}
printf( "\n*** Test Count --> %d. Passed***\n",count );
count++;
}
printf( "\n***ALL Tests Passed***\n" );
SW_BREAKPOINT;
}
console LOG:
-------------------------
[ARM9_0]
*** Test Count --> 0. Passed***
*** Test Count --> 1. Passed***
*** Test Count --> 2. Passed***
*** Test Count --> 3. Passed***
*** Test Count --> 4. Passed***
*** Test Count --> 5. Passed***
*** Test Count --> 6. Passed***
*** Test Count --> 7. Passed***
below code runs infinitely:
-------------------------------------------
/* ------------------------------------------------------------------------ *
* *
* main( ) *
* *
* ------------------------------------------------------------------------ */
void main( void )
{
Int16 count=0,i=0;
//UART_Handle UartHandle;
/* Initialize BSL */
DAVINCIEVM_init( );
while(1)
{
ddr_test();
DAVINCIEVM_waitusec( 250000 );
printf( "\n*** Test Count --> %d. Passed***\n",count );
count++;
}
printf( "\n***ALL Tests Passed***\n" );
SW_BREAKPOINT;
}
Regards,
Venkat