The primary message of this thread has been hidden. This can happen if the message has been hidden by a moderation, or has been reported as abusive.
1,111 Views 6 Replies Last post: Feb 8, 2010 12:42 PM by msherman RSS
DJ Delorie Novice 260 posts since
Mar 12, 2009
Currently Being Moderated

Nov 21, 2007 12:15 AM

nHOLD: memory expansion mode vs serial programming

nHOLD: memory expansion mode vs serial programming
msherman Newbie 9 posts since
Jan 27, 2010
Currently Being Moderated
2. Feb 5, 2010 4:03 PM in response to: DJ Delorie
Re: nHOLD: memory expansion mode vs serial programming

Would you say for the M16C in memory expansion mode, this would be the same reasoning? Here's my situation: I am connected via E8a to my board. If I'm stepping through my code, as soon as I execute the line to set PM00 to 1, I get a communication timeout error for the emulator. Of course this is about 3 or 4 lines into the ncrt0 assembly code. However, after reconnecting and restarting, when I click Go, I get past that point, but I can no longer communicate to the system. The only option available to me is to Halt the program, and when I click that, I get the timeout error. If I comment out the line where I set memory expansion mode and run it again, I can step through the program or execute the program, but I get stuck in an infinite loop waiting for a timer to get a signal. I can press the stop or halt button here and interact with it, but I cannot get to the rest of the code (no mem exp - lcd, etc.)

 

Ok, I hope that made sense.

FrankL Apprentice 958 posts since
Mar 16, 2009
Currently Being Moderated
4. Feb 8, 2010 12:52 AM in response to: msherman
Re: nHOLD: memory expansion mode vs serial programming

I'm not convinced that this will help.

First a small question, did you set the processor mode in the init dialog of E8a to memory expansion mode (in the first start-up window of E8a on the MCU setting register card)?

 

When E8a starts to program the device flash it actively pulls P55 (nHOLD) low and outputs "HIGH" to P50. So if you have a pull-up on nHOLD which is not to small (say > 2-3k) you should not have a pronblem with this. I have a hardware using 10K pull-up on nHOLD and nRDY which works fine.

But do you have a pull-up at all? Does your external memory use RDY and HOLD? As soon as you switch the processor mode to expansion mode, the processor will output ALL address signals on the bus independant of the address. So your external memory will also see all access to internal memory on the external bus.

msherman Newbie 9 posts since
Jan 27, 2010
Currently Being Moderated
5. Feb 8, 2010 9:20 AM in response to: FrankL
Re: nHOLD: memory expansion mode vs serial programming

Yes, on the MCU Setting page, I have the Processor Mode set to Memory Expansion Mode, Memory Space Expansion is set to Normal Mode, PM13 is '1' checked. There is a 100k pull up on HOLD.

 

Message was edited by: msherman

msherman Newbie 9 posts since
Jan 27, 2010
Currently Being Moderated
6. Feb 8, 2010 12:42 PM in response to: msherman
Re: nHOLD: memory expansion mode vs serial programming

Good news! Apparently our pull-up resistor was a bit too high to get a logic 1 on the HOLD pin, so we added a small(er) resistor in parallel and got the voltage up high enough to keep the chip awake during debugging. Thanks to both of you for your help!

More Like This

  • Retrieving data ...

Bookmarked By (0)