Anybody using ip-ip tunnels on MQX?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Anybody using ip-ip tunnels on MQX?

跳至解决方案
613 次查看
grixk60n512
Contributor II

Hi

Is anybody using ip-ip tunnels on MQX? I am trying with MQX version 3.8.1 (with a Kinetis K60) but not having much success as there is very little documentation/sample code?

Thanks

Gary

标签 (1)
标记 (2)
0 项奖励
1 解答
394 次查看
grixk60n512
Contributor II

Hi David

Thanks for all the info, not quite what I had in mind. But I have managed to come up with a solution. I think that I need to switch to MQX 4.0 quite soon.

Regards

Gary

在原帖中查看解决方案

0 项奖励
2 回复数
394 次查看
DavidS
NXP Employee
NXP Employee

Hi Gary,

Are you asking about the MQX IPC (Inter Processor Communication)?

If yes the MQXUG.pdf in the MQX4.0/docs/mqx folder section 3.8 discusses IPC.

Section 3.8.4.5.4 references the example we have in MQX4.0/examples/ipc folder.

I've just tested this demo using two Tower kits with a NULL modem (Null modem cables have the Tx (transmit) and Rx (Recieve) lines crossed over, thereby allowing data to be sent from one device to the other: reference).

Note that the IPC is using a UARTin the interrupt mode as the IPC communication link  so in your user_config.h header you need something like the following:

#define BSPCFG_ENABLE_TTYF 0    // <---polled mode disabled

#define BSPCFG_ENABLE_ITTYF 1   //  <--Interrupt mode enabled

Other #defines you need

#define MQX_IS_MULTI_PROCESSOR   1

#define MQX_USE_IPC  1

Since there is only one UART interface for each tower kit, you can either use the OSBDM debugger interface as a COM port or define the default for "iodebug:".  My example uses iodebug: for the TWR-K60F120M kit and the OSJTAG-COM via the OSBDM interface for the TWR-K60D100M kit.

I've attached ZIP with the modified file for CPU1 and CPU2 and the respective user_config.h and twrk60xxxx.h headers.  Again using MQX4.0.

You must run the CPU2 project first, then boot/run the CPU1 project.

CPU2 project is then waiting for a message from CPU2 and once it receives it, will increment a variable and return it to thr sender/CPU1.  CPU2 is basically modifying the message and returning the message to CPU1.

CPU1 will send a message to CPU2.  Above explains what CPU2 does.

I added LED blinking to the CPU2 example so there is a visual indication the system is working.

For CPU1 I used the OSBDM COM port to watch the terminal output.

Once the CPU1 has received 1000 messages, it terminate.  You can just press reset button on CPU1 and the communication starts again.

Regards,

David

395 次查看
grixk60n512
Contributor II

Hi David

Thanks for all the info, not quite what I had in mind. But I have managed to come up with a solution. I think that I need to switch to MQX 4.0 quite soon.

Regards

Gary

0 项奖励