MC9S08AW32 - Baud rate question

cancel
Showing results for 
Search instead for 
Did you mean: 

MC9S08AW32 - Baud rate question

2,915 Views
Richard777
Contributor I
Hi guys,
I will be work to MC9S08AW32 and work with two SCI chanels, it's possible that one SCI run to 76800 and another SCI work to 115200 ? The error must be into 2%
Thanks in advance.


Alban Edit: FSL Part Number in Subject line.

Message Edited by Alban on 2007-03-17 01:45 PM

Labels (1)
0 Kudos
9 Replies

120 Views
peg
Senior Contributor IV
Hi Richard,
 
This should indeed be possible, the baudrate is simply the buss clock divided by 16 then divided by an integer between 1 and 8192 for each SCI module. The ability to create a baudrate that is very close to the intended baudrate is then dependant on the clock rate used. If there is no other restriction simply create a busclock that assists with this outcome. The accuracy, long term stability etc is then totally dependant on your clock source as the baudrate is simply a division of this. Why the 2% requirement?
 
Gave up on the two MPU idea huh?
 

Message Edited by peg on 2007-03-1707:23 PM

0 Kudos

120 Views
bigmac
Specialist III
Hello Richard,
 
To achieve both baud rates that you require, the bus frequency would require to be a multiple of 3.6864 MHz, i.e. one of the following frequencies -
3.6864, 7.3728, 11.0592, 14.7456 or 18.4320 MHz, all within a tolerance of 2 percent.
 
Peg, the two percent tolerance is quite reasonable if equal and opposite tolerances need to be allowed at each end of the serial link.
 
Regards,
Mac
 
0 Kudos

120 Views
peg
Senior Contributor IV
Hi,
 
I wasn't thinking straight when I queried the 2% tolerance. Of course 2% is typically near absolute max (4% end to end).
 
Now for your clock:
The frequencies quoted by bigmac (the only ones that produce both baudrates exactly) are not achievable within the required tolerance when using FEI or 32k768 based FEE.
 
You could fiddle the trim register to get FEI to work.
 
Or you could use a relatively standard 3.6864MHz crystal in FEE to get spot on. (x10 /1 = 18.432MHz buss)
 

Message Edited by peg on 2007-03-1804:28 PM

Message Edited by peg on 2007-03-1804:29 PM

0 Kudos

120 Views
Richard777
Contributor I
Thanks Peg and Mac, I think use a external XTAL, may be 18.432MHz.
Regards.
0 Kudos

120 Views
bigmac
Specialist III
Hello Richard,
 
Be aware that the external frequency may not exceed 10MHz.  One of the following common crystal frequencies could be made to work in your application (FEE mode) - 2.4576, 3.6864, 4.9152 or 9.8304 MHz.
 
Regards,
Mac
 
0 Kudos

120 Views
rocco
Senior Contributor II
Hi, Richard:

To reiterate what Mac pointed out, 18.432 MHz is higher than the AW32's 10 MHz upper limit for a crystal.

18.432 MHz is also higher than the AW32's 16 MHz upper limit for an oscillator with the FLL enabled.

18.432 MHz is fine for an oscillator with the FLL bypassed, but then you are only getting 9.216 MHz for the bus frequency, which is less than half what the AW32 offers.

My suggestion would be to either use a crystal with one of the frequencies that Mac listed, or use a 36.864 MHz canned oscillator. That frequency oscillator is not common, but I have used a Citizen CMX309HBC36.864MTR in non-cost-sensitive products.
0 Kudos

120 Views
peg
Senior Contributor IV
Ok guys I must be missing something.
I could argue with one of you but hesitate to take on both
I reckon only 3.6864 and 4.9152 work.
The reason I only mentioned 3.6864 was that it gave the highest clock.
Possibly needed if the comms throughput is high and there are other things to do.
Could you please give the setup and the final buss clock
 
0 Kudos

120 Views
bigmac
Specialist III
Hello Peg and others,
 
Yes, I was incorrect about using the 9.8304 MHz crystal - I had overlooked that the MFD multiplying factor must be an even number.
 
The following is a list of possible crystal frequencies for FEE mode, and the setup required.  In each case, the RFD division factor is 1.
 
Crystal   MFD    Bus freq.
 MHz     factor    MHz
2.4576    12     14.7456
3.6864    10     18.4320
4.9152     6     14.7456
7.3728     4     14.7456
 
True, only the 3.6864MHz crystal produces the highest bus frequency.  However, since the reduction for the other crystal frequencies is only 20 percent, these should also work for all but the most stringent applications.  Perhaps it also depends on the crystals available from the "junk box".
 
Regards,
Mac
 
0 Kudos

120 Views
Wings
Contributor I
Nothing wrong with using a 32KHz crystal. You can make 14.68MHz from that, then both your baud rates will be well under 1%. I'm using that now for my 115.2kbaud clock.
0 Kudos