M9S08QG8 Serial Monitor Problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

M9S08QG8 Serial Monitor Problem

7,658 次查看
Dakota
Contributor I

Hello,

I am trying to design an MC9S08QG8 circuit board that uses the HCS08 serial monitor for programming and debugging.  My circuit looks like the one pictured on page 25 of the MC9S08QG8 Data Sheet. When I try to download a program to the board, however, CodeWarrior (Development Studio version 5.7.0) cannot establish a connection.

I also have the M68DEMO908GB60 demonstration board.  With this board, I am able to successfully download and run programs using CodeWarrior in serial mode.  With the M68DEMO908GB60 demonstration board, the crystal circuit begins to oscillate as soon as CodeWarrior tries to establish communications.  My crystal circuit does not oscillate, although it is identical to the one on the M68DEMO908GB60 demonstration board (the component values are identical – I do not know the exact part numbers for the demonstration board – but the oscillator is designed as recommended in the specification).

Out of desperation, I have redesigned the board with nothing but the HCS08, the crystal oscillator circuitry, and the serial communications interface.  When CodeWarrior tries to establish communications, I can see activity on the serial port (pin 12), but no oscillation.  The frequency is varying in an attempt to find a suitable baud rate.

Any suggestions or observations would be greatly appreciated.  I am an experienced HC08 designer, but this is my first HCS08 project.

Thank you.

标签 (1)
0 项奖励
回复
7 回复数

1,033 次查看
bigmac
Specialist III

Hello Dakota,

Have you previously programmed the serial monitor program to the board using BDM?

My understanding of the data sheet for the QG8 is that, after a POR, the internal oscillator would be active, rather than the external crystal.  Firmware would need to switch operation to the external crystal.

The data activity that you observe on pin 12 would originate from the PC, rather than the MCU.

Regards,
Mac

 

0 项奖励
回复

1,033 次查看
Dakota
Contributor I

Good Morning Mac,

Thank you for the rapid reply.

Yes, the activity on pin 12 (RxD) is from the PC.  It appears that CodeWarrior is attempting to find a suitable baud rate by varying the transmit frequency.

I do not own a BDM programmer, and assumed that the HCS08 devices could be programmed serially (similar to the original HC08 devices).  I tried to use a modified version of the program listed in AN2140.  AN2140 states that "A user on a tight budget can evaluate the MCU by writing programs, programming them into the MCU, and debugging their applications for the HCS08 using only a serial I/O cable and free software for their personal computer." 

It is also my understanding that, after reset (or powerup) the internal oscillator is active.  Then, after communications are established, the monitor software is programmed into the HCS08 serially.  This enables CodeWarrior to communicate with the device.

Is my understanding incorrect?

If the devices can be programmed as described in AN2140, I would also like to use a packaged oscillator, rather than a discrete crystal circuit.  I assume that thgis is OK, but the data sheet does not discuss external oscillators and serial programming.  I do not know what range of frequencies will work; or if it will work with 32.768 kHz only.  AN2140 breifly mentions 4 MHz.

0 项奖励
回复

1,033 次查看
peg
Senior Contributor IV

Hi Dakota,

The AN should say:

"A user on a tight budget and a friend with a BDM tool can evaluate the MCU by writing programs, programming them into the MCU, and debugging their applications for the HCS08 using only a serial I/O cable and free software for their personal computer." 

Your demo board may have come with the serial monitor in it, programmed by the board manufacturer (Axiom). The chips you get from Freescale come un-programmed. You must use a BDM based programmer to get the serial monitor in in the first place. This is the Catch-22.

Also the QG can work of low freq xtals (32k) or high freq xtals (1 to16MHz)

Regards David

 

0 项奖励
回复

1,033 次查看
Dakota
Contributor I
Thank you, that cleared up a lot of my questions.
 
It was not obvious to me that the demo board was preprogrammed.  I was wondering how the part was able to communicate over the serial port without prior programming, but assumed that there was some sort of built-in monitor.  It appears that I will need to purchase a BDM to load the monitor program.  Then, the parts will be able to communicate using CodeWarrior.
 
Does anyone know if updated versions of the monitor program are available?  The one listed in AN2140 is for the MC9S08GB60.  AN2140 states "This monitor will be modified for use with other members of the HCS08 Family as they are introduced."  I am specifically looking for a monitor for the MC9S08QG8.
 
One final question; can the HCS08 parts use a packaged oscillator (rather than a crystal) in serial mode?  I noticed that the external oscillations on the demo board only start after the part has established communications with CodeWarrior.  A packaged oscillator will run as soon as power is applied.

Message Edited by Dakota on 05-26-200607:06 AM

0 项奖励
回复

1,033 次查看
peg
Senior Contributor IV

Hi,

If you buy a BDM there is no need to use the serial monitor!

Updated version for QG exists, There is a post here somewhere (I gave up looking just now)

Found it now, it is not the same thing though...

http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&message.id=921#M921

 from the original author and he has posted an as yet officially unreleased version at www.freegeeks.biz which seems to be down right now.

At least some can use a "canned" oscillator.

This "oscillator only start when comms established" is not what should be happening!!! What if you want standalone with no comms?

Regards David

 

Message Edited by peg on 05-26-200610:43 PM

0 项奖励
回复

1,033 次查看
Dakota
Contributor I
Thak you again.
 
I found the alpha version of the QG8 monitor at the freegeeks site (sorry, I am new to this forum and did not know about the freegeeks site).
 
Actually, the serial monitor will be useful even after I purchase the BDM.  Besides consulting, I teach a control systems course, and use the HC08 (currently the KX8) in class.  It appears that I will be able to simply program the monitor onto all of the new QG8 circuit boards, and the students will be able to use the CodeWarrior software in serial mode.
0 项奖励
回复

1,033 次查看
peg
Senior Contributor IV

Hi,

Note that this is a bootloader, not a monitor!

See my previous post which I updated with the link I couldn't find earlier.

Regards David

 

0 项奖励
回复