Address location FFC1

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

Address location FFC1

6,493 Views
Conrad
Contributor I
In the MC68HC908Q series of MCU's, what is the address location FFC1 used for?
 
Thankyou
Labels (1)
0 Kudos
Reply
14 Replies

1,281 Views
peg
Senior Contributor IV
Hi Conrad,
 
Its a secret.
Why do you want to know?
Why only ask about this reserved register and not the others?
 
I think it might be like that good table in the fancy restaurant with the reserved sign on it but nobody ever comes.
 
BR Peg
 
0 Kudos
Reply

1,281 Views
Conrad
Contributor I
Well,
 
FFC1 happens to be very close to the calculated trim value in FFC0. When I use a P&E programmer to reprogram the trim value it always recommends a value that is very close to the value located in FFC1. Coincidence?
0 Kudos
Reply

1,281 Views
peg
Senior Contributor IV

Interesting,

What programmer hardware and software?

Peg

0 Kudos
Reply

1,281 Views
peg
Senior Contributor IV

Hi Conrad,

QY's (at least) come with the factory's recommended trim already flashed at FFC0.

I just took a look at three brand new QY4's and this is what I found:

$FFCO, $FFC1

  $7D,    $6D

  $85,    $79

  $65,    $59

So on this very small sample the value in $FFC1 does seem to be somehow related to the trim value.

BR Peg

 

0 Kudos
Reply

1,281 Views
Alban
Senior Contributor II
Hi Peg,

I'm suggesting.... but just suggesting that FFC1 would be the trim value at 3.3V. The FFC0 being at 5V.

It's just a suggestion.

Cheers,
Alban {Mind Reader}
0 Kudos
Reply

1,281 Views
peg
Senior Contributor IV

Hi Alban,

Sounds feasable...

Had that coffee now then???

Peg

 

0 Kudos
Reply

1,281 Views
Alban
Senior Contributor II
LOL I did indeed...
Maybe an interesting undocumented feature that could be included in this dear datasheet !
There is not really anything preventing the user from using these locations except losing the benefit of factory trimming.
If I remember well (I take my precautions now Peg when I don't want to read the assembly code to confirm !!!) on some MCUs, the monitor code is using the factory trimming value in $FFC0 when programmed ( i.e. != 0xFF).
However, I wouldn't think it's clever enough to see if the MCU is running from 3.3V or 5V. I don't see any module capable of doing this.
 
Cheers,
Alban {Now Bedtime}
0 Kudos
Reply

1,281 Views
peg
Senior Contributor IV

Hi Alban,

Did some experimenting and this is what I found, using QY's.

In monitor mode if you are using the internal OSC (reset vector blank) the value at $FFC0 is transferred to $38 OSCTRIM unless it is $FF (blank). This means if you try to run a mass erased device in this mode it will only work if the device happens to have a OSC that requires a trim value close to the default value of $80.

If its too far off you might connect but then fail to programme the FLASH. If its even further off you won't connect at all. So you will have to provide a 9.8304 MHz clock to get back in.

The value programme at the factory into $FFC1 seems never to be accessed by the monitor.

It also seems to be too much lower than the value at $FFC0 to be a TRIM value for a Vcc of 3V. With the devices I tested before I found that the TRIM value needed to be changed by approx -1.5% to account for the reduced voltage whereas the difference between the two flashed values is more like -2.6%.

Anyway hopefully somebody knows more than me can fill us in.

BR Peg

0 Kudos
Reply

1,281 Views
Alban
Senior Contributor II
Peg,

I see that my power of suggestion needs improvement.
This is a factory trimming value for 3.3V.

But keep quiet, don't tell anyone...
Cheers,
Alban. {Mind Writer}
0 Kudos
Reply

1,281 Views
peg
Senior Contributor IV

Oh OK,

My 5V values where a fair bit different from the factory anyway and I now also notice that the greatest deviation from the 5V value comes at 3.5V and not 3V as well. (according to some samples in AN2312)

Peg

0 Kudos
Reply

1,281 Views
Alban
Senior Contributor II

:smileywink: I did work too long with these :smileywink: And I had my famous coffee LOL

As Peg mentions, the voltage is indeed quite an important factor because the Internal Clock Generator is an RC filter. It depends at which voltage the factory trim was performed. My wild guess would be the typical value of the datasheet, but this is not a suggestion, just a guess...

Furthermore, on the first generation of ICG, like in EY, QYx (but OK in QYxA, nor QB, nor EYxA) you could have some surprises if you follow AN2498 and chose a value multiple of 8.

Only if you do use these, I advise to do the trim twice: once starting from whatever status the MCU is in (i.e. trim erased) and once again from the value calculated. The algo will also avoid values dividable by 8.

Cheers,
Alban. {coffee & MCU breaker}

0 Kudos
Reply

1,281 Views
peg
Senior Contributor IV

Hi Alban,

Perhaps you could try to explain again as I am not sure what you are trying to say.

Are you saying the trim method employed in AN2498 is faulty or there is a problem with the devices or what. I am currently using QY4 and QY2 (not A)

BR Peg

 

0 Kudos
Reply

1,281 Views
Alban
Senior Contributor II
Oki, I'll try to be a be more specific.
I don't consider it to be neither a wrong statement on AN2498 nor a problem with the device.
I should have differentiated the EY from the QY.
The QY features an OSC module whereas the EY features an ICG.

AFAIK, the factory programming trims the part to 3.2MHz +/- 2.x% and you don't have a choice of frequency in the QY... So the triming can only be a simple way.
On the EY, you can chose your target frequency with ICGMR & ICGTR and you tune with the TRIM. Several combinations are possible to get the same frequency and some could be better than other.
To put in a nusthell, I wouldn't use the AN2498 for QYs but EYs.

Hope I'm clearer now.
Cheers,
Alban.
0 Kudos
Reply

1,281 Views
eckhard
Contributor V

Hello,

I never mentioned about the value in FFC1. It is FF after erasure of the flash. I allways trim the chips myself. If youe erase the flash without the user Monitor and teh flash block protection this location is erased too ind i do not reprogram it. Never hat a problem with it. So I believe it is not used.

 

Eckhard

0 Kudos
Reply