This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problems to configure the EMC on LPC2294

Hi at all,

I want to connect an external 16 Bit Flash to the LPC2294 external memory controller. I think the hardware is all right but if I try to send some commands I got not correct data back. One problem is that I had no experience with such external controller, and I had less information's how it works.

I have configured µVision with the address range from 0x80000000 and with a length of 0x00FFFFFF. My Settings for BCFG0 are: IDCY =1; WST1 &2 =5; RBLE=1; WP=0; BM=0; MW =16Bit
PINSEL2 are PINSEL2=0x0f014924;

I use two methods to communicate with the Flash:
1. #define EMC_FLASH_ADR1 (*((volatile unsigned short *)0x80005555))

Write operation: EMC_FLASH_ADR1=0x00AA;
Used for fixed addresses

2. #define sysAddress(offset) (*(volatile short *)(system_base + offset))

Write operation: Producer =sysAddress(0x0000);
Used for variable addresses

A little demo program:

void GET_ID()
{
        unsigned short Producer,Device_ID;
        EMC_FLASH_ADR1=0x00AA;
        EMC_FLASH_ADR2=0x0055;
        EMC_FLASH_ADR1=0x0090;  //cmd 4 ID
        Delay_150_Nano_Seconds();
        Producer =sysAddress(0x0000);
        Device_ID =sysAddress(0x0001);
        printf("\n Producer=%XH & Device_ID=%XH\n",Producer,Device_ID);
}


Now I would like to now if my code is correct or if do something wrong, and if I have something overlook.

THX for help Michael

PS: I use the Keil student version

0