Pin multiple switch

Because pin multiplex, RS485_1 multiplexing with UART5 RTSCTS , RS485_2 multiplexing with UART3, CAN1 multiplexing with UART4, the following configurations can switch these pins function.

RS485_1/UART5_RTSCTS

Default as RS485_1, following the steps set as UART5_RTSCTS. UART2 switch to UART5_RTSCTS:

  • Open the JP5

  • Restart development board, press any key on the PC keyboard to enter u-boot command line

  • Configure UART5_RTS/CTS function Enter the following command in the u-boot command line, to get the current optargs variables:

    # print optargs
    optargs=board-am335xevm.display_mode=lcd7ic

Add to optargs variable uart2_to_uart5hwc=1, configure UART2 as UART5RTS/CTS function:

    # setenv optargs board-am335xevm.display_mode=lcd7ic uart2_to_uart5hwc=1
  • Save the configuration and start the development board
    # saveenv
    # boot

After the above steps, the kernel will be configured as UART5 RTSCTS function. Following the steps to reset it to RS485_1:

UART2 switch to RS485_1:

  • Open the jumper JP5

  • Restart development board, press any key on the PC keyboard to enter u-boot command line

  • configuration RS485_1 function

Enter the following command in the u-boot command line, to get the current optargs variables:

    # print optargs
    optargs=board-am335xevm.display_mode=lcd7ic uart2_to_uart5hwc=1

Change the optargs variable to RS485_1 function

    # setenv optargs board-am335xevm.display_mode=lcd7ic
  • Save the configuration and start the development board
    # saveenv
    # boot

After the above steps, the kernel will be configured as RS485_1 function.

RS485_2/UART3 and CAN1/UART4

These two operations are required to switch jumper JP7, which switch RS485_2 and UART3 relatively simple, only need to connect/disconnect JP7 jumper, without rebooting or additional configuration:

  • JP7 open: UART3 multiplex as RS485_2, UART4 pin function only as a CAN
  • JP7 close: UART3 multiplex as RS232, UART4 pin functions only as a general UART UART4 default configured as CAN1 function, the following steps may be configured as a general UART

As general UART:

  • JP7 close (UART3 multiplex as RS232 function )

  • restart development board, press any key on the PC keyboard to enter the u-boot command line

  • configure UART function

Enter the following command in the u-boot command line, to get the current optargs variables:

    # print optargs
    optargs=board-am335xevm.display_mode=lcd7ic

Add to optargs variable uart4_to_can1=, Not be configured as the default UART4 CAN function, but it is configured to UART function:

    # setenv optargs board-am335xevm.display_mode=lcd7ic uart4_to_can1=0
  • Save the configuration and start the development board
    # saveenv
    # boot
`

After the above steps, the kernel will be configured as UART function. Following the steps to restore it to CAN:

UART4 switch to CAN

  • JP7 open (UART3 as RS485_2 function )

  • Restart development board, press any key on the PC keyboard to enter the u-boot command line

  • Configure UART function

Enter the following command in the u-boot command line, to get the current optargs variables:

    # print optargs
    optargs=board-am335xevm.display_mode=lcd7ic uart4_to_can1=0

Delete optargs variable uart4_to_can1=0 The UART4 configured as CAN functions

    # setenv optargs board-am335xevm.display_mode=lcd7ic
  • Save the configuration and start the development board
    # saveenv
    # boot

After the above steps, the kernel will be configured as CAN function.