Problems after trying to initialize SDRAM
I have a Hitex LPC4350 eval board, and I was trying to get the SDRAM up an running on it. However, I am running in to some weirdness, and since I am new to this I am not quite sure what to think.
It initially started when I was watching the memory viewer trying to view the SDRAM contents. All of a sudden all of the values in memory were 0xAAAAAAAA. I also noticed that the same thing happened to all of the registers that were present in the debugger windows.
When I tried to stop the debug session I got a message that said that the CPU couldn't be stopped, so I reset the board, things worked great and then it happened again, except this time there was a load verify error and the whole load was all 0xAAAAAAAA. sometimes the load is partially correct with blocks of data being corrupted.
Is my program writing into memory where it isn't supposed to? I am not sure what is happening. I can get it to run for a random amount of time but as soon as I debug, everything goes down the tube. I have commented out just about all of my code, and now it even freezes on the first line of my c++ init function.
Can anyone tell me what is going on here? I saw s post somewhere that said something about overwriting the boot loader, did I somehow do that?
-
I was able to stop the debugger at a break point just before my init function, and I hit the reset icon up in the debug window, and magically all of the registers reset. I was able to work for a while, and then crossworks crashed, and now all of the registers say 0xFEFEFEFE and I can't get them to reset again?
-
When I use my cross connect it at least downloads the program and reads bad register values, but when I use my JLINK it says : cannot find debug component in ROM table. So I used the jlink tools and I get the following:
Info: Could not measure total IR len. TDO is constant high.
Info: Could not measure total IR len. TDO is constant high.
No devices found on JTAG chain. Trying to find device on SWD.
No device found on SWD.
Did not find any core.
Info: Could not measure total IR len. TDO is constant high.
Info: Could not measure total IR len. TDO is constant high.
No devices found on JTAG chain. Trying to find device on SWD.
No device found on SWD.
Did not find any core.The start up program still works and the LEDs chase each other, does anyone have a clue what is going on?
-
Does your code reuse the JTAG/SWD pins as GPIO (or for anything else) ?
With external SDRAM you probably refer to the FSMC (at least that is its name in the ST world, the ext. memory interface unit). I would at least try to start with a rather conservative timing. Maybe you have set it too tight.
On one thing I quite early stumbled upon in Crossworks are stack overflows. The default value the Rowley boys are granting for Cortex M3/M4 are a meager 128 byte. That is far too few for any decent application.
Otherwise it's quite hard to judge your problem from far...
Please sign in to leave a comment.
Comments
3 comments