M52259DEMO UART Interrupt

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

M52259DEMO UART Interrupt

1,065 Views
MrCleaver
Contributor I

I am trying to write some simple code that will take characters entered on the keyboard and output it to hyperterminal, this function will be used in some MQX tasks. 

 

Instead of using the built in drivers provided I would like to setup and code the ISRs manually. 

 

I know that the process roughly goes: 

Initialize the appropriate structures and registers

Install the interrupt service routines

Enable interrupts 

And finally in the interrupt themselves, check for RX and TX states, and handle appropriately. 

 

Can anyone provide some help on how I would go about writing this code? The amount of macros and predefined variables is mind boggling and I have no idea where to begin. 

 

Thank you!

Labels (1)
0 Kudos
1 Reply

227 Views
mjbcswitzerland
Specialist V

Hi MrCleaver

 

If you need alternative code see the following: http://forums.freescale.com/freescale/board/message?board.id=CFCOMM&message.id=7476#M7476

 

This allows various UART modes (interrupt, DMA driven, with flow control etc.). Generally:

http://www.utasker.com/kirin3.html

 

This allows you to test and modify the code in the uTasker Kirin3 simulator so is very efficient for learning the details involved. Fast and details technical support at http://www.utasker.com/forum/index.php?board=2.0

 

Regards

 

Mark

 

 

www.uTasker.com
- OS, TCP/IP stack, USB, device drivers and simulator for M521X, M521XX, M5221X, M5222X, M5223X, M5225X. One package does them all - "Embedding it better..."

 

 

0 Kudos