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.

Memory Map Error using 6713



Hi everyone,

I have, I believe, a fairly simple problem to solve, so if anyone would like to help, that would be great. 

I'm using the 6713 board and I'm currently trying to test the line in and line out functionality.  What I'd like the program to do is receive an audio input to line in and then just pass it immediately to line out.  Nothing fancy.  The code builds without any errors but when I try to run the program on the board I get a Memory Map Error:

Trouble running Target CPU:   Memory Map Error: READ access by CPU to address 0x1b7c100, which is RESERVED in Hardware.

I looked online and found suggestions to add a line to the .gel file, which I did:

GEL_MapAdd(0x01b7c000, 0, 0x00000128, 1, 1); // PLL

I reloaded the .gel file, saved, rebuilt, loaded and still the same error.

Does anything look blatantly wrong?  I'm a novice programmer, so forgive me for any huge errors.

Thanks.

 

  Here is the code:


#define CHIP_6713 1
#include "dsk6713_aic23.h"    //codec-DSK support file
#include "dsk6713.h"
#include "csl.h"

Uint32 fs=DSK6713_AIC23_FREQ_48KHZ;    //set sampling rate

interrupt    void c_intll()        //interrupt service routine
{
    short    sample_data;
   
    sample_data = input_sample();    //input data

    output_sample(sample_data);        //output data
    return;
}

void    main()
{
    comm_intr();        //init DSK, codec, McBSP
    while(1);            //infinite loop
   
}

  • You did the right step. Did you actually reload the GEL file inside CCS (right click, Reload)? CCS has the ability to define a Memory Map based upon these instructions in the GEL script to prevent accesses to invalid memory space. This is the cause of the error, and you took the right step to correct it. As long as the GEL file has been properly reloaded you should be OK.

    Note that the GEL file is completely separate from your active project, so if you rebuild the project this is not including any changes done to the GEL script.

    *edit* You can view the CCS memory map by selecting Option->Memory Map. Make sure that the memory range in question is actually listed there as RAM.

  • Tim,

    Thanks for such a speedy reply.  Unfortunatly, it has not solved the problem.  I closed CCS and reopened it so that it would reinitialize the .gel file, but that didn't help.  Under my Build Options, I changed the Memory Models to Far (--mem_model_data=far), which I read from some slides from a workshop based on this DSP, but that is the only setting I can think of that could influence the error.  Are there common programming syntax errors that may cause this?  Or perhaps I've included some files in my Project that are causing memory conflicts?

    Thanks,

     

    Edit:  Tim, I just saw your edit.  So would I make the starting address 0x01b7c000 and the Length 128 and change the type to RAM?

  • UR_PS said:
    Are there common programming syntax errors that may cause this?  Or perhaps I've included some files in my Project that are causing memory conflicts?

    No, this isn't caused by a memory conflict or anything like that. Something tried to access that address and it failed, thus causing the CCS error you see.

    UR_PS said:
    Edit:  Tim, I just saw your edit.  So would I make the starting address 0x01b7c000 and the Length 128 and change the type to RAM?
    This should be what the GEL_MapAdd() you added does. But if it's not showing up in the Option->Memory Map window, try adding this range manually as RAM and see if the issue goes away.

  • Tim,

    Sorry for the delayed response.  I ended up installing code composer on another computer and set everything up and I was able to load it successfully.  I did also change my program to something simpler, I think.  Does it seem like this program will still function correctly?

    Thanks.


    #define CHIP_6713 1
    #include "dsk6713_aic23.h"    //codec-DSK support file
    #include "dsk6713.h"

    Uint32 fs=DSK6713_AIC23_FREQ_48KHZ;    //set sampling rate

    interrupt    void c_intll()        //interrupt service routine
    {
         Uint32 temp;

        temp = MCBSP_read(DSK6713_AIC23_DATAHANDLE);    //input data
        MCBSP_write(DSK6713_AIC23_DATAHANDLE, temp);   //output data
    }

    void   main()
    {
        while(1);            //infinite loop
      
    }

  • I think you will need a dummy write inside the main() function to get things started (or wherever you are configuring the peripheral). Other than this and the fact that your processor cycles are effectively wasted inbetween interrupts I don't see any reason this wouldn't work.

  • Tim,

    I'm sorry if this is a really stupid questions, but what do you mean by putting a "dummy write" in main?  What would the syntax for that be?

    Thanks.

  • To start the McBSP you need to write to the transmit buffer (usually a 'dummy' value which gets thrown away). If you have not already done so see the McBSP Initialization Procedure in section 7 of the User Guide.