┬ÁTasker Forum > FreescaleTM MC9S12NE64

MC9S12NE64 SCI port and Interrupts

(1/2) > >>

I'm using the neCore to recieve and sort ID numbers(in ASCII) from a RFID reader. I've initialized ports and used interrupts before in assembly but not in C. Also, I was wondering how uTasker deals with interrupts, I found the SCI 1 interrupt but I'm not sure on how to use it.
Any help will be greatly appriciated.
M Koleed


If you use the standard serial interface routines you will not need to be involved with how the interrupts are use - this is embedded in the driver.

See the following thread for details on how to use the UARTs: http://www.utasker.com/forum/index.php?topic=54.msg220#msg220



Hi Mark,
Thanks for the reply.
I read the thread and reread the uTaskerDrivers document that came with uTasker and I'm still having difficulties.
I tried setting the QUEUE_HANDLE configurations in application.c but the SCI didn't work. Also, I tried copying the SCI example in the uTaskerDrivers document in application with no luck and into my own program and again with no luck.
Can you please tell me how to configure and enable SCI1 and set set the message length for MSG_MODE?


The use of the UART on the NE64 is no different than on any other processor. Therefore the guide that you read should be suitable.

#define DEMO_UART        1  // this sets SCI1 as debug input/output.

I wouldn't try changing to message mode until you have proven that the standard character mode operates correctly. As long as SERIAL_INTERFACE is defined the UART driver will be active and the demo menu should be operational on SCI1.

After that you can activate message mode by setting the flag when opening the serial interface: tInterfaceParameters.usConfig |= (MSG_MODE);

Note that message mode is a reception mode (it will collect reception until a terminator is received rather than informing of each received character). The length option is activated by adding the appropriate flag: tInterfaceParameters.usConfig |= (MSG_MODE_RX_CNT);

In this case the receiver first reads the message length from the queue and then the message data content.

These cases are discussed in the other thread and examples are in application.c (TEST_MSG_MODE and TEST_MSG_CNT_MODE).

Note that defines SUPPORT_MSG_MODE and SUPPORT_MSG_CNT are also required for the corresponding driver support to be activated.

Finally note that the NE64 has very little SRAM and the UART buffers required to support the interface (lengths TX_BUFFER_SIZE and RX_BUFFER_SIZE) may have to be chosen carefully to avoid running out of memory. Alternatively other resources may have to be deactivated.



Hi Mark,
I'm fairly new to uTasker. I've got my own program to work and UDP connection going. I've read through the documents and this forum topic and I'm still having trouble getting the SCI to work(for example, whether to add or change codes in my own program or in the header/c files).
I know this is an annoying question, but can you please tell me step by step how to initialize and gather the information from the SCI?


[0] Message Index

[#] Next page

Go to full version