2006-03-01 07:28 AM
2006-02-28 03:35 PM
Hi
I am having problems with the EMI interface. I am interfacing a M28W320CB flash memory to a STR710 using Bank 0. I am trying to read the manufactuer and device ID's. I can ead the manufacturer ID ok (0x20) but cannot read the device ID. All I get back is 0x0088 when it should be 0x88BB. Looking at the address and data lines with a logic analyser I can see that the correct address and data is being set. My code is //Read Manufacturer ID program_Flash_write(ANY_ADDR,READ_SIGNATURE); readback=program_Flash_read(EMI_BANK0+MANUFACTURER_CODE_ADDR); program_Flash_write(ANY_ADDR,READ_MEMORY); //Read Device ID program_Flash_write(ANY_ADDR,READ_SIGNATURE); readBack =program_Flash_read(EMI_BANK0+DEVICE_CODE_ADDR); program_Flash_write(ANY_ADDR,READ_MEMORY); What is going on? I am using the Greenhills Compiler. Thanks Vaughan2006-03-01 02:07 AM
You could try this: (my flash is mapped at 0x6000 0000)
//configure the EMI so /CSO is pointing the flash, 16 bits large, 15 WS EMI_Config(0, EMI_ENABLE | EMI_WAITSTATE(15) | EMI_SIZE_16); u32 EMIData; //read electronic signature, for manuf and device *(u8*) 0x60000000=0x90; EMIData=*(u32*)0x60000000; //should be 00 02: manuf code *(u8*) 0x60000000=0x90; EMIData=*(u32*)0x60000002; //should be 88 BB: device code-Bottom param block type You can also refer to: http://mcu.st.com/mcu/modules.php?mop=modload&name=Splatt_Forums&file=viewtopic&topic=3670&forum=17 or http://mcu.st.com/mcu/modules.php?mop=modload&name=Splatt_Forums&file=viewtopic&topic=3525&forum=17 Hope this helps! Tech / Jp2006-03-01 07:21 AM
Hi Jp
Thanks for that, I tried it but with no luck. Just one thing though, the address you used to read the device ID is 0x60000002, according to the flash datasheet shouldn't this be 0x60000001? If I use this address the result I get is 0xbb004388. Thanks Vaughan2006-03-01 07:28 AM
Some more info.
My initial findings were using our target board. I have just run the code you suggested on the eval board (MB393) and it works fine as written. I suspect that it might be something to do with my target board. Cheers Vaughan