MC9S12XDP512 only runs properly with BDM Debugger attached

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

MC9S12XDP512 only runs properly with BDM Debugger attached

2,275件の閲覧回数
oiser
Contributor I
Hello.
 
Im working with the EVB9S12XDP512 from Softec and CW vers.4.6.
 
As long as I have the Debugger attached my Program is working fine, but stand alone some interrupt functions are not called anymore.(pit interrupt still working, spi0 interrupt no more).
 
Any hints on what initialization done by the debugger might be missing in my code, would be great.
 
Thanks in advance. 
 
 
ラベル(1)
0 件の賞賛
返信
2 返答(返信)

999件の閲覧回数
kef
Specialist I
Debugger shouldn't initialize your peripherals. It must be special single chip vs normal single chip mode differencies like write once registers. Regarding SPI, I remember someone had trouble initializing mastar mode SPI, it worked in special mode but failed to work in normal mode. When initializing, try reading SPISR register before writing to SPICR1. I used this in SPI setup sequence since HC11 times. On HC11, MODF bit could get set if wrong level on /SS pin during setup. Reading SPISR followed by write to SPICR1 clears MODF and that worked. It also always worked on various HC12, S12 and S12X. But I'm not sure if MODF is what makes your SPI not working.
 
Regards
 
0 件の賞賛
返信

999件の閲覧回数
oiser
Contributor I
Thanks a lot, got my SPI running now, and I will keep an eye on the write once Registers.
 
Regards.
0 件の賞賛
返信