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.

problem with davinci evm DM6446 program execution in while loop

Other Parts Discussed in Thread: TVP5146

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

  • Hi Arvind,

    Thank you and sorry to lead you towards confusion, I am continuing the same thread you have mentioned, it was posted by one of my colleagues.

    I agree for the I2c sharing thing and even though if i comment I2C part and run two peripheral tests in a while loop still i am getting the same issue, take below code, here I have commented all other code except NAND flash and UART. here UART and NAND are not sharing any I2C or any bus.

    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

    }

    nandflash_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

    }



    regards,

    Venkat
  • Hi,

    I agree for the I2c sharing thing and even though if i comment I2C part and run two peripheral tests in a while loop still i am getting the same issue, take below code, here I have commented all other code except NAND flash and UART. here UART and NAND are not sharing any I2C or any bus.

    Please make sure that UART and NAND (EMIF) pins were not shared (pinmuxing).

    Please refer to the PINMUX0 and PINMUX1 register from DM6446 data sheet.
  • Hi,

    I also had the same doubt but as i have checked there is no multiplexed pins for UART0 and AEMIF as NAND flash and UART are considered. UART is muxes with GPIO35-36 in Pinmux1.

    regards