UART receiver not ready

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

UART receiver not ready

826件の閲覧回数
sanghavi
Contributor I

I am trying to enable UART receive interrupt using "UIMRn" register & “UCR”.

 

   // Enable Serial Port 0 receiver event interrupt

   CurrentUIMR |= MCF52xx_UART_UIMR_FFULL;

   MCF52xx_UART0_UIMR = CurrentUIMR;

 

   // Enable Serial Port 0 receiver.

   MCF52xx_UART0_UCR = MCF52xx_UART_UCR_RX_ENABLED;

 

When I am reading UIMR & UISR contains, value is 0, in special condition (when I received noise on UnRXD line).

 

I encounter this issue in special condition, when I received noise (30 uS) signal on UnRXD line. In normal, condition my code is working as expected.

 

I am using MCF5275 processor.

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 返信

593件の閲覧回数
TomE
Specialist II

> CurrentUIMR |= MCF52xx_UART_UIMR_FFULL;


That is only enabling interrupt on RxRDY (or FFULL if FFULL is set in UIMR, but don't do that).


Do you have any code to handle receive overruns? It will probably lock up if you don't.


"Table 27-5. USRn Field Descriptions" says "OE is cleared by the RESET ERROR STATUS command in UCRn."


> When I am reading UIMR & UISR contains, value is 0, in special condition (when I received noise on UnRXD line).


So your "special condition" is when you send a 30us pulse. Is it a clean test pulse 30us wide or higher frequency noise that long?

If the noise gave a Framing Error you should get a Receive Interrupt with FE. If it looks like a Break you might get RB or DB in UISR.

If "value is 0" means UISR is zero then there's no receive character or delta-break.

What are you expecting to happen when you send a 30us pulse? 30us is one bit or more at baud rates higher than 33,333 and a "Break" if faster than 300000, so it should look like a normal character.

What baud rate are you using? Positive or negative pulse?

Tom

0 件の賞賛
返信