How to use BDM on S12XDP512 when the IVBR points to vect table in RAM

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

How to use BDM on S12XDP512 when the IVBR points to vect table in RAM

2,193件の閲覧回数
pufi
Contributor I
Hi forum,

we have a problem to get right interrupts while BDM debugging
when the vector table is relocated into RAM.

The interrupts seems to be eaten somewhere.

Reading the MC9S12XDP512 Data Sheet, Rev. 2.15 on the page 601
there is sentence:
"Note: If the BDM is active (i.e., the CPU is in the process of executing BDM firmware code),
 the contents of IVBR are ignored and the upper byte of the vector address is fixed as “0xFF”.

My question is :
How to get the relocated interrupt vectors running when a BDM debugger is used? 

Thanks for your help in advance

Regards
Paul
ラベル(1)
0 件の賞賛
返信
2 返答(返信)

923件の閲覧回数
kef
Specialist I
When S12X interrupts stop working you should check the contents of CPU CCH register. If it is not reset-default IPL==0, then interrupts with too low priority will be "eaten". This can occur for example if you stop program in ISR and adjust PC to restart program, or if you load new program to RAM. Your debugger can or can not reset CPU after download and you should check it.
 
I just tried to do simple RTI handler in RAM and vectors in RAM. It works with BDM connected. I can place breakpoints where I want and it all works as expected. So I don't know what Alban is talking about. Active BDM is exactly when CPU executes hidden BDM firmware. When you hit run button or step over a C line - CPU exits active BDM to execute your code and IVBR becomes active. You stop the target or target stops on breakpoint and IVBR according to datasheet becomes ignored again.
 
Regards
0 件の賞賛
返信

923件の閲覧回数
Alban
Senior Contributor II
Hello Paul,

As your quote indicate, you cannot.

The way to relocate the vectors is to change IVBR.
When you connect the BDM, the IVBR is ignored.
So when BDM is connected, vectors are located like out of reset.

Regards,
Alban.
0 件の賞賛
返信