I'm using both QT2 and QT4 MCU on one common gerber design. My original firmware was designed for the QT2. Newer firmward utilizes the ROM-resident flash programming routines and as a result only fits in the QT4. Same fab is shared between firmware versions.
Symptom:
Under certain environmental conditions, target board fails a standard test. It was discovered that under these conditions, the jump vectors were being erased. As such, since the reset vector was reset to FF, the MCU was attempting to enter monitor mode and thus never executing user code. Curiously, the user code is NEVER affected, only the jump vectors.
Observations:
1) These failures almost seem ESD related. In isolated tests, we've been able to duplicate the failures by simply walking around and then touching the target.
2) The failures are only resident in my new firmware version (which uses the ROM-resident flash programming routines for memory storage).
3) If I load up these same QT4 targets with old firmware (non ROM-resident utilizing versions), I've never witnessed a failure.
4) Even after programming the flash block protect register (FLBPR @ $FFBE) this problem persists, which should be impossible.
5) There is a mask set errata published for the QY4 in which there's a section headed "Page Erase Can Cause Unexpected Erase of a Another FLASH Page". That's a very close theory, but there are some holes:
a) my mask sets are quite newer than those published in the errata
b) I'm not using interrupts
c) I'm resetting the COP often.
Any thoughts?
BRCLR mFLCR_MASS,aCTRLBYT,AMBS
The value of mFLCR_MASS is defined in MC68HC908QT4.inc as:
mFLCR_MASS: equ %00000100
The BRCLR instruction for the HC9(S)08 actually requires a bit number, and not a bit mask. However, since you are writing your own code for a page erase function only, you could simply omit this part of the code.
bigmac wrote:The BRCLR instruction for the HC9(S)08 actually requires a bit number, and not a bit mask...If you are defining MASSBIT specifically for the CTRLBYT resister, the definition should be (refer Table 4 of AN1831) -MASSBIT equ 6
bigmac wrote:Do you load your new routine into RAM, and run it from there? If not, this would account for the operation hanging.
bigmac wrote:the DELNUS subroutine is called within ERARNGE, using relative addressing. If you wish to continue using the ROM based DELNUS you will need to change the calls from BSR to JSR.
Message Edited by bigmac on 2006-11-0209:09 PM
I have a similar problem with a DemoBoard. The mask is ZRPG.
When I erase a page at $EE00, 16 bytes are being erase at $FFB0.
I can reproduce this, every time I try it.
I use ERARNGE rom routine to erase the page.
When I use mask ZRQG with the same software, everything is alwright.
It looks it's a bad mask just like 3L69J !
It would be fine to have a compilation of those faulty masks.