the cystal of 4.91252MHz or 9.8304MHz is must for entering monitor mode, isn't it?

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

the cystal of 4.91252MHz or 9.8304MHz is must for entering monitor mode, isn't it?

3,306 Views
jjl3
Contributor I
in order to enter monitor mode(MC68HC908JW32), the cystal of 4.91252MHz or 9.8304MHz is must, isn't it?
I will not use these two types crystal for my application software,
but I want to debug my application software at any moment when programming my application software.
it is not convenient to change crystal always.
then how can I do?
 
thanks a lot in advance!
BR
jjl3
Labels (1)
0 Kudos
6 Replies

655 Views
vs02rjn
Contributor I
Thanks! It helped a lot :smileyhappy:
0 Kudos

655 Views
vs02rjn
Contributor I
Hello!
I have a "big" question somehow related to this thread (I'm new to Freescale microcontrollers): I've read in the AN2317 AppNote that the oscillator for the microcontroller while in MON mode has to be 9.8304MHz (I saw that this value is different for some devices). Also I've understood that the 9.8304 value is used to generate a 9600 baud rate. My question is: Which is the formula for calculating the baud rate? As I have a hard time finding an oscillator with the needed value (I'm from Romania :smileyvery-happy:).
0 Kudos

655 Views
ok2ucx
Contributor IV
Hi,
 
it's fairly easy - look for the documentation of specific HC08 derivative, especially chapter Monitor ROM. Here you find table called: Monitor Mode Signal Requirements and Options
 
It gives the basic idea, typically the baudrate in Monitor mode is a Busclock / 256 (some devices have a different divider, like some CAN-enabled device), you have to check.
 
Normally (on HC08 devices) in user mode, Busclock = External clock / 4  (where External clock is either external oscillator, external crystal, internal VCO, simply the actual clock source).
 
In the Monitor mode there's sometimes a second option with Busclock = External clock / 2 where one divider by 2 is bypassed depending on external pin level upon the Monitor mode entry.
 
To make this long answer short, the baudrate will be External clock / 1024 or External clock / 512 depending on the derivative and/or pin levels upon Monitor mode entry. That's how I calculated this 'odd' baudrate.
 
Hope this helps, regards, Pavel (Freescale Roznov p.R., Czech Republic :robottongue: )
0 Kudos

655 Views
jjl3
Contributor I
Thanks a lot!
0 Kudos

655 Views
Alban
Senior Contributor II
Hello,
 
Well, it depends on the application crystal you will have.
Generally, you can use another crystal by adapating the baudrate with a similar ratio to get proper timings.
 
You don't need to always change but could enter the crystal value as a #DEFINE in your software, as a parameter between debug and stand alone.
 
Alban.
0 Kudos

655 Views
ok2ucx
Contributor IV
... alternatively you can still use recommended 4MHz crystal but then your Monitor mode communication will be at odd 7812.5Bd baudrate. And it's the question of you MON08 debugging hardware whether it can support it or not.
 
Regards, Pavel, ok2ucx
0 Kudos