Forum Discussion
Altera_Forum
Honored Contributor
15 years agoProblems with 16-bit DDR2-SDRAM connected to Nios
Hi, I am trying to implement a nios system(cyclone III) with 16-bit DDR2 SDRAM and 16-bit Flash device. While try to erase the flash device using the routine listed below unsigned in...
Altera_Forum
Honored Contributor
15 years agoNot sure what your problem is?
The flash sector size could well be 64k bytes (except maybe for 'boot' sectors at one end of the device), so you can only erase multiples of that size. As a general point, don't use int16 (or short) unless you really want wrapping at 2^16, are saving space in a structure, or mapping actual hardware registers into a structure. All you do is cause the compiler to generate extra instructions every time you do any maths. In the above, both your int16 items will be promoted to 'int' (32 bits) before the multiply - so that shouldn't be relevant. The size of the flash chips data bus is mostly irrelevant - apart from the problems in generating the required single cycles during the programming operation.