Getting serial out in CW 10.2 and MQX 3.8

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

Getting serial out in CW 10.2 and MQX 3.8

跳至解决方案
1,445 次查看
intevac_coder
Contributor III

Hello!

What changes need to be made to get the K40 tower to output serial data to the serial port card so I can read the data stream in Hyperterminal?  I had this all fixed up in MQX 3.7 but that doesn't seem to work in 3.8.

 

I've changed user_config.h

 BSPCFG_ENABLE_TTYD 1

 

and changed twrk40x256.h

#ifndef BSP_DEFAULT_IO_CHANNEL
#if BSPCFG_ENABLE_TTYA
//#define BSP_DEFAULT_IO_CHANNEL "ttya:" /* OSJTAG-COM polled mode */
#define BSP_DEFAULT_IO_CHANNEL "ttyd:" // Tower serial polled mode
#define BSP_DEFAULT_IO_CHANNEL_DEFINED
#else
//#define BSP_DEFAULT_IO_CHANNEL NULL
#endif
#endif

 

It's always a challenge to get this running again. Thanks!

0 项奖励
回复
1 解答
1,041 次查看
c0170
Senior Contributor III

Hi intevac coder,

 

it is the same procedure as in 3.7 to set the default IO channel.

If you did not set TTYA, then your TTYD channel was not set as default because your condition is #if BSPCFG_ENABLE_TTYA.

With correction:

#ifndef BSP_DEFAULT_IO_CHANNEL
#if BSPCFG_ENABLE_TTYD
#define BSP_DEFAULT_IO_CHANNEL "ttyd:" // Tower serial polled mode
#define BSP_DEFAULT_IO_CHANNEL_DEFINED
#else
#define BSP_DEFAULT_IO_CHANNEL NULL
#endif
#endif

 

Regards,

MartinK

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,042 次查看
c0170
Senior Contributor III

Hi intevac coder,

 

it is the same procedure as in 3.7 to set the default IO channel.

If you did not set TTYA, then your TTYD channel was not set as default because your condition is #if BSPCFG_ENABLE_TTYA.

With correction:

#ifndef BSP_DEFAULT_IO_CHANNEL
#if BSPCFG_ENABLE_TTYD
#define BSP_DEFAULT_IO_CHANNEL "ttyd:" // Tower serial polled mode
#define BSP_DEFAULT_IO_CHANNEL_DEFINED
#else
#define BSP_DEFAULT_IO_CHANNEL NULL
#endif
#endif

 

Regards,

MartinK

0 项奖励
回复
1,041 次查看
intevac_coder
Contributor III

MartinK,

 

Thanks, that change worked.

0 项奖励
回复