Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

EVMOMAP-L137 flash boot problem

$
0
0

Dear all,

I'm trying to boot the EVMOMAP-L137 from the SPI flash memory.

I have follow the steps in here: processors.wiki.ti.com/.../Boot_Images_for_OMAP-L137

There is a sample code that implements a blinker: the DSP enable the ARM, then the ARM turns on and off some leds in the board.

This sample code works fine. I'm able to download it to the board (I use HexAIS tool to generate the .bin file, then sfh_OMAP-L137 to download the flash file). After changing the SW2 position and turning on the board, OMAP-L137 boots correctly and I see the leds blinking.

Now my problem: I added a few lines to the DSP code in order to control the UART. The code is presented as follows:

#include "device.h"
#include "evmomapl137_uart.h"

#define KICK0Ra             *(unsigned int*)(SYS_BASE + 0x038)
#define KICK1Ra             *(unsigned int*)(SYS_BASE + 0x03c)

void main(void)
{
    UART_Handle uart0;
    // Open Permissions to SYSCFG Registers (Not required for PG2.0 silicon and above)
    KICK0Ra = 0x83e70b13;
    KICK1Ra = 0x95A4F1E0;

    DEVICE_enable_ARM();

    uart0 = EVMOMAPL137_UART_open( 2, 1248 ); // This work for baud=9600. baud*24000000*13/(16*150000000)

    while(1){
        while( EVMOMAPL137_UART_xmtReady( uart0 ) );  // Wait for uart_tx ready
        EVMOMAPL137_UART_putChar( uart0, 'A' );    // Write 1 byte
    }
}

When calling EVMOMAPL137_UART_open I pass as parameter 1248 instead of 9600 following the discusions in here.
             e2e.ti.com/.../964737
             e2e.ti.com/.../103027
             e2e.ti.com/.../412104

So, I just enable the ARM, then I send continuously 'A' through the serial port. When I lunch the project from ccs3.3 everything works ok: I see the leds blinking and receive continuously 'A' in my PC.

However, when the code is downloaded to the SPI flash, and the OMAP-L137 boots from it, I can see the leds blinking, but I don't receive anything in my PC (nothing comes out from the UART, I checked it with an oscilloscope).

This is the DSP linker.cmd file (I have just added the path to evmomapl137bsl.lib with respect to the original file):

-lrts64plus.lib
-l C:\CCStudio_v3.3\boards\evmomapl137_v1\dsp\lib\evmomapl137bsl.lib

-stack          0x00001000 /* Stack Size */ 

MEMORY
{
    L2RAM        org=0x80010000 len=0x00010000 /* L2 RAM/Cache */
}

SECTIONS
{
    .text       > L2RAM
    .const      > L2RAM
    .bss        > L2RAM
    .far        > L2RAM
    .switch        > L2RAM
    .stack      > L2RAM
    .data       > L2RAM
    .cinit        > L2RAM
    .sysmem        > L2RAM
    .cio        > L2RAM
}

This is the ARM linker.cmd file:

/*
 *  Linker command file
 *
 */
-
-stack           0x00000800      /* Stack Size */
-heap            0x00000800      /* Heap Size */


MEMORY
{
    ARMRAM:      o = 0xFFFF0000  l = 0x00002000
    DSPRAM:      o = 0x11800000  l = 0x00040000
    SHAREDRAM:   o = 0x80000000  l = 0x00020000
    SDRAM:       o = 0xC0000000  l = 0x20000000
}

SECTIONS
{
    .bss        >   SHAREDRAM
    .cinit      >   SHAREDRAM
    .cio        >   SHAREDRAM
    .const      >   SHAREDRAM
    .stack      >   SHAREDRAM
    .sysmem     >   SHAREDRAM
    .text       >   SHAREDRAM
    .switch     >   SHAREDRAM
    .far        >   SHAREDRAM
    .test_buf    >    SDRAM
}

Does anybody have any idea why the code doesn't work when booted from the flash?


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>