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?
Hi iRob,
Please don't see anything suspicious here, no newer post from Freegeeks was copied over... Mea Culpa if it's an older one because I was contacted to select quite a few posts as I was Mod on Freegeeks.net and I'm certainly no perfect.
Also when you read Yahoo forums, some contributors are really virulent against Freescale for having copied posts, so maybe they stopped. Only time will tell !
But let's continue on your subject Coz I don't want people to be afraid to post here or think a Mod will cut stuff out. If it happens I'll just give my Mod's cap back to the Admins.
The FBLPR is checked before Flash operation. As far as I know, even on devices touched by the Erratum, you wouldn't see the problem with FBLPR programmed to protect the vector page.
My idea behind the 3 is that I've seen the newer QY are not behaving the same with security and maybe the programmer doesn't understand. In most of HC08, when the Security Fails, Flash memory will read as 0xAD. However in some QY, it read 0x00.
I did cause trouble to my Multilink because it was always taking back the 0x000000000 after a failure because it thought it was OK. An update of the drivers cleared it out.
Cheers,
Alban.
Message Edited by Alban on 02-16-2006 09:32 AM
Which masks are you using ?
Do you know if the rest is still stored in memory ?
Do you see that because the applications is going stupid OR only when you put the programmer back on ?
Which programmer are you using ?
In most of HC08, when the Security Fails, Flash memory will read as 0xAD. However in some QY, it read 0x00.
I have two ideas just now coming to my mind... FBPR = Flash Block Protection Register + FPR = Flash Programming Routines and how they're used in the soft
Indeed, it looks like there is something weird with the programming.
Do you erase and then program ?
Yes, it could be from one or the other. If no, which one ?
Can you post the line of your S-Record showing which value is programmed in the FBPR (Flash Block Protection Register) @ 0xFFBE?
Even the buit-in flash programming routines are not supposed to override this protection, they are just in ROM to save user Flash space.
By making sure the FBPR is programmed to protect the vector page when using the Cyclone Pro, it will confirm if the FBPR function is OK.
If you program the FBPR in your soft, we can't really believe it as the vector page is erased and the FPR can be to be blamed. If you see what I mean.
If you can easily and quickly reproduce the fault:
Can you please tell us if the vector erase happens because of the Erase Range or Program Range routine? To learn this, you would need to add a comparison on the reset vector to 0xFFFF just before after each function with a unique display on some port depending on what you see.
Once this is done and we see which one is causing trouble, we need to analyze how you call these functions as maybe something else is corrupting the stack when you do the function call !!
My goal would be to see where the fault is and if there's any problem with the on-chip FPR, we should be able to protect your application with FBPR .
Cheers,
Alban.
Alban wrote:
Do you erase and then program?
Alban wrote:Can you post the line of your S-Record showing which value is programmed in the FBPR (Flash Block Protection Register) @ 0xFFBE?
Alban wrote:If you can easily and quickly reproduce the fault:
Can you please tell us if the vector erase happens because of the Erase Range or Program Range routine?
Alban wrote:
...To learn this (Erase Range or Program Range causing error), you would need to add a comparison on the reset vector to 0xFFFF just before after each function with a unique display on some port depending on what you see.
Message Edited by irob on 2006-10-2402:34 PM
bigmac wrote:Hello iRob,Have a look at AN1831 (Rev 3) and AN2635 for the source code for the ROM based programming routines.Regards,Mac
Anyone know what the values of these bytes are:
mERASE
mMASS
mHVEN
Message Edited by irob on 2006-10-3010:27 AM
An Erratum is defect in the device about a specified information from the datasheet.
The device datasheet does not mention the use of these functions but AN1831 does.
There is no AppNote Erratum in place. Instead, the App Note is usually corrected.
I'm contacting the Technical Publication.
For ERARNGE, give me your mask set (3L69J ?) and I shall find you some code.
Alban.