lpcware

LPC11xx resets with UARTSend function

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by bdscouter on Sun Aug 04 23:11:00 MST 2013
This is my first project with the LPC uProcessor. 
All functions work correctly with the LPCXpresso LPC1115 development PCB.  However, on my project PCB everything works perfect, except the UARTSend function.  The program gets to the  "LPC_UART->THR = *BufferPtr;" statement and resets. The action is the same with LPC1115 and LPC1113 uProcessors. I can disable the transmit calls and everything else works great. Any help in solving this problem would be appreciated.

I am using the sample UART code.  My code is:

void UARTSend(uint8_t *BufferPtr, uint32_t Length)
{
  while ( Length != 0 )
  {
    /* THRE status, contain valid data */
    while ( !(LPC_UART->LSR & LSR_THRE) );
    LPC_UART->THR = *BufferPtr;
    BufferPtr++;
    Length--;
  }
  return;
}
#endif



Outcomes