HC11E1 NVM related problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HC11E1 NVM related problem

1,650 Views
gauri_mahajan
Contributor I
Hi,
 
We are using HC11E1 processor in our device which has LCD display and supports HART communication. There is a database stored in the NVM memory. We are facing a problem when we add a new data item to NVM database. The same code works absolutely fine on emulator without any problem. But when it is put in PROM, the device doesn't work. It displays nothing and also communication doesn't work. We are unable to know whats happening in the device code.  We have tried erasing the NVM and loading it again, but this didn't help.
 
Can anybody help about this?
 
Thanks in advance!
 
Gauri
Labels (1)
0 Kudos
3 Replies

365 Views
tonyp
Senior Contributor II
Your problem description is a bit vague.  Apparently the problem is you can't save to EEPROM in stand-alone mode, although you can under the Emulator.

One possibility is that you have NOT enabled EEPROM programming by writing the appropriate value in BPROT.  This is a cycle-limited operation (it has to occur within 64 cycles of reset).  The emulator running in one of the special modes does not have this restriction.

It's possible there is a timing issue.  A difference in speed between the emulator and actual device would throw all delays off.



Message Edited by tonyp on 2008-08-05 12:08 PM
0 Kudos

365 Views
gauri_mahajan
Contributor I
Yes, LCD and HART aren't related to the problem. But there is an earlier version of code where everything including LCD and HART is working okay on PROM. This version also has a database in NVM and we can see the data getting updated in NVM database when the device is running. EEPROM writing is enabled in BPROT in intial 64 cycles.
 
We are using Nohau emulator for HC11 with target board. We are using the target board crystal with emulator and not the one on the POD. So effectively we are working at the same frequency with emulator and on the standalone device. Still I agree that emulator will still add some delay. So we also tried incresing the write delay for NVM. But it didnot help.
 
We have debugged this to some extent and we found that the code works fine on PROM with all other changes except the change in NVM database. When we include that, the device stops working.
0 Kudos

365 Views
tonyp
Senior Contributor II
Some ideas:

Check for uninitialized memory; emulator software and, more often, startup scripts often initialize RAM to 'convenient' zeros or other values used during testing.

Check for COP issues particularly during the programming delays. Some emulators do not react to COP timeouts.  Although in many situations a COP timeout would be set to cause a startup reset (noticeable in most systems with LCD and startup messages) it's possible you're treating it through its separate vector in a way that it goes visibly unnoticed.

If in expanded mode (which I suspect you are if this is indeed a 11E1, and not a 711E1):
Check possible problems due to slight incompatibilities in the memory maps between device and emulator.

It might help posting the suspect code (the update routine, for example) for public review.  There could be a subtle error that needs a different set of eyes to catch.  An assembler/compiler listing (with all symbols resolved) may help.
0 Kudos