LPUART or UART can not receive information

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LPUART or UART can not receive information

跳至解决方案
1,325 次查看
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 项奖励
回复
1 解答
1,305 次查看
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); 
}

 

在原帖中查看解决方案

3 回复数
1,312 次查看
Jimmywder03
Contributor III

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

 

Thanks for all 

0 项奖励
回复
1,306 次查看
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,315 次查看
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 项奖励
回复