LPUART or UART can not receive information

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

LPUART or UART can not receive information

Jump to solution
1,327 Views
Jimmywder03
Contributor III

Hello,

I'm Trying to use LPUART to receive information from other device so I tried to use the LPUART interrupt example but i do not receive anything and I also tried to receive the data via LPUART 3.

Can Anyone told me if that example needs other thing to make tha example work with the LPUART3 pins.

 

0 Kudos
Reply
1 Solution
1,307 Views
jay_heng
NXP Employee
NXP Employee

The LPUART instance is 1 and UART pin is GPIO_AD_B0_12/13 in SDK example.

Which board and UART pin are you using?

If you want to switch to other LPUART instance, you just need to modify below code in example

// in lpuart_interrupt.c 
#define DEMO_LPUART            LPUART1
#define DEMO_LPUART_CLK_FREQ   BOARD_DebugConsoleSrcFreq()
#define DEMO_LPUART_IRQn       LPUART1_IRQn
#define DEMO_LPUART_IRQHandler LPUART1_IRQHandler

// in pin_mux.c
void BOARD_InitPins(void) {
  CLOCK_EnableClock(kCLOCK_Iomuxc);           

  IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_12_LPUART1_TXD, 0U); 
  IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_13_LPUART1_RXD, 0U); 
  IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_12_LPUART1_TXD, 0x10B0U); 
  IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_13_LPUART1_RXD, 0x10B0U); 
}

 

View solution in original post

3 Replies
1,314 Views
Jimmywder03
Contributor III

Hello, I'm using the imxrt1052 and the SDK that I used was lpuart_interrupt

 

Thanks for all 

0 Kudos
Reply
1,308 Views
jay_heng
NXP Employee
NXP Employee

The LPUART instance is 1 and UART pin is GPIO_AD_B0_12/13 in SDK example.

Which board and UART pin are you using?

If you want to switch to other LPUART instance, you just need to modify below code in example

// in lpuart_interrupt.c 
#define DEMO_LPUART            LPUART1
#define DEMO_LPUART_CLK_FREQ   BOARD_DebugConsoleSrcFreq()
#define DEMO_LPUART_IRQn       LPUART1_IRQn
#define DEMO_LPUART_IRQHandler LPUART1_IRQHandler

// in pin_mux.c
void BOARD_InitPins(void) {
  CLOCK_EnableClock(kCLOCK_Iomuxc);           

  IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_12_LPUART1_TXD, 0U); 
  IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_13_LPUART1_RXD, 0U); 
  IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_12_LPUART1_TXD, 0x10B0U); 
  IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_13_LPUART1_RXD, 0x10B0U); 
}

 

1,317 Views
jay_heng
NXP Employee
NXP Employee

Can you please tell me the MCU chip part number?

and also which SDK example you are using?

0 Kudos
Reply