QY4CP programming

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

QY4CP programming

3,043 Views
toomauch
NXP Employee
NXP Employee
I am having problems doing a selective programming of the flash while using CW tools (6.2). I want to avoid programming interrupt vectors at the end of flash since I am using the internal clock  with the 'force monitor' configuration.   This mode requires to have the $FFFE and $FFFF blank (or FF) to enter the mode. 
 
Under Full Chip Simulation I can see that the these address will get programmed.  Additionally, already wasted a few 908QY4s trying to program per CW with mass erase. Also I am aware of erasing internal clock trimming address, which it is also another thing that I want to avoid.  
By the way, once I am done with mass erase, programming and reset, CW cannot not access the controller anymore.
 
I looked endlessly for some sort of option within CW that allows me not to program this addresses or avoid completely programming the vector but, nothing can do it. Same with posible threads.   
 
Does anybody have a suggestion or code?
 
toomauch
 
Labels (1)
0 Kudos
8 Replies

609 Views
peg
Senior Contributor IV
Hello and welcome to the fora, toomauch,

While I understand all of your problems I fail to see why you want to do this.
If you are debugging why not use "normal monitor" entry and supply Vtst and 9.8MHz at least until you are ready for a standalone test.

If you really want to do this and you already know the trim offset:

Put the offset in your code so it gets programmed back in or use expert mode to do byte programming to load it back.

Just set the reset vector to $FFFF in your code so it gets "programmed" with $FF.

0 Kudos

609 Views
toomauch
NXP Employee
NXP Employee
Thanks for your quick responses.
 
Ake:
The circuit is very simple and I put it together based on the schematic found in QY spec.  Added a voltage regulator, few diodes, serial interface with single point access, potentiometer, diodes, etc.  As other enthusiasts out there, before further develop a program, I wanted to make sure I can 'talk' to the part, access, write, read, erase, and try some basic functionality (turn on/off diode; A to D conversion, etc).
 
Peg:
I did not intend to use a external clock or high voltage since it seemed that part would handle it just fine. But will do if I cannot pass this problem.  Also by reading about CW debugger, it seemed possible to control many things within the compiler/debugger, rather than add the code to override certain addresses.
 
Next step will be to force the write for the trimming and reset vector and if this does not work, I will add external clock. I will keep you all posted.
 
Eckhard:
Is this a tool? From CW, QY Monitor is my default for developing.
 
Regards,
 
Toomauch
0 Kudos

609 Views
Ake
Contributor II
Hi again,
To make debugging easy and quick, here is what you should do:
 
1) Get the application note AN2305. If you don't understand it, never matter, but get the source code at the end of the note.
With the setup that I gave you, burn your HC908QY/T device. 
Now pick your MCU and plug it into your design.
This design should have the components shown in Figure 1. Note that there is no high voltage and pullup/down connections.
 
2) With this software installed the HC908QY/QT device becomes easy and fun to programme.
The earlier installed program sits high up in the Flash EPROM and has protected itself, so it cannot be erased. So nomatter what you do, you always have the monitor to drop into.
There are some things that you have to notice.
a) the interrupt vector table is moved down and it has to be a sequence of jumps.
The locations of the jumps are shown in Table 1.
b) the interrupt vectors are a number of 16 bit addresses. This is of a number of
jmp adress
 
3) Now you can assemble/compile code and download it. You don't have to mess with high voltages and switches.
The only drawback is a slight performance drop in the interrupt handling as there is an extra jump included.
 
Regards,
Ake
0 Kudos

609 Views
eckhard
Contributor V
Hello,


stop not so fast.
First connect to the Controller with the P&E Software to read the stored Trim Value.
Enter the Trim Value in the User Monitor Software and the burn it.


Eckhard
0 Kudos

609 Views
Ake
Contributor II
0 Kudos

609 Views
eckhard
Contributor V
Hello,

for the User Monitor you should look at AN2305.
http://www.freescale.com/files/microcontrollers/doc/app_note/AN2305.pdf?WT_TYPE=Application%20Notes&...

It uses the same circuit as the forced Monito mode.
In earlier CW Versions there was a stationary for the User Monitor. For CW 6.x you have to build it your own or ask freescale.

Eckhard
0 Kudos

609 Views
Ake
Contributor II
Hi,
So you want to do selective programming while the reset vector is 0xffff?
And you say that you have wasted several HC908QYs by using mass erase?
It seems that you are trying to make something ordinary with the HC908QY, but got lost somewhere.
What are you trying to do?
Do you want to add eg a  manufacturing number to each part while it is programmed?
Or do you want to use the Flash as an EEPROM?
Or is there some other idea behind this?
Please tell us some more, and I will try to, (hope so anyway) help you.
 
Regards,
Ake
 
 
0 Kudos

609 Views
eckhard
Contributor V
Hello,

maybe you should have a look at the QT/QY User Monitor, this should work for You.


Eckhard
0 Kudos