what the difference of  running in debug mode in codewarrior and running in MCU independently

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

what the difference of  running in debug mode in codewarrior and running in MCU independently

998 Views
ScorpioIce
Contributor I
I try to make a very simple programming with 8 bit MCU. just for sending SPI command.
It works when the programming loaded in the MCU and running, (with reset button)
but doesn't work when in debug mode codewarrier environment when click run/reset icon.(it is also loaded in MCU) , when the time programming should finish, it still keeps running, no output signal, but looks like it entered some strange loop. very confused what 's the difference of these two running mode.
Thanks




Message Edited by Scorpio Ice on 2007-09-13 09:24 AM
Labels (1)
0 Kudos
1 Reply

236 Views
Ake
Contributor II
Hi,
First I assume that you are using a HC908 MCU.
If you are using a 9S08, this is not the answer.
 
When the HC908 runs in Monitor mode, the reset, break and SWI interrupt vectors are replaced by a vectors that lie inside the ROM of the MCU. So there is no way to replace them.
 
This means that if you are running in Monitor mode and setting a break address, the CPU will return to the Monitor when this address is executed.
If a reset or SWI is executed the same thing happens.
 
But I cannot say why the SPI shouldn't work.
If you could send the source code and tell me what kind of MCU you have got, I could take a look at it and see if I can come up with a better answer.
 
Regards,
Ake
0 Kudos