PRINTF hangs when running m33 core on imx93

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

PRINTF hangs when running m33 core on imx93

1,281 Views
PeterLendvai
Contributor I

Hi everyone,

I have an issue with the PRINTF function when I'm running the rpmsg_lite_str_echo and the rpmsg_lite_pingpong demo application on the m33 core of the imx93.

The printf works until the first message arrive from the linux host. After that the printf hangs here:

fsl_lpuart.c line 1100:

while (0U == (base->STAT & LPUART_STAT_TDRE_MASK))

The only modification in the example project is that I changed the debug uart to uart6.

Thank you!

0 Kudos
Reply
6 Replies

1,248 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

Please you share your device tree and modification in M33?

Best Regards,
Zhiming

0 Kudos
Reply

1,246 Views
PeterLendvai
Contributor I

Hi!

Following code is copied from my imx33 pin_mux.dts

Can it be a clock problem?

/ {
    model = "NXP i.MX 93 Based Custom Board";
    compatible = "fsl,imx93-custom-board", "fsl,imx93";

    soc {
        #address-cells = <1>;
        #size-cells = <1>;

        iomuxc: iomuxc@443C0000 {
            compatible = "fsl,imx93-iomuxc";
            reg = <0x443C0000 0x470>;
        };
    };
};

&iomuxc {
    pinctrl-names = "default_iomuxc";
    pinctrl-0 = <&BOARD_InitPins>;


    imx93-custom-board {
        BOARD_InitPins: BOARD_InitPinsgrp {                /*!< Function assigned for the core: Cortex-M33[cm33] */
/*
 * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
BOARD_InitPins:
- options: {callFromInitBoot: 'true', coreID: cm33}
- pin_list:
  - {pin_num: L18, peripheral: LPUART6, signal: lpuart_rx, pin_signal: GPIO_IO05}
  - {pin_num: L17, peripheral: LPUART6, signal: lpuart_tx, pin_signal: GPIO_IO04}
 * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
 */
            fsl,pins = <
                MX93_PAD_GPIO_IO04__LPUART6_TX             0x0000051E
                MX93_PAD_GPIO_IO05__LPUART6_RX             0x0000051E
            >;
        };
    };
};

 

0 Kudos
Reply

1,226 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

Are you using zephyr? I checked the zephyr , there are more than a few changes needed, at least from a device tree perspective, so please provide all the modifications.

 

Then in clock driver, there is no setting for LPUART6, please refer drivers/clock_control/clock_control_mcux_ccm_rev2.c



Best Regards,
Zhiming

0 Kudos
Reply

1,215 Views
PeterLendvai
Contributor I

No, I"m not using zephyr. I'ts just the basic freeRTOS rpmsg_str_echo project. The only modification I've done is to change the UART output to UART6. I modified the following:

board.h:

 /*The UART to use for debug messages.*/ 
#define BOARD_DEBUG_UART_INSTANCE   6U
#define BOARD_DEBUG_UART_BAUDRATE   115200U
#define BOARD_DEBUG_UART_TYPE       kSerialPort_Uart
#define BOARD_DEBUG_UART_CLOCK_ROOT kCLOCK_Root_Lpuart6
#define BOARD_DEBUG_UART_CLOCK_GATE kCLOCK_Lpuart6
#define BOARD_DEBUG_UART_CLK_FREQ   CLOCK_GetIpFreq(BOARD_DEBUG_UART_CLOCK_ROOT)

pin_mux.c:

    IOMUXC_SetPinMux(IOMUXC_PAD_GPIO_IO04__LPUART6_TX, 0U);
    IOMUXC_SetPinMux(IOMUXC_PAD_GPIO_IO05__LPUART6_RX, 0U);
Tags (1)
0 Kudos
Reply

1,195 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

There is no such issue with uart6 on EVK board. 

Zhiming_Liu_0-1735105534088.png

Why not set pinconfig? below is my BOARD_InitPins

void BOARD_InitPins(void) {                                /*!< Function assigned for the core: undefined[cm33] */
    IOMUXC_SetPinMux(IOMUXC_PAD_GPIO_IO05__LPUART6_RX, 0U);
    IOMUXC_SetPinMux(IOMUXC_PAD_GPIO_IO04__LPUART6_TX, 0U);

    IOMUXC_SetPinConfig(IOMUXC_PAD_GPIO_IO05__LPUART6_RX, 
                        IOMUXC_PAD_PD_MASK);
    IOMUXC_SetPinConfig(IOMUXC_PAD_GPIO_IO04__LPUART6_TX, 
                        IOMUXC_PAD_DSE(15U));
}



Best Regards,
Zhiming

0 Kudos
Reply

1,183 Views
PeterLendvai
Contributor I

I'm going to try out to set Pinconfig. I've changed the pins with the configtool, and that won't set the pinconfig for me. But the printf worked until the "Nemeservice sent..." line, so I tought something else the problem.

0 Kudos
Reply