UART Communication

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

UART Communication

跳至解决方案
1,159 次查看
blakehodder
Contributor III

Hi,

 

I am using a MCF52255 and trying to use the UART without using the RTOS. Could someone please point me in the direction of an app note or other documentation on this.

 

Regards,

 

Blake

标签 (1)
标记 (3)
1 解答
840 次查看
DavidS
NXP Employee
NXP Employee

Hi Blake,

You can goto the MCF5225x product page on the Freescale website (or google it) and select the Software/Tools tab.

It has baremetal example code:

MCF5225X_SAMPLE_CODE: MCF5225x_SAMPLE_CODE.

Size (K): 1427 Format: zip Rev #: 0 Modified: 12/22/2008


Please note that as product age, so do the examples implying that the latest IDE's like CW10.x might not be supported.

Regards,

David

在原帖中查看解决方案

0 项奖励
回复
5 回复数
841 次查看
DavidS
NXP Employee
NXP Employee

Hi Blake,

You can goto the MCF5225x product page on the Freescale website (or google it) and select the Software/Tools tab.

It has baremetal example code:

MCF5225X_SAMPLE_CODE: MCF5225x_SAMPLE_CODE.

Size (K): 1427 Format: zip Rev #: 0 Modified: 12/22/2008


Please note that as product age, so do the examples implying that the latest IDE's like CW10.x might not be supported.

Regards,

David

0 项奖励
回复
840 次查看
blakehodder
Contributor III

Hi David,

I now have my uart working at the right baud but when I am sending something such as 0x4A its sends ok but will change to 0x29.

What would cause this?

Blake

0 项奖励
回复
840 次查看
DavidS
NXP Employee
NXP Employee

Hi Blake,

Are you setup a simple MCF52259 to a PC terminal window?

Have you oscoped the output?

Regards,

David

0 项奖励
回复
840 次查看
blakehodder
Contributor III

Hi David,

I was over pushing my uart. The MCU was running at such a rate that since I was only sending a value with my program that the uart was not keeping up with the MCU. Once I stuck the delay in, it functioned perfect.

Thanks for all your help.

Blake

840 次查看
blakehodder
Contributor III

Hi David,

Actually at the moment I am connected to a PC via a logic analyzer. If I send 0x55 it works no problem and always sends 0x55 but when I send 0x4A or other values thats when it changes. This is how I send it:

void putc(char val)

{

  while(!(MCF_UART0_USR & MCF_UART_USR_TXRDY) || !(MCF_UART0_USR & MCF_UART_USR_TXEMP) ){

  }

  MCF_UART0_UTB = val;

}

Blake

0 项奖励
回复