HCS08 - ILLEGAL_BP or Trigger A occurred messge

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

HCS08 - ILLEGAL_BP or Trigger A occurred messge

3,016件の閲覧回数
roop
Contributor I
hi,

I am using MC9S08JM60 , I used SPI interface when I add code for write cycle , in debugger i get  either ILLEGAL_BP or Trigger A occurred message .  I am not set any Breakpoint or trigger .

I run code by using Stepover it works fine.

please help


ラベル(1)
0 件の賞賛
返信
3 返答(返信)

1,434件の閲覧回数
bigmac
Specialist III
Hello,
 
The most likely cause of this problem is a COP reset occurring while you are within a wait loop in your SPI communications function.  Here I assume that you would be waiting for the SPRF flag to become set.  It is possible for the normal register read operation of the debugger to clear the flag before your code can detect that the flag has become set, so that the wait loop would then never exit.
 
By stepping over the function, the debugger does not read the SPI registers within the wait loop, so the correct operation of the function occurs.
 
Regards,
Mac
 
0 件の賞賛
返信

1,434件の閲覧回数
roop
Contributor I
Thanks,

I am wait to set SPRF flag to set, but how do I resolve this problem?
0 件の賞賛
返信

1,434件の閲覧回数
bigmac
Specialist III
Hello,
 
As you have already found, the simplest way to resolve this issue is to step over the function, or place a break point following the function call.  The problem is caused by your attempt to single step the function.  If the function works correctly, there is little need for single stepping.
 
Regards,
Mac
 
0 件の賞賛
返信