none
UART Configuration RRS feed

  • Question

  • HI 

    I am working on WINCE and sabre board DL (SDP) IMX.6 DL.And wanted</g> to UP UART5  (COM5), as UART1 is working as debug port.

    I Shorted TX and TX line of UART5 and trying to receive the data that I had sent. But not able to do so. Application has written for same 

    I tried to debug the driver and found that data is transmitting means data in the UTXD register. but receive interrupt has not triggered so that data is not received. Same I can not able to probe the data on TX line. After I include the PAD configuration of UART5  as follow 

      

    void uart5_iomux_config(void)
    {
        // Config uart5.UART_RX_DATA to pad KEY_ROW1

    HW_IOMUXC_SW_MUX_CTL_PAD_KEY_ROW1_WR(
    BF_IOMUXC_SW_MUX_CTL_PAD_KEY_ROW1_SION_V(DISABLED)|
    BF_IOMUXC_SW_MUX_CTL_PAD_KEY_ROW1_MUX_MODE_V(ALT4));

        HW_IOMUXC_SW_PAD_CTL_PAD_KEY_ROW1_WR(
                BF_IOMUXC_SW_PAD_CTL_PAD_KEY_ROW1_HYS_V(ENABLED) | 
                BF_IOMUXC_SW_PAD_CTL_PAD_KEY_ROW1_PUS_V(100K_OHM_PU) | 
                BF_IOMUXC_SW_PAD_CTL_PAD_KEY_ROW1_PUE_V(PULL) | 
                BF_IOMUXC_SW_PAD_CTL_PAD_KEY_ROW1_PKE_V(ENABLED) | 
                BF_IOMUXC_SW_PAD_CTL_PAD_KEY_ROW1_ODE_V(DISABLED) | 
                BF_IOMUXC_SW_PAD_CTL_PAD_KEY_ROW1_SPEED_V(100MHZ) | 
                BF_IOMUXC_SW_PAD_CTL_PAD_KEY_ROW1_DSE_V(40_OHM) | 
                BF_IOMUXC_SW_PAD_CTL_PAD_KEY_ROW1_SRE_V(SLOW));

        HW_IOMUXC_UART5_UART_RX_DATA_SELECT_INPUT_WR(
                BF_IOMUXC_UART5_UART_RX_DATA_SELECT_INPUT_DAISY_V(KEY_ROW1_ALT4));

    //----------------------------------------------------------------------------------------------------------------------
        HW_IOMUXC_SW_MUX_CTL_PAD_KEY_COL1_WR(
                BF_IOMUXC_SW_MUX_CTL_PAD_KEY_COL1_SION_V(DISABLED) | 
                BF_IOMUXC_SW_MUX_CTL_PAD_KEY_COL1_MUX_MODE_V(ALT4));

        HW_IOMUXC_SW_PAD_CTL_PAD_KEY_COL1_WR(
                BF_IOMUXC_SW_PAD_CTL_PAD_KEY_COL1_HYS_V(ENABLED) | 
                BF_IOMUXC_SW_PAD_CTL_PAD_KEY_COL1_PUS_V(100K_OHM_PU) | 
                BF_IOMUXC_SW_PAD_CTL_PAD_KEY_COL1_PUE_V(PULL) | 
                BF_IOMUXC_SW_PAD_CTL_PAD_KEY_COL1_PKE_V(ENABLED) | 
                BF_IOMUXC_SW_PAD_CTL_PAD_KEY_COL1_ODE_V(DISABLED) | 
                BF_IOMUXC_SW_PAD_CTL_PAD_KEY_COL1_SPEED_V(100MHZ) | 
                BF_IOMUXC_SW_PAD_CTL_PAD_KEY_COL1_DSE_V(40_OHM) | 
                BF_IOMUXC_SW_PAD_CTL_PAD_KEY_COL1_SRE_V(SLOW));

        HW_IOMUXC_UART5_UART_RX_DATA_SELECT_INPUT_WR(
                BF_IOMUXC_UART5_UART_RX_DATA_SELECT_INPUT_DAISY_V(KEY_ROW1_ALT4));

    But Stil I am not able to receive the data 

    Please look into the issue....


    <g class="gr_ gr_38 gr-alert gr_gramm gr_run_anim Punctuation only-ins replaceWithoutSep" data-gr-id="38" id="38">Thanks</g> <g class="gr_ gr_32 gr-alert gr_spell gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="32" id="32">Bipul</g> Pandey


    Thursday, December 15, 2016 9:58 AM

Answers

  • The SDP-DL does not bring out UART5. It brings out UART1 (for debug) and UART3 (that goes to the GPS). Tell us exactly to which pins (list the pad numbers!) you are connecting to.

    KEY_ROW1 (U6) on the SDP-DL is used as CSPI1_CS0 and KEY_COL1 (U7) is used as CSPI1_MISO. Are you connecting to these signals and are you crossing these pins? Are you sure the SPI driver code is not reconfiguring these signals after your code above has run?

    If you are sure about all of the above, then your code is correct. The 2nd call to set the daisy is of course not needed, so you can remove that.


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6

    Thursday, December 15, 2016 8:46 PM
    Moderator

All replies

  • The SDP-DL does not bring out UART5. It brings out UART1 (for debug) and UART3 (that goes to the GPS). Tell us exactly to which pins (list the pad numbers!) you are connecting to.

    KEY_ROW1 (U6) on the SDP-DL is used as CSPI1_CS0 and KEY_COL1 (U7) is used as CSPI1_MISO. Are you connecting to these signals and are you crossing these pins? Are you sure the SPI driver code is not reconfiguring these signals after your code above has run?

    If you are sure about all of the above, then your code is correct. The 2nd call to set the daisy is of course not needed, so you can remove that.


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6

    Thursday, December 15, 2016 8:46 PM
    Moderator
  • Hi bipul,

    I assume you actually created a loop back connection, not "I Shorted TX and TX line" but connected TX to RX and SND to RCV etc.

    Sincerely,

    IoTGirl

    Friday, December 16, 2016 10:52 PM
    Moderator