Run time pin multiplexing

I am required to change the pin functionalities / choose alternate function during run time. Is there any way using which I can choose any alternate function for pins??

Hi @vinaygb

Welcome to Toradex Community

Could you provide me the software and hardware versions of your setup?

We are planning to use LCD lines as parallel data bus for initial configuration of the slave device. Once the initial configuration is done, parallel LCD lines need to be configured as RGB interface lines. This can be achieved only when it is possible to change the pin configuration during run time. So, suggest us on the following queries:

  1. Can LCD lines be used as parallel data bus?
  2. How to change pin configuration during run-time?

Hardware: Apalis iMX6
Software: Torizon 5.0 (October release)

Hi @vinaygb

Thanks for the information.

We are not recommending the pin mux during run time and it is not a good idea. instead, you can try device tree overlays for pin configuration. please refer to the device tree overlay on Torizon article for more information.

https://developer.toradex.com/knowledge-base/device-tree-overlays

Thanks for the reply. As far as my knowledge goes, by using device tree overlays, you can perform pin configuration that will be applied during boot up and cannot be changed afterwards. But for our application, it is required for us to change the pin configuration during run time (on-the-fly). So, kindly clarify along the following lines:
1. Can LCD lines be used as parallel data bus?
2. How to change pin configuration during run time?

Hi @vinaygb

  1. Can LCD lines be used as parallel data bus?

yes, you can configure this as EIM(External Interface Module) to connect to FPGA, DSPs, etc
What exactly you want to use?

  1. How to change pin configuration during run time?

you can use devmem2 tool but we are not recommended. This will lead to unknown behavior.

Thanks for the reply.
We are trying to use NHD-2.4-240320CF-CSXV#-F display with Apalis iMX6 board. This comes with a display driver ST7789s. We want to use “parallel RGB 565” scheme. As the only provision at the display end is parallel data bus, we have to perform the initial setup / configuration using parallel data bus available link textin apalis iMX6 and later the same lines (of apalis iMX6) need to be configured as LCD lines for RGB 565 scheme.

This is the reason why the above query was raised. Kindly help us out on the following topics:

  1. Is there any stable and recommended way to change the pin configuration during run time?
  2. Can EIM be straight-away used for sending / receiving the data on parallel lines?

If you have any other suggestions as to how integration of the above mentioned display with the toradex board, kindly inform us in the same thread.

Thank you
Check out the datasheets of the display and the driver

Hi @vinaygb

As per the discussion link, looks like you can configure to RGB without any additional configurations.