Data Serially-In Ethernet-Out on an NE64 board

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Data Serially-In Ethernet-Out on an NE64 board

ソリューションへジャンプ
2,439件の閲覧回数
Ryu
Contributor I
Hi.

I am using a Freescale EVB9S12NE64 board to take readings serially over RS232 from a device, and transmit (UDP) this data to a PC over NE64's Ethernet to a computer. It sounds simple, but I'm a bit stuck as I'm not familiar with embedded devices. Is there a simple quick method to achive this?
I tried modifying the Connector_application which came with the board, but I came to a dead end, as I couldn't find any easy way/driver to implement the data reception from the serial port (SCI). I'm using Codewarrior IDE 5.7, the special edition one. So i'm a bit restricted on code-size and files number.

Thank you
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,415件の閲覧回数
mjbcswitzerland
Specialist V
Hi Ryu

Take a look at the uTasker project - www.uTasker.com

It includes all that you need including the UART driver (with several modes - character, message with flow-control). It is free for non-commercial applications and includes full support.

To get an idea of code size see the following tutorial:
http://www.utasker.com/docs/NE64/uTaskerV1.2-Tutorial.PDF

Using just UDP it will occupy about 8..10k of space but it may be worth looking at TCP because it will allow end to end flow control (see the Telnet demo) and so avoid UART overruns.

Examples of UART->UDP and UDP->UART code

// read UART input and sent to UDP portLength = fnRead( SerialPortID, ptrUDP_Frame->ucUDP_Message, MEDIUM_MESSAGE);fnSendUDP(MyUDP_Socket, ucIP, usPortNr, ptrUDP_Frame, Length, OWN_TASK);

UDP->UART (using call back on UDP frame reception
extern int fnUDPListner(USOCKET SocketNr, unsigned char ucEvent, unsigned char *ucIP, unsigned short usPortNr, unsigned char *data, unsigned short usLength){    switch (ucEvent) {    case UDP_EVENT_RXDATA:        fnWrite(SerialPortID, data, usLength);        break;    }}

The project comes with a GNU build and a serial loader/debugger as well as a CW project.
Simply remove unwanted files (like smtp, pop3, etc. to keep below the max allowed file count of eval version). It also contains an NE64 simulator so you can completly develop and test your project before moving to the target. The UART will be simulated over a COM port and the Ethernet interface by the PC's NIC.

Good luck

Regards

Mark Butcher

P.S. There is a live NE64 demo on the web site above. You can  also telnet to it at "telnet 84.253.57.46"



元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,416件の閲覧回数
mjbcswitzerland
Specialist V
Hi Ryu

Take a look at the uTasker project - www.uTasker.com

It includes all that you need including the UART driver (with several modes - character, message with flow-control). It is free for non-commercial applications and includes full support.

To get an idea of code size see the following tutorial:
http://www.utasker.com/docs/NE64/uTaskerV1.2-Tutorial.PDF

Using just UDP it will occupy about 8..10k of space but it may be worth looking at TCP because it will allow end to end flow control (see the Telnet demo) and so avoid UART overruns.

Examples of UART->UDP and UDP->UART code

// read UART input and sent to UDP portLength = fnRead( SerialPortID, ptrUDP_Frame->ucUDP_Message, MEDIUM_MESSAGE);fnSendUDP(MyUDP_Socket, ucIP, usPortNr, ptrUDP_Frame, Length, OWN_TASK);

UDP->UART (using call back on UDP frame reception
extern int fnUDPListner(USOCKET SocketNr, unsigned char ucEvent, unsigned char *ucIP, unsigned short usPortNr, unsigned char *data, unsigned short usLength){    switch (ucEvent) {    case UDP_EVENT_RXDATA:        fnWrite(SerialPortID, data, usLength);        break;    }}

The project comes with a GNU build and a serial loader/debugger as well as a CW project.
Simply remove unwanted files (like smtp, pop3, etc. to keep below the max allowed file count of eval version). It also contains an NE64 simulator so you can completly develop and test your project before moving to the target. The UART will be simulated over a COM port and the Ethernet interface by the PC's NIC.

Good luck

Regards

Mark Butcher

P.S. There is a live NE64 demo on the web site above. You can  also telnet to it at "telnet 84.253.57.46"



0 件の賞賛
返信