1549 UART

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

1549 UART

746 Views
eddiemallon
Contributor I

I am using the MCB1500 board and trying to transmit data from UART0. I am not seeing anything on pin IO2.6 using a scope. The signal is sitting Hi.

The relevant code extracts are listed below.

*****************************************************************************************************************

void LPC1549_init(void)    //1549 SWM initialisation
{ /* Enable the clock to the Switch Matrix */ 
 Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_SWM); 
 
 Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 4, (IOCON_MODE_PULLUP | IOCON_DIGMODE_EN));
 Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 5, (IOCON_MODE_PULLUP | IOCON_DIGMODE_EN));
 Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 6, (IOCON_MODE_PULLUP | IOCON_DIGMODE_EN));
 Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 7, (IOCON_MODE_PULLUP | IOCON_DIGMODE_EN));

 Chip_IOCON_PinMuxSet(LPC_IOCON, 2, 6, (IOCON_MODE_PULLUP | IOCON_DIGMODE_EN)); //UART0 Tx
 Chip_IOCON_PinMuxSet(LPC_IOCON, 2, 7, (IOCON_MODE_PULLUP | IOCON_DIGMODE_EN)); //UARTO Rx

 //connect functions to 20w DIN connector MOTOR 1
 Chip_SWM_MovablePinAssign(SWM_SPI1_SSELSN_0_IO,4); // /CS PIO0-4 DIN Con pin 2
 Chip_SWM_MovablePinAssign(SWM_SPI1_MOSI_IO,5);  // DOUT PIO0-5 DIN Con pin 4
 Chip_SWM_MovablePinAssign(SWM_SSP1_MISO_IO,6);  // DIN PIO0-6 DIN Con pin 6
 Chip_SWM_MovablePinAssign(SWM_SSP1_SCK_IO,7);  // SCLK PIO0-7 DIN Con pin 8

 Chip_SWM_MovablePinAssign(SWM_UART0_TXD_O,71);  // UART0 Tx PIO2_6
 Chip_SWM_MovablePinAssign(SWM_UART0_RXD_I,72);  // UART0 Rx PIO2_7
 
 Chip_Clock_DisablePeriphClock(SYSCTL_CLOCK_SWM);
}

*********************************************************************************************************************

// the following is taken from the LCPopen example

void Serial_init(void) // Setup UART0

 Chip_UART_Init(LPC_USART0);
 Chip_UART_ConfigData(LPC_USART0, UART_CFG_DATALEN_8 | UART_CFG_PARITY_NONE | UART_CFG_STOPLEN_1);
 Chip_UART_SetBaud(LPC_USART0,300);
 /* Optional for low clock rates only: Chip_UART_SetBaudWithRTC32K(LPC_USART, 300); */
 Chip_UART_Enable(LPC_USART0);
 Chip_UART_TXEnable(LPC_USART0);

}

 void Serial_out(void) // simple tansmit function called from MAIN
 {
while
  (~LPC_USART0->STAT & UART_STAT_TXRDY)
 
  LPC_USART0 -> TXDATA = 0x66;
 }

Regards

Eddie Mallon

Labels (1)
0 Kudos
1 Reply

663 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Eddie, I hope you're doing well!

 

I'm sorry for the inconveniences this may cause, but could you please contact Keil Support for help with this development kit?

 

Take care, best regards,

Sebastian

0 Kudos