Not able to use UART4 on LPC1778

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Not able to use UART4 on LPC1778

894 Views
vijayvaidya
Contributor I

Hello,

On our new board we have wired up UART4 on Pins P5[3]-U4_RXD & P5[4]-U4_TXD.

We are also using UART0 and UART2 on the same board.

Our programs are based on LPCOpen2.10 libraries.

We have followed the same initialization steps in UART4 as those of UART0 & UART2.

The performance of UART0 & UART2 is as expected.

It is observed that after bytes are loaded to U4THR, No waveform is seen on U4_TXD pin.

For the testing, we have followed these steps,

1. The program is reduced to just 4 steps consisting of,

      i) Initialization of above mentioned pins in their respective functions (IOCON_FUNC4)

      ii) Initialize UART4 to 9600:8:N:1
      iii) Enable Transmitter by loading 0x1 to LPC_UART4->TER2
           Though actually this is not required, as at Reset, Transmitter is already Enabled
      iv) Load a byte 0x55 every about 50msec through a pure for loop delay

We don't observe any activity on U4_TXD Pin.

Our doubts are,

1. Since UART4 on LPC1778 is different than other UARTs', in that, it also supports Synchronous Mode as well as    Smart Card Mode,

   Does it require something more in Initialization

2. While digging on the net we could locate following thread,

     https://community.nxp.com/thread/424113

     

      this thread seems to be really not resolved

3. As mentioned therein, we don't find TER register in the referred User Manual viz. UM10470.pdf Rev. 4.0 — 21    December 2016

   

But our doubt is, there is something missing in the initialization itself, as on Reset, Transmitter being Enabled,

it is bare minimum that we should see some activity on U4_TXD pin in the above mentioned steps.

We are stuck and not able to go ahead.

Any pointers on above will be highly appreciated.

Thank you very much,

- Vijay Vaidya

Labels (1)
0 Kudos
Reply
2 Replies

836 Views
vijayvaidya
Contributor I

Hello,

Thank you for your suggestions.

However, apart from above suggestions what worked for us is as follows.

After a lot of experimentation we have found out that LPC_UART4->TER2 has 'No Effect' on UART4 Transmitter Enable/Disable status.

However, everything works fine if we use LPC_UART4->TER1 (Note that this is Not As Per Documentation)

Of course, we were not able to test the Sync and Smartcard Mode as these were not possible with the current hardware.

Concerned people at NXP may take note of this finding.

Thank You very much for your support,

- Vijay Vaidya

0 Kudos
Reply

836 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Vijay,

I suppose that you have configured the IOCON_P5_4 register to select the pin as U4_TxD correctly,  pls check if you clear the SCIEN bit in SCICTRL register, clear the IRDAEN in ICR register.

If you write the char to THR register and check the THREbit  in LSR register, can the bit be set or not?

pastedImage_1.png

If it can be set, it means that the data has been transmitted to pin.

Hope it can help you

BR

XiangJun Rong

0 Kudos
Reply