- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I'm trying to run a simple "Hello Word" program in a Nios project on a Opus103 EVB. The device is EP1C6144, with an extrernal 2Mb 16-bit wide SDRAM connected to it. Using the standard "Hello Word" from NiosII IDE I see printed on both UART and JtagUART "HHllooffoo iissII!!" instead of "Hello from NiosII!" The project is compiled with all data (.text, .rodata, .rwdata) mapped in external SDRAM. Using variables for computational purposes, watching memory and variables inspection windows, everything looks well... but printf doesn't give the expected output. The only way to fix this problem is put at least .rwdata objects in internal RAM. Does anyone have an idea of what is wrong in my project? Than you, PaoloLink Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not familiar with the board you're using, but it looks a lot like you've got a problem in your SDRAM interface. My hunch is that the lower address bit is stuck (e.g. always 0) so that on a set of sequential byte accesses you wind up getting the sequence you've shown.
The reason this wouldn't cause problems for fetching the code itself is that this will be word aligned.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I checked A0 and it is well behaved, it goes correctly from 0 to 1 and viceversa...
Now I see the program crashing also using internal RAM for .rwdata... It prints well, but crashes... I'm thinking about SDRAM clock phase... Thank you however... Paolo- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Continued on sdram byte (8-bit) write access (http://www.niosforum.com/forum/index.php?act=st&f=2&t=1443) topic...
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page