Content originally posted in LPCWare by Marc Crandall on Mon Dec 05 14:29:10 MST 2011
Hello,
I'm using an LPC1788 with a MT48LC16M16 SDRAM chip. All works well and I do not have any issues with the external memory in normal operation.
I use a bootloader to configure the external memory and run a memory check. My problem is when I get a watchdog reset in the main application (I'm causing them on purpose for testing) the configuration of the external SDRAM runs in the bootloader and one of two things happens:
1) Everything works exactly the same as on a power up (50% of the time)
2) As soon as I try and access the memory I get a fault that kills my debugger. (The other 50% of the time)
Does anyone have any idea what is going on? Note I have tried this with SCB bit 1 on/off no difference. I've also tried not re-configuring the EMC when it's a watchdog reset but this seems to fail every time.
Does anyone know how to safely and surely reset this SDRAM?
Thanks
M