Forum Discussion
Altera_Forum
Honored Contributor
15 years agoURGENT: Flash memory
Hello. I am doing a project regarding DMA. However I need to use flash memory on the DE2 Board. I have done the instantiation for the flash but I cannot use because it always return zero for the func...
Altera_Forum
Honored Contributor
15 years ago --- Quote Start --- 2. How to manually test the flash? Sorry cause I am starting from zero, so I am very new in this. --- Quote End --- Assuming your flash memory has a 16bit data interface /* enter autoselect mode */ IOWR(EXT_FLASH_BASE, 0x555, 0xaa); IOWR(EXT_FLASH_BASE, 0x2aa, 0x55); IOWR(EXT_FLASH_BASE, 0x555, 0x90); int Manufacturer_ID = IORD(EXT_FLASH_BASE, 0); int Device_ID = IORD(EXT_FLASH_BASE, 1); /* back to normal mode (memory data read) */ IOWR(EXT_FLASH_BASE, 0, 0xff); Search the web for the specific flash memory datasheet to have further information and the ID codes. About breakpoints and step into the code: what dev tools do you use? If Nios IDE, you simply place the breakpoint by double clicking on the left side of source code window. Then the Nios program will stop there when the instruction is executed (you must start the code with Debug as... -> Nios hardware). How are you debugging now?