MC9S12XDP512 only runs properly with BDM Debugger attached

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MC9S12XDP512 only runs properly with BDM Debugger attached

1,651 Views
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. 
 
 
Labels (1)
0 Kudos
2 Replies

375 Views
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 Kudos

375 Views
oiser
Contributor I
Thanks a lot, got my SPI running now, and I will keep an eye on the write once Registers.
 
Regards.
0 Kudos