RE: Printf with MPC565?

Dobbin Allan-r11834 <[email protected]>
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <45E41B46B1F8D81183E4000F20D7C40B0B5684E1@az33exm40-bu.am.freescale.net>
I am unsure how you set Codewarrior to print to SCI.  What was the format of the printf command that went to SCIA?  Whatever it is, it is somehow sending the data to the QSMCM_A.SC1DR.R data register.  To print to SCIB, you have to set the command up to write data to the other data register i.e. QSMCM_B.SC1DR.R.

If you supply a pointer to the data register in the printf statement, or have set stdout to point to the SCI data register (0x30500E), you have to change the address to QSMCM_B data register (0x30540E).

Regards,
Allan

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of vijayanandl
Sent: Wednesday, July 13, 2005 8:48 AM
To: [email protected]
Subject: [MPC500] Printf with MPC565?


Hello all
     I just have a question regarding printing with MPC565. I use the 
Metrowerks codewarrior BDI environment with the standard library. I have two serial ports for printing. One port is connected to 
QSMCM_A.TXD1, QSMCM_A.RxD1. The other port is connected to 
QSMCM_B.TxD1,QSMCM_B.RxD1.
I made the initial settings for port1 and 2 as follows QSMCM_A.SCC1R1.R=0x100C;QSMCM_A.SCC1R0.R=0x0082; 
QSMCM_B.SCC1R1.R=0x100C;QSMCM_B.SCC1R0.R=0x0082; 
which sets it to 9600 kBaud and printed from both the ports. From 
port1 the output was ok but I am unable to print from port2. The 
string to be printed on port2 gets printed on port1. 
My question is, is there a way to configure the printf to enable 
printing in port 2? What are the settings I need to make? 
Thanks in advance.

Regards
Vijay


	


-----------------------------------------------------------
To learn more about Freescale Microcontrollers, please visit
http://www.freescale.com/mcu


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/MPC500/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.