M68HC12B32EVB Interrupt Vector Table

How do you set the interrupt vectors on this board? I am trying to use the real-time interrupt, which apparently is at $F7F0 in the table. However, I cannot simply put a statement like

ORG $F7F0 DC.W NAME_OF_LABEL

It gives me a "Cannot write to memory address" error, because the part is write protected. The EVB manual and MCU manual have been of little help to me to figure this out.

Thanks,

Christian

Reply to
Christian Winter
Loading thread data ...

Check what's already there -- sometimes an EVB will have a hard interrupt vector table that vectors off to RAM, so you can put in your own vectors.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Posting from Google?  See http://cfaj.freeshell.org/google/
Reply to
Tim Wescott

Tim:

Thanks for your help. Let me clarify what you are suggesting. I should retrieve what is already located at address $F7F0 and try to see if the data given there is an address that I could write to which then would serve as the vector? I.E. if $F7F0 holds $5050, I could try putting my vector at that address?

Thanks,

Christian

Tim Wescott wrote:

Reply to
Christian Winter

Quoting from the manual:

"The CPU's interrupt and reset vectors are located in the erase-protected area of FLASH EEPROM and thus cannot be reprogrammed with the S record bootloader.

To allow the user code to specify interrupt and reset addresses, each member of the erase-protected vector table starting at address $FFC0 contains a pointer to a vector jump table, which is located in user-programmable FLASH EEPROM starting at address $F7C0.

Each entry in the vector jump table occupies two bytes of memory, which is adequate for the addresses of user reset and interrupt service routines. The interrupt vector mapping is shown in Table E-1."

I guess that is exactly what you are suggesting. I should look for the pointers starting at address $FFC0 (the real-time interrupt one is $FFF0). I should then write the start of my interrupt routine's address to the address the pointer points to.

Reply to
Christian Winter

Double check. It's most likely that you'll need to put a jump instruction at the pertinent address.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Posting from Google?  See http://cfaj.freeshell.org/google/
Reply to
Tim Wescott

Well, that didn't work. If I look at address $FFF0, it contains the 2 bytes, $FF56, an address I cannot write to. If I go to $F7F0, it contains the address $DBA7, also an address I cannot write to. I tried putting ORG statements using the two retrieved addresses, and I still get the error that I "Can't Write Target Memory".

Why aren't there any examples of this stuff on the web!?

Reply to
Christian Winter

I actually found a good examlpe on the web. The problem was that I needed to use one of D-BUG12's utility subroutines to set the vector. The interrupt works now, but I get an RTI Exepction when the interrupt is called for the first time and I end it with the RTI instruction. ARGH! Always something else, isn't it? :P

Reply to
Christian Winter

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.