M68EVB912B32 FLASH EEPROM and internal EEPROM

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

M68EVB912B32 FLASH EEPROM and internal EEPROM

5,557 Views
cjw
Contributor I
I have two questions about the above mentioned board and its FLASH EEPROM and internal EEPROM.

1) I ran out of RAM on this board (only 512 bytes) and wanted to move my code the internal EEPROM (starts at $0D00) while keeping my variables in the RAM (at $800). However, I have encounted the following problem: Whenever I relocate code to the internal EEPROM my programs do not execute D-BUG12 utility subroutines anymore (such as putchar(), getchar(), setuservector() etc.) Why is that?

2) I tried to program the external 32K FLASH EEPROM today without success. I put the board into Bootloader mode and selected "Program". Whenever I select it the board tells me that it could not find Vpf. I follow the instructions in the manual and put header W7 in position 1-2 (move from Vdd to Vpp) and supply 5V and GND to header pin W8, while still keeping 5 V on VDD. However, the boot loader still tells me that Vpf cannot be found. I tested this with 2 boards. The manual says to make sure that you are supplying power according to specifications, and the specifications state that Vpf should be at least Vdd-0.35 V or greater. Hence, since I supply the same to Vdd and Vpp I should be fine. I tried a variable power supply on Vpp and varied between 4.5-5.5 V and still got no results. What else could be wrong on BOTH boards???

Thanks for all and any help on both 1) and 2).

Regards,

Christian
Labels (1)
0 Kudos
Reply
4 Replies

2,237 Views
imajeff
Contributor III
(1) I have good success with the BC32 (same as yours but with CAN). I'm thinking that your first problem may be if you have used PC-relative instructions, but relocating your code without changing the relativity. Know what I mean?

(2) Do you mean you applied 5V as the programming voltage (VFP)? That wouldn't work, but it's close. The VFP for programming should be 12V (regulated). And allow about 300mA. I have a series resistor 30R and a 12V zener diode (shunt) to establish my 12V. Apply that to VFP while keeping 5V on VDD, and it shouldn't complain anymore.
0 Kudos
Reply

2,237 Views
cjw
Contributor I


imajeff wrote:
(1) I have good success with the BC32 (same as yours but with CAN). I'm thinking that your first problem may be if you have used PC-relative instructions, but relocating your code without changing the relativity. Know what I mean?

(2) Do you mean you applied 5V as the programming voltage (VFP)? That wouldn't work, but it's close. The VFP for programming should be 12V (regulated). And allow about 300mA. I have a series resistor 30R and a 12V zener diode (shunt) to establish my 12V. Apply that to VFP while keeping 5V on VDD, and it shouldn't complain anymore.




(1) I am not 100% sure what you mean. The D-BUG12 Subroutines resides in the external 32K Flash Memory Chip. I always do a jump to an address there (i.e. $F684 is putchar()) and it works. If I relocate my code to internal EEPROM I cannot explain why it suddenly wouldn't work anymore, as I did not change anything on the external Flash EEPROM.

(2) I have seen conflicting info on this. The document on Freescale's website states that Vdd and Vpp should be nearly equal. I didn't want to apply 12 V to the W8 header and blow the board. The document also says that it should work with Vdd = Vpp. I will see what happens if I put 12V to it, but I am not sure if I will get 300mA out of the power supply.

Again, thanks for your continued help, this forum has been a blessing in trying to work with this microcontroller project.
0 Kudos
Reply

2,237 Views
imajeff
Contributor III
(1) So can I assume you use EXT mode and do not use the "PC relative"?
EXT mode:  JSR  $F684        ; absolute is absolute
PCREL:     JSR  $F684,PC     ; would not work if code is relocated

Note that by relocated I mean code moved without re-assembling at new location. So which way are you relocating it? If not the problem, I can't think of anything else yet. Check for other errors... trace it.

(2) It seems conflicting only when missing something:

Vdd and Vpp should be nearly equal __for normal operation__.

Vpp must be within tolerance of 12V __for programming Flash__.
0 Kudos
Reply

2,237 Views
cjw
Contributor I


imajeff wrote:
(1) So can I assume you use EXT mode and do not use the "PC relative"?
EXT mode:  JSR  $F684        ; absolute is absolute
PCREL:     JSR  $F684,PC     ; would not work if code is relocated

Note that by relocated I mean code moved without re-assembling at new location. So which way are you relocating it? If not the problem, I can't think of anything else yet. Check for other errors... trace it.

(2) It seems conflicting only when missing something:

Vdd and Vpp should be nearly equal __for normal operation__.

Vpp must be within tolerance of 12V __for programming Flash__.




(1) I am doing an absolute jump:
LDAB #'F'
LDX $F684
JSR 0,X
Should output F to the D-BUG screen. It does it when it is in RAM but not when in EEPROM.

To relocate to EEPROM, I change my ORG statements in the .asm file and reassmble and upload the .s19 file using the EVB bootloader to internal EEPROM. I keep my variables at ORG $800 and all code goes to ORG $0D00. Code always runs there but never when I use D-Bug subroutines as described above.

(2) Thanks, I will surely try this out. The manual, to me, was not clear on that at all.
0 Kudos
Reply