Hello Community,
I want to configure the Pad GPIO1_IO02 to use alternate mode 5. Furthermore, I don't want to use the default settings of the pad as shown in table "Table 4-1. Pin Assignments" of the document IMX6SXRM.pdf.
default settings
HYS - DISABLED
PUS -
PUS_100KOHM_PD
PUE - KEEP
PKE - ENABLED
ODE - DISABLED
SPEED - 100MHZ
DSE - 43_OHM
SRE - SLOV
settings I want to use
HYS - ENABLED
PUS - 47K Ohm Pull Up
PUS_100KOHM_PD
PUE - KEEP
PKE - ENABLED
ODE - DISABLED
SPEED - 150MHz @ 3.3V
DSE - 43_OHM
SRE - SLOV
imx6sx
freertos
uboot
Hi Paul Quiring,
For FreeRTOS BSP v1.0.1:
You can use the predefined macros to change values of register IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO02 according to your required settings.
eg. for PUS
IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO02_PUS(1) (to set 47K Ohm Pull Up)
You can refer section 35.5.213 from IMX6SXRM.pdf to change values according to your requirement.
Regards,
Radhika Somaiya.
In Yocto BSP, the IOMUX setting is in the device tree file.
For example:
pinctrl_hog: hoggrp {
fsl,pins = <
MX6SX_PAD_SD1_DATA0__GPIO6_IO_2 0x17059
MX6SX_PAD_SD1_DATA3__GPIO6_IO_5 0xb000
MX6SX_PAD_CSI_DATA03__GPIO1_IO_17 0x17059
>;
};
e.g. MX6SX_PAD_SD1_DATA0__GPIO6_IO_2 0x17059
The MUX Mode setting of this is set the PAD "SD1_DATA0" as GPIO6_IO02. All the MUX mode are well defined in the imx6sx-pinfunc.h.
So, for your case, you can use "MX6SX_PAD_GPIO1_IO02__GPIO1_IO_2" in your device tree file.
In this example, the PAD control setting is 0x17059. For the meaning of this, please refer to the Pad Control Register in RM.