How to move the MC9S12DP512 interrupt vector

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to move the MC9S12DP512 interrupt vector

ソリューションへジャンプ
1,732件の閲覧回数
peijinwang
Contributor II

Hi,I now use MC9S12DP512 do BootLoader encountered a problem, MC9S12DP512 has no IVBR register, so, how to move the interrupt vector?

ラベル(1)
0 件の賞賛
返信
1 解決策
1,518件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Peijing,

For MC9S12DP, One solution is to use secondary vector jump table for bootloader.

See

https://www.nxp.com/docs/en/application-note/AN2153.pdf 

demo code

https://www.nxp.com/webapp/Download?colCode=AN2153SW&appType=license 


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,519件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Peijing,

For MC9S12DP, One solution is to use secondary vector jump table for bootloader.

See

https://www.nxp.com/docs/en/application-note/AN2153.pdf 

demo code

https://www.nxp.com/webapp/Download?colCode=AN2153SW&appType=license 


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
1,518件の閲覧回数
peijinwang
Contributor II

Hello, thank you for your reply! After reading AN2153 ,I have a few questions puzzled.

1.how to use C language to write the second interrupt vector jump table?

2.My Bootloader only lack the second interrupt vector jump table, how to add the the second interrupt vector jump table use assembly language ? The following is my assembly boot code:

xref main ;

xdef _BootStart ;
AppResetVect: equ $effe ; here is stored reset vector of user application
StackTop: equ $3000 ;


_BootStart: ;
nop ;wait a few cycles for stabilization of the signal
nop
nop
nop
nop

ldd AppResetVect ;
cpd #$ffff ;
beq GoBoot ; if the application reset vector is not available
; then start the bootloader
ldx AppResetVect ;
jmp 0,x ; jump to the application


GoBoot: 

lds #StackTop ; 
jmp main

0 件の賞賛
返信
1,518件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Peijin

In C, I suggest you use inline assembly to implement jump table

asm jmp ...

here is an example to implement jump table in assembly

MyCode:     SECTION

entry1: NOP
        NOP
entry2: NOP
        NOP
entry3: NOP
        NOP
main:
     JMP [goto2,pcr]
goto1: DC.W entry1
goto2: DC.W entry2
goto3: DC.W entry3

Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信