Jump to content
Sign in to follow this  
zeke

Is anyone doing interrupt driven UART I/O yet?

Recommended Posts

I'm working with the MSP430F5438 processor.

 

I've managed to get the USB-UART system properly configured and running somewhat.

 

The RX ISR routine works but the TX routine is still struggling.

 

I'm firing a 'U' character at the UART at a rate of once per second.

The terminal program doesn't display it until I "close" the port. It must be flushing its buffer onto the terminal screen at that point.

 

Maybe the problem is the terminal program?

 

Is anyone working with interrupt driven UART code yet?

Share this post


Link to post
Share on other sites

I'm not using the LaunchPad. I'm using this board.

 

I'm using this terminal program.

 

I'm developing on XP.

 

Right now, I'm going back to the sample programs that TI gives out for each processor. In this case it's slac166o.zip.

 

There are four UART samples in there that I'm trying to understand (as my 1 year old son attempts to dribble wooden blocks on the floor above me as if they were balls :roll: ).

 

I'll get this sorted out.

Share this post


Link to post
Share on other sites

Hmmm... It seems that I was using Bray Terminal all along. I didn't know it was called that. I knew it as "terminal.exe".

 

That "buffer flushing upon port closure" is bugging me. I'm starting to wonder if that is a function of WindowsXP rather than the program.

Share this post


Link to post
Share on other sites

Two things. The launchpad uart is halfduplex. Second, have you tried just using hyperterminal?

 

Because I haven't seen any issue with buffer dumps like that.

 

For my purposes, I sent a long line, and then received a bunch of text without having to close the port.

 

Try going to just hyperterminal for some troubleshooting.

Share this post


Link to post
Share on other sites

Have you tried PuTTy? windows terminal can be funky... I'm moving along at learning the interrupts and am interested in this also. The terminal on windows has always given me issues so I use Linux when working with serial com. But PuTTy is on win and it works with the beagleboard perfectly within windows. Im eager to see if you get the uart usb talking to a terminal. The possibilities are endless but i'm thinking of some good prank gadgets for the pc over COM...

 

BTW. I just checked out the f series experimenters board in zeke's link. Now I want one. That thing is awesome. Its like a launchpad pro. wireless and the kitchen sink j/k...

Share this post


Link to post
Share on other sites
Two things. The launchpad uart is halfduplex. Second, have you tried just using hyperterminal?

 

I'm not using a LaunchPad.

 

I'm using this:

post-955-135135496917_thumb.jpg

 

I did some more research today on the sluggish transmission. I think I told the board to go into LPM3 mode when it should have stayed in Active mode. I'm still sorting this out though.

 

My method of troubleshooting the UART is to make it continuously send the character 'U'. On the scope, the RS232 waveform will be a perfect squarewave.

 

The second method I am using is to make the UART echo back the character it receives. I am about to do this next.

Share this post


Link to post
Share on other sites

I've become unhappy with all this timing goofiness.

 

So I've ordered a Salaea Logic to do some timing analysis on all my waveforms.

 

Hopefully I'll have it today and I can slay this beast.

Share this post


Link to post
Share on other sites

I use Termite as my terminal. Its the only terminal software I found that I could display it in hex. you could all ways write your own program so see what it going on.

 

I would also try sending a large buffer? Is flow control on?

Share this post


Link to post
Share on other sites
I'm working with the MSP430F5438 processor.

 

I've managed to get the USB-UART system properly configured and running somewhat.

 

The RX ISR routine works but the TX routine is still struggling.

 

I'm firing a 'U' character at the UART at a rate of once per second.

The terminal program doesn't display it until I "close" the port. It must be flushing its buffer onto the terminal screen at that point.

 

Maybe the problem is the terminal program?

 

Is anyone working with interrupt driven UART code yet?

 

I've not tried with the kit you have, and not sure what you mean by USB-UART, but I've had success with interrupt driven UART on 22F74 and I have seen TX working fine with a 5438 on the 100 pin socket.

 

The code for the 22F74 is here:

http://code.google.com/p/simple-flight- ... controller

 

check out the hal.c & hal.h file. The main command processing code is in the cmd.c file.

 

On 5438A chip, I test the output from the 5438 to the terminal and it was working fine. I didn't test the other direction yet (I was just trying to see if the Chronos programming dongle can program the 5438A chip)

 

-Thanh

Share this post


Link to post
Share on other sites

Thanks Thanh for the link.

 

I think what I am going to to is create ring buffers for the UART.

 

When an RX interrupt occurs, I'm going to grab the char and put it in the RXbuffer.

At a predetermined interval, I'm going to check the TX buffer for content. If there's a char in there then I'm going to activate the TX ISR.

 

Oh, the USB-UART is a reference to the hardware on the experimenter's board. On port 5, TI put a TUSB3410 so that the UART is directly connected to the USB interface.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...