RE: Queued SCI with Interrupts on MPC555

"Dobbin Allan-r11834" <[email protected]>
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <4147ED8B92A864498825C07E53594E4A753C8A@az33exm20.fsl.freescale.net>
Yes, I've used them before and they are running successfully.  It did
require a little more debug than I had anticipated, although my system
was complicated by the fact it had several micro's communicating via
RS485. Tx is probably simpler than queued rx.

Some random comments on what I done (not necessarily optimum method).
I've only described Tx since you didn't mention Rx:

General - one of the problems with a tx ISR is how do you turn on the
tansmitter the first time so that interrupts will start.  On my system,
I had a periodic timer set to trigger the interrupts if I had any data
queued in a s/w FIFO. 

Timer ISR - I cleared the SCISR (read SC1SR and read SC1DR) as sometimes
my queue would stall without this. Also important is that QRE is
disabled upon FE, PF or QOR errors, so test to see if QRE is clear and
if so, clear those three status flags and set QRE again (although this
is all related to rx, not tx). 
 - Start the tx interrupts if data to transmit: QBHEI=1;  Call Tx ISR
function below (firt time only, then tx interrupts call it).

TX ISR - my ISR stuffs the next 16 bytes into the tx queue.  If there
are less than 16 bytes, I disable the queue - I implemented this
simplification by having my main routine always pad 16 dummy bytes onto
the end of the transmission so I didn't care if I lost any of the last
16 bytes.
- if (count<16) {QBHE=0;QTHE=0;QTE=0;QBHEI=0}
  else {count-=16;write 16 bytes to SCTQ[0:15]; QBHE=0;QTHE=0;QTE=1}

Regards,
Allan

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of David Eicher
Sent: Wednesday, December 07, 2005 7:20 AM
To: [email protected]
Subject: [MPC500] Queued SCI with Interrupts on MPC555


Hello,

 

Anyone have any experience with the subject matter? I've followed the
examples in the demo code in the quickstart package, the top half and
bottom half interrupts/flags just don't seem to work they way they
suggest. The users manual for MPC555 doesn't give a lot of detail, but I
have not succeeded in transmitting a string of bytes using interrupts
yet. Using a polling method I was able to get transmit working using the
transmission queue.

 

Thanks for any help you might be able to offer,

 

Dave

 



[Non-text portions of this message have been removed]




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


 
Yahoo! Groups Links



 




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/dN_tlB/TM
--------------------------------------------------------------------~-> 

-----------------------------------------------------------
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.