i.MX 8M Plus: How to IOMUXC on Cortex-M7 core?

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

i.MX 8M Plus: How to IOMUXC on Cortex-M7 core?

442 Views
teleportboy
Contributor I

I want to use UART2 to log something. I generated the code using Config Tools for i.MX Applications Processors. Then, on the Linux side, I used picocom -b 115200 /dev/ttymxc1, but ultimately nothing is coming through to the UART.

I also tried using a ready-made working example of hello_world which uses UART4 - that doesn't work either.

The iomuxc node in the .dts file looks approximately like this:

 

iomuxc {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_hog>;

    pinctrl_uart1: uart1grp {
        fsl,pins = <
            MX8MP_IOMUXC_SAI2_TXFS__UART1_DTE_RTS      0x00000106
            MX8MP_IOMUXC_UART1_RXD__UART1_DCE_RX       0x00000140
            MX8MP_IOMUXC_UART1_TXD__UART1_DCE_TX       0x00000140
        >;
    };

    pinctrl_uart2: uart2grp {
        fsl,pins = <
            MX8MP_IOMUXC_UART2_RXD__UART2_DCE_RX       0x00000140
            MX8MP_IOMUXC_UART2_TXD__UART2_DCE_TX       0x00000140
        >;
    };

    pinctrl_uart3: uart3grp {
        fsl,pins = <
            MX8MP_IOMUXC_UART3_RXD__UART3_DCE_RX       0x00000140
            MX8MP_IOMUXC_UART3_TXD__UART3_DCE_TX       0x00000140
        >;
    };

    pinctrl_uart4: uart4grp {
        fsl,pins = <
            MX8MP_IOMUXC_ECSPI2_MISO__UART4_DTE_RTS    0x00000106
            MX8MP_IOMUXC_ECSPI2_MOSI__UART4_DCE_TX     0x00000140
            MX8MP_IOMUXC_ECSPI2_SCLK__UART4_DCE_RX     0x00000140
        >;
    };
};

 

 

Multiplexing code:

 

 

void BOARD_InitBootPins(void)
{
    IOMUXC_SetPinMux(IOMUXC_UART2_RXD_UART2_RX, 0U);
    IOMUXC_SetPinConfig(IOMUXC_UART2_RXD_UART2_RX, 
                        IOMUXC_SW_PAD_CTL_PAD_DSE(2U) |
                        IOMUXC_SW_PAD_CTL_PAD_PUE_MASK |
                        IOMUXC_SW_PAD_CTL_PAD_PE_MASK);
    IOMUXC_SetPinMux(IOMUXC_UART2_TXD_UART2_TX, 0U);
    IOMUXC_SetPinConfig(IOMUXC_UART2_TXD_UART2_TX, 
                        IOMUXC_SW_PAD_CTL_PAD_DSE(2U) |
                        IOMUXC_SW_PAD_CTL_PAD_PUE_MASK |
                        IOMUXC_SW_PAD_CTL_PAD_PE_MASK);
}

 

 

What could be the problem?

0 Kudos
Reply
1 Reply

418 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

You have to configure hardware too and remove uart1.

Regards

0 Kudos
Reply