Two questions about my project:UDP communication and RS-232

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

Two questions about my project:UDP communication and RS-232

Jump to solution
1,289 Views
huangkai
Contributor II

Dear everyone:

     Recently I am doing a project.This is based on MQX system.The hardware system is K60N512.I try to setup a simple udp communication between an UDP client on my PC and the K60 tower.I hope that someone can give me an exapmle.I hope the compilation environment is IAR.The second question is about RS-232 communication.I want set a communication between PC and K60 tower by RS232.I am a rookie.So I hope someone can give me these two examples.    

     Thank you!


Labels (1)
0 Kudos
1 Solution
902 Views
Martin_
NXP Employee
NXP Employee

Hello,

First follow the MQX Getting Started document to build MQX libraries for your board. There is IAR workspace file prepared for that:
c:\Freescale\Freescale_MQX_4_0\config\twrk60n512\iar\build_libs.eww


For simple communication between PC and MQX via RS232 check this example:
c:\Freescale\Freescale_MQX_4_0\mqx\examples\hello2\
IAR project file:
c:\Freescale\Freescale_MQX_4_0\mqx\examples\hello2\iar\hello2_twrk60n512\hello2_twrk60n512.ewp
just "Add existing project..." from the IAR Project menu.


For UDP server there is the example in RTCS User's Guide, section 3.30 Quote of Day server.

View solution in original post

0 Kudos
8 Replies
903 Views
Martin_
NXP Employee
NXP Employee

Hello,

First follow the MQX Getting Started document to build MQX libraries for your board. There is IAR workspace file prepared for that:
c:\Freescale\Freescale_MQX_4_0\config\twrk60n512\iar\build_libs.eww


For simple communication between PC and MQX via RS232 check this example:
c:\Freescale\Freescale_MQX_4_0\mqx\examples\hello2\
IAR project file:
c:\Freescale\Freescale_MQX_4_0\mqx\examples\hello2\iar\hello2_twrk60n512\hello2_twrk60n512.ewp
just "Add existing project..." from the IAR Project menu.


For UDP server there is the example in RTCS User's Guide, section 3.30 Quote of Day server.

0 Kudos
902 Views
huangkai
Contributor II

Dear Sir:

Thank you very much.Because of your help,the UDP communication has succeeded.But RS-232 doesn't work. So I want know if you can give me another example.

Thank you again.

Yours sincerely,

Huang Kai

在 2013-02-01 15:48:41,"Martin Latal" <admin@community.freescale.com> 写道:

|

|

|

|

Two questions about my project:UDP communication and RS-232

created by Martin Latal in MQX Software Solutions - View the full discussion

Hello,

First follow the MQX Getting Started document to build MQX libraries for your board. There is IAR workspace file prepared for that:

c:\Freescale\Freescale_MQX_4_0\config\twrk60n512\iar\build_libs.eww

For simple communication between PC and MQX via RS232 check this example:

c:\Freescale\Freescale_MQX_4_0\mqx\examples\hello2\

IAR project file:

c:\Freescale\Freescale_MQX_4_0\mqx\examples\hello2\iar\hello2_twrk60n512\hello2_twrk60n512.ewp

just "Add existing project..." from the IAR Project menu.

For UDP server there is the example in RTCS User's Guide, section 3.30 Quote of Day server.

Reply to this message by replying to this email -or- go to the message on Freescale Community

Start a new discussion in MQX Software Solutions by email or at Freescale Community

|

|

0 Kudos
902 Views
Martin_
NXP Employee
NXP Employee

Check that you're looking at the right COM device.

Usually for BSP's, the default stdin/stdout/stderr files are routed to OSJtag on the processor board, which provides serial-to-usb CDC class (this enumerates with Host PC as a virtual serial port).

If you wish to use TWR-SER RS232, you will need to define BSP_DEFAULT_IO_CHANNEL configuration to "ttyd:" file on TWR-K60N512, and build BSP and PSP libraries with this configuration.

902 Views
huangkai
Contributor II

Thank you!The problem has been solved!

在 2013-02-04 15:08:15,"Martin Latal" <admin@community.freescale.com> 写道:

|

|

|

|

Two questions about my project:UDP communication and RS-232

created by Martin Latal in MQX Software Solutions - View the full discussion

Check that you're looking at the right COM device.

Usually for BSP's, the default stdin/stdout/stderr files are routed to OSJtag on the processor board, which provides serial-to-usb CDC class (this enumerates with Host PC as a virtual serial port).

If you wish to use TWR-SER RS232, you will need to define BSP_DEFAULT_IO_CHANNEL configuration to "ttyd:" file on TWR-K60N512, and build BSP and PSP libraries with this configuration.

Reply to this message by replying to this email -or- go to the message on Freescale Community

Start a new discussion in MQX Software Solutions by email or at Freescale Community

|

|

0 Kudos
902 Views
c0170
Senior Contributor III

Hello huang kai,

any example which contains this function call printf is a good starting point for you. Anyway, you should start with hello world example.

Please, read Getting started, precisely chapter n. 7 (how to properly jumper your board). That chapter includes information about default console.

Regards,

MartinK

902 Views
huangkai
Contributor II

thank you!

在 2013-02-04 15:05:14,Kojto <admin@community.freescale.com> 写道:

|

|

|

|

Two questions about my project:UDP communication and RS-232

created by Kojto in MQX Software Solutions - View the full discussion

Hello huang kai,

any example which contains this function call printf is a good starting point for you. Anyway, you should start with hello world example.

Please, read Getting started, precisely chapter n. 7 (how to properly jumper your board). That chapter includes information about default console.

Regards,

MartinK

Reply to this message by replying to this email -or- go to the message on Freescale Community

Start a new discussion in MQX Software Solutions by email or at Freescale Community

|

|

0 Kudos
902 Views
huangkai
Contributor II

Dear Sir:

I an very granted to hear from you!Now I will do as you asked me.If I have another questions,I will connect with you again.

Thank you!

Yours Sincerely Huang Kai

在 2013-02-01 15:48:41,"Martin Latal" <admin@community.freescale.com> 写道:

|

|

|

|

Two questions about my project:UDP communication and RS-232

created by Martin Latal in MQX Software Solutions - View the full discussion

Hello,

First follow the MQX Getting Started document to build MQX libraries for your board. There is IAR workspace file prepared for that:

c:\Freescale\Freescale_MQX_4_0\config\twrk60n512\iar\build_libs.eww

For simple communication between PC and MQX via RS232 check this example:

c:\Freescale\Freescale_MQX_4_0\mqx\examples\hello2\

IAR project file:

c:\Freescale\Freescale_MQX_4_0\mqx\examples\hello2\iar\hello2_twrk60n512\hello2_twrk60n512.ewp

just "Add existing project..." from the IAR Project menu.

For UDP server there is the example in RTCS User's Guide, section 3.30 Quote of Day server.

Reply to this message by replying to this email -or- go to the message on Freescale Community

Start a new discussion in MQX Software Solutions by email or at Freescale Community

|

|

0 Kudos
902 Views
huangkai
Contributor II

Help!

0 Kudos