Problem with CS1

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with CS1

392 Views
sidnevmaxim
Contributor I

It isn't possible to address to External MRAM Memory on CS1.

I use M523XEVB set

I program in the environment of IAR V1.23 KickStart.

 

For initialization of CS1 I use a code

 

  MCF_CS1_CSAR = 0x3000;

  MCF_CS1_CSCR = 0x3d20;

  MCF_CS1_CSMR = MCF_CS_CSMR_BAM_1M | MCF_CS_CSMR_V;

 

In the lnkm5235EVB_flash.xcl file (the configuration IAR file) I import a line:

 

Z(DATA)FAR_I,FAR_Z,FAR_N,HEAP+_HEAP_SIZE,.iar.dynexit+((_DYNEXIT_ELEMENTS+14)*C)=30000000-3000FFFF

 

As Flash Programmer I use CodeWarrior v6.3 for a configuration of a board I use the standard MCF523xEVB_PnE.cfg file

 

In the program I address to this area of memory and I have no activity on CS1.

Labels (1)
0 Kudos
7 Replies

155 Views
TomE
Specialist I

What is the current Pin Assignment for the CS1/PCS1 pin? See:

12.3.1.5.4 Chip Select Pin Assignment Register (PAR_CS)

> In the program I address to this area of memory and I have no activity on CS1.

Disassemble your code and make sure it is generating the address you think it is.

If you have a debug pod, try reading the memory from there.

Directly access the memory in a test loop with something like "long int tmp = *((long int *)0x30000000);"

Tom

0 Kudos

155 Views
sidnevmaxim
Contributor I

>What is the current Pin Assignment for the CS1/PCS1 pin? See:

>12.3.1.5.4 Chip Select Pin Assignment Register (PAR_CS)

PAR_CS bits1 = 1 (CS1 pin configured for EIM CS1 function)

>Disassemble your code and make sure it is generating the address you think it is.


// Init CS1

//  166   MCF_CS1_CSAR = MCF_CS_CSAR_BA(EXT_SRAM_ADDRESS);

        MOVE.W    #12288, D0

        MOVE.W    D0, (__IPSBAR+140).L

//  167   MCF_CS1_CSCR = 0x3d20;

        MOVE.W    #15648, D0

        MOVE.W    D0, (__IPSBAR+150).L

//  168   MCF_CS1_CSMR = 0x000F0001;//MCF_CS_CSMR_BAM_1M | MCF_CS_CSMR_V;

        MOVE.L    #983041, D0

        MOVE.L    D0, (__IPSBAR+144).L

........

// RAM access

//  271   long int tmp = *((long int *)0x30000000);

        MOVE.L    (0x30000000).L, D0

//  272

//  273   tmp++;

        ADDQ.L    #1, D0

No activity on CS1

Maxim.

0 Kudos

156 Views
TomE
Specialist I

Try programming CS1 as a GPIO set to Output and make sure you can see the pin go up and down when you write ones and zeros to the pin.

Try programming it as an input and then see if you can see the pin state change when you pull CS1  high and low (with a resistor).

Try one of the other chip-select pins if you have them connected to a pad you can get to.

Tom

0 Kudos

156 Views
sidnevmaxim
Contributor I

>Try programming CS1 as a GPIO set to Output and make sure you can see the pin go up and down when you write ones and zeros to the pin.

I checked as GPIO output works operationally


>Try programming it as an input and then see if you can see the pin state change when you pull CS1  high and low (with a resistor).

I use m523xEVB. Without circuit changes it is difficultly to make it

>Try one of the other chip-select pins if you have them connected to a pad you can get to.

I am sure that CS1 is hardware operational. For its check I used Tool Hardware Diagnostics (Code Warrior 7.2). Memory Test tab. Address Range: Start 0x30000000 End 0x300000ff. Enable test:

- Walking 1s

- Address

- Bus Noise

Configuration file: MCF523xEVB_PnE.cfg

A test passes successfully and on CS1 there is an activity

I have a question:

What do I do incorrectly in my user program to address to RAM on CS1?

0 Kudos

156 Views
TomE
Specialist I

> What do I do incorrectly in my user program to address to RAM on CS1?

I don't know. That's what programming and debugging are all about.


Can you cut-and-paste code from a working example into your code?

Tom

0 Kudos

156 Views
sidnevmaxim
Contributor I

>Can you cut-and-paste code from a working example into your code?

Yes I can paste the code from working example if You would give me.

Maxim.

0 Kudos

156 Views
TomE
Specialist I

> Yes I can paste the code from working example if You would give me.


I meant the Memory Test code that you're running.


Or any other sample code that Freescale has provided for that or similar chips.


You should also be able to read the MCF523xEVB_PnE.cfg file and convert whatever is in there to equivalent code.

Tom

0 Kudos