Forums

Re: static config reg can not be changed

Started by jackson_cp September 23, 2004

> Ok, now I remember why I used the approach I did to initialize my
> system.
>
> The procedure I outlined in my earlier message is not the procedure
> I actually use to initialize my 'F1 target. Instead, I wrote a
> small program using the JBug mini-assembler to perform my
> initialization. It is a bit more complex to set up than the
> procedure I outlined earlier, but it avoids the errors that you are
> getting.
>
> Here's how to go about it:
>
> Invoke the JBug mini-assembler:
>
> A 200
>
> Now, enter a small program that initializes your target. At a
> minimum, add the instructions necessary to initialize the CONFIG
> register:
>
> 0200 > LDAA #$7F
> 0202 > STAA $103F
> 0205 > (add any additional instructions to init registers here)
> ...
> 0220 > NOP
> 0221 > BRA $0220
> 0223 >
>
> Obviously, you can use a different start address for this program
if
> you like.
>
> Note that the end address of your init program ($0223) will likely
> be different from the example shown above. Take this into account
> when following the instructions below.
>
> Now, save your init program:
>
> SV 200 222 d:\path\to\project\dir\Init.REC
>
> You can test your init program if you like:
>
> G 200
>
> Use the JBug S(top) command to stop it. Use the appropriate JBug
> commands (R, MM, L, etc.) to verify that the register(s) you
> attempted to change have been appropriately modified.
>
> Now, create the following macro and save it in your project
> directory:
>
> DEFM AUTOSTART
> BEGIN
> S ;Stop CPU if running
> LD d:\path\to\file\Init.REC ;Load init program
> G 200 ;Start it
> PAUSE 100 ;100mS delay, wait for completion
> S ;Stop it now
> END
>
> After saving the macro, configure JBug to auto-load it at startup,
> as you did before.
>
> I *know* that the method I've outlined above works, because it is
> the actual approach that I use to initialize my target.
>
> ------------------
>
> One feature I'd like to see added to JBug is a *command* that would
> allow one to turn on and off the "Ignore echo errors on writing"
> configuration option. The command keywords I would suggest would
> be "WVOFF" to turn the write-verify feature off, and "WVON" to turn
> it on, and perhaps a "WVDEF" command to reset the write-verify
> option back to the default as specified in Settings.
Alternatively,
> a single command (e.g. "WV") that accepts a numeric parameter
> (0=Off, 1=On, >=2 default) could be provided instead. These
> commands would be particularily useful in macros such as the one I
> described in my prior message on this topic. It would also be
> useful for general debugging, esp. if one is performing tests or
> experimenting with register settings. Many HC11 (and peripheral
> device) registers do not read back the same value as written. The
> write-verify feature is more of an annoyance than a feature when
> performing write operations on them. However, the write-verify
> feature *is* useful as a means to ensure that JBug is working
> properly, thus it is usually desriable to have this feature turned
> on.

We are very thankful to you for your kind response,

I have experimented with the idea what you have given. But this time
also I could not succeed. I have created the assembly file (. REC)
and the file added to the macro.

When I have rebooted the board the macro is loaded. But after that
when I have tried to load a .s19 file which has got a interrupt
vector table it gave me a message "Current value of BPROT is ($1F)
may not allowing to write to EEPROM"

If I change the BPROT register it will write the ISR vector to EEPROM

Here I have added the error report generated from JBug11
Name = Jackson
Chip type = MC68HC11F1
Crystal = 16MHz MHz
OS = Win 98
Date = (03-1-22)

PROBLEM DESCRIPTION:
ISR vectors can not be loaded

CURRENT CONFIGURATION:

Coms port to use COM2
Reset pulse kind 0
Upload Baud rate 1200
Communication Baud rate 9600

Run in local mode only False
Boot to EEPROM-resident talker False
Write diagnostics to O.W.? True
Alter HPRIO on boot? True
Byte to send HPRIO E5
Re-boot without Break False
Use symbols when un-assembling False
Ignore echo errors on writing False
Ignore run-time errors in macrosFalse

Allow writing to CONFIG True
Allow writing to EEPROM True
Allow writing to EPROM False
Allow writing to Flash False

Load S19 file on boot? False
S19 file to load on boot
Load macro on boot? True
Macro to load on boot C:\Program Files\JBug11
\User\f1init.mcr

RAM data On-chip RAM00..03FF|Expansion mem
= 8000..FDFF|
ROM data Boot ROM00..BFFF
ROM visible True
CONFIG data 103F
EEPROM data FE00..FFFF
EPROM data
Control registers 1000..105F
Write Exclusions RAM talker00..00B1|RAM
stackC7..03FF|SCI vectorC4..00C6|Other vectorsEE..00FF
Flash EPROM data
Flash data page size 64

Show BPROT warning dialog True
Show burn warning dialogs True
Version 4.5.1.0524
S19 File default extension .S19
Watch window addresses 100F TCNTL|100E TCNTH|1018
TOC2H|1019 TOC2L|

Inter-character delay time 0
Wrap text in TW True
Show non-displayable chars True
Local echo on True
Send bytes on <Enter> True
Bytes to send on <Enter>
Bytes to trigger newline
Bytes to trigger TW closure

Folder Locations
RAM talker C:\PROGRAM FILES\JBUG11\Talkers\
RAM talker map file C:\PROGRAM FILES\JBUG11\Talkers\
EEPROM-resident map file C:\PROGRAM FILES\JBUG11\Talkers\
EEPROM overlay talker C:\PROGRAM FILES\JBUG11\Talkers\
EPROM overlay talker C:\PROGRAM FILES\JBUG11\Talkers\
Flash EPROM overlay C:\PROGRAM FILES\JBUG11\Talkers\
68HC11 OpCodes C:\PROGRAM FILES\JBUG11\Info\
68HC11 Registers C:\PROGRAM FILES\JBUG11\Info\
Chip information C:\PROGRAM FILES\JBUG11\Info\
Symbol table C:\PROGRAM FILES\JBUG11\User\
S19 Files X:\04-03-
02TurbidityMeter\Debug\MC68HCCodes\Interrupt3\
Binary Files C:\PROGRAM FILES\JBUG11\User\
Macros C:\Program Files\JBug11\User\
Output window save C:\PROGRAM FILES\JBUG11\User\
Command window save C:\PROGRAM FILES\JBUG11\User\
Terminal log file C:\PROGRAM FILES\JBUG11\User\
Terminal send image file C:\PROGRAM FILES\JBUG11\User\

File Names
RAM talker JBug_Talk_F1.BOO
RAM talker map file JBug_Talk_A.MAP
EEPROM-resident map file JBug11_Talk_EE.MAP
EEPROM overlay talker EE_Ovly.rec
EPROM overlay talker E_Ovly.rec
Flash EPROM overlay E_Flash_Ovly.rec
68HC11 OpCodes HC11_Opcodes.csv
68HC11 Registers HC11_Registers.csv
Chip information HC11_Chips.csv
Symbol table
S19 Files Vectors11.s19
Binary Files
Macros f1init.mcr
Output window save
Command window save
Terminal log file
Terminal send image file

BREAKPOINT WINDOW:

COMMAND HISTORY WINDOW:
AUTOSTART
S
LD C:\init.REC
G 200
PAUSE 100
S
LD "X:\04-03-02TurbidityMeter\Debug\MC68HCCodes\Interrupt3
\Vectors11.s19"

OUTPUT WINDOW:
Using RAM based talker on COM2 :-
+0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F
0000 8E 03 FF CE 10 00 6F 2C CC 30 2C A7 2B E7 2D 86 ......o,.0,.+.-
.
0010 40 06 7E 00 12 B6 10 2E 84 20 27 F9 B6 10 2F 43
@.~...... '.../C
0020 8D 46 2A 51 8D 33 8F 8D 30 17 8D 2D 8F 81 FE 26 .F*Q.3..0..-
...&
0030 0D A6 00 8D 33 17 8D 21 16 08 5A 26 F4 3B 81
BE ....3..!..Z&.;..
0040 26 16 17 8D 14 E7 00 18 CE 00 01 18 09 26 FC E6
&............&..
0050 00 F7 10 2F 08 4A 26 EB 3B F6 10 2E C5 0A 26
A0 .../.J&.;.....&.
0060 C4 20 27 F5 F6 10 2F 39 18 8F B6 10 2E 2A FB
18 . '.../9.....*..
0070 8F B7 10 2F 39 81 7E 26 0C 30 8F 8D EB 17 8D
E8 .../9.~&.0......
0080 30 C6 09 20 AC 81 3E 26 12 8D CE 17 8D CB 8F 35
0.. ..>&.......5
0090 86 09 20 AF 86 4A 8D D0 0E 20 FD 81 4A 26 B9
30 .. ..J... ..J&.0
00A0 C6 09 3A 35 EC 07 8D C0 17 8D BD CC 00 98 ED
07 ..:5............
00B0 20 C7 00 00 00 00 00 00 00 00 00 00 00 00 00
00 ...............
00C0 00 00 00 00 7E 00 15 7E 00 58 7E 00 58 7E 00
58 ....~..~.X~.X~.X
00D0 7E 00 58 7E 00 58 7E 00 58 7E 00 58 7E 00 58 7E
~.X~.X~.X~.X~.X~
00E0 00 58 7E 00 58 7E 00 58 7E 00 58 7E 00 58 7E
00 .X~.X~.X~.X~.X~.
00F0 58 7E 00 58 7E 00 94 7E 00 00 7E 00 58 7E 00 58
X~.X~..~..~.X~.X
Macros loaded from: "C:\Program Files\JBug11\User\f1init.mcr"
AUTOSTART
S
Regs: PC12 A@ B, IX00 IY00 SPFF CCR=-X------
LD C:\init.REC
Writing RAM 0200..0207
G 200
PAUSE 100
S
Regs: PC12 A B, IX00 IY00 SPFF CCR=-X------
LD "X:\04-03-02TurbidityMeter\Debug\MC68HCCodes\Interrupt3
\Vectors11.s19"
Writing RAM 8000..8144

>>>> AT THIS POINT IT GAVE THE ERROR

Writing EEPROM FFC0..FFFF

So here what could be the problem.