UART Communication

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,407件の閲覧回数
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 解決策
1,088件の閲覧回数
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 返答(返信)
1,089件の閲覧回数
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 件の賞賛
返信
1,088件の閲覧回数
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 件の賞賛
返信
1,088件の閲覧回数
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 件の賞賛
返信
1,088件の閲覧回数
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

1,088件の閲覧回数
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 件の賞賛
返信