<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックProblem reading imx7ulp uboot gpio input value</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Problem-reading-imx7ulp-uboot-gpio-input-value/m-p/1493292#M192820</link>
    <description>&lt;P&gt;I want to read gpio input value from u-boot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;static iomux_cfg_t const_board_pad[] = {&lt;BR /&gt;MX7ULP_PAD_PTE6__PTE6 | MUX_PAD_CTRL(PAD_CTL_IBE_ENABLE),&lt;BR /&gt;MX7ULP_PAD_PTE7__PTE7 | MUX_PAD_CTRL(PAD_CTL_IBE_ENABLE),&lt;BR /&gt;MX7ULP_PAD_PTE10__PTE10 | MUX_PAD_CTRL(PAD_CTL_IBE_ENABLE),&lt;BR /&gt;MX7ULP_PAD_PTE11__PTE11 | MUX_PAD_CTRL(PAD_CTL_IBE_ENABLE),&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;int show_hardware_version(void);&lt;/P&gt;&lt;P&gt;#define HW0_GPIO IMX_GPIO_NR(5, 7)&lt;BR /&gt;#define HW1_GPIO IMX_GPIO_NR(5, 6)&lt;BR /&gt;#define HW2_GPIO IMX_GPIO_NR(5, 10)&lt;BR /&gt;#define HW3_GPIO IMX_GPIO_NR(5, 11)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;mx7ulp_iomux_setup_multiple_pads(const_board_pad, ARRAY_SIZE(const_board_pad));&lt;BR /&gt;if (gpio_request(HW0_GPIO, "hw0"))&lt;BR /&gt;printf("request error hw0\n");&lt;BR /&gt;if (gpio_request(HW1_GPIO, "hw1"))&lt;BR /&gt;printf("request error hw1\n");&lt;BR /&gt;if (gpio_request(HW2_GPIO, "hw2"))&lt;BR /&gt;printf("request error hw2\n");&lt;BR /&gt;if (gpio_request(HW3_GPIO, "hw3"))&lt;BR /&gt;printf("request error hw3\n");&lt;BR /&gt;&lt;BR /&gt;gpio_direction_input(HW0_GPIO);&lt;BR /&gt;gpio_direction_input(HW1_GPIO);&lt;BR /&gt;gpio_direction_input(HW2_GPIO);&lt;BR /&gt;gpio_direction_input(HW3_GPIO);&lt;BR /&gt;&lt;BR /&gt;hw_pin[0] = gpio_get_value(HW0_GPIO);&lt;BR /&gt;hw_pin[1] = gpio_get_value(HW1_GPIO);&lt;BR /&gt;hw_pin[2] = gpio_get_value(HW2_GPIO);&lt;BR /&gt;hw_pin[3] = gpio_get_value(HW3_GPIO);&lt;BR /&gt;&lt;BR /&gt;printf("####################### %d %d %d %d\n", hw_pin[0], hw_pin[1], hw_pin[2], hw_pin[3]);&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;PMC_1V8 pull up is applied to MX7ULP_PAD_PTE6__PTE 6 pin.&lt;/P&gt;&lt;P&gt;However, all gpio values ​​are displayed as 0 .&lt;BR /&gt;The scope shows 1.8v high, but the value doesn't change.&lt;/P&gt;&lt;P&gt;Conversely, after setting the output, it was confirmed that it is controlled.&lt;/P&gt;&lt;P&gt;--------------------------------------&lt;/P&gt;&lt;P&gt;md 40AC0118&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;40ac0118: 00010100&lt;/P&gt;&lt;P&gt;-------------------------------------&lt;/P&gt;&lt;P&gt;I checked the registry value in u boot and there was no problem.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But when I read the values ​​below, there is no change.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;--------------------------------------&lt;/P&gt;&lt;P&gt;md 400f0090 1&lt;/P&gt;&lt;P&gt;400f0090: 00000000&lt;/P&gt;&lt;P&gt;---------------------------------------&lt;/P&gt;&lt;P&gt;I tried to read the value in various ways, but it didn't solve the problem.&lt;/P&gt;&lt;P&gt;Can you tell me how to solve it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://clipsold.com/metric/?wid=51824&amp;amp;sid=&amp;amp;tid=8731&amp;amp;mid=&amp;amp;rid=LOADED&amp;amp;custom1=community.nxp.com&amp;amp;custom2=%2Ft5%2Fforums%2Fpostpage%2Fboard-id%2Fimx-processors&amp;amp;custom3=clipsold.com&amp;amp;t=1658401309869" border="0" /&gt;&lt;IMG src="https://clipsold.com/metric/?wid=51824&amp;amp;sid=&amp;amp;tid=8731&amp;amp;mid=&amp;amp;rid=BEFORE_OPTOUT_REQ&amp;amp;t=1658401309869" border="0" /&gt;&lt;IMG src="https://clipsold.com/metric/?wid=51824&amp;amp;sid=&amp;amp;tid=8731&amp;amp;mid=&amp;amp;rid=FINISHED&amp;amp;custom1=community.nxp.com&amp;amp;t=1658401309869" border="0" /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jul 2022 11:13:49 GMT</pubDate>
    <dc:creator>sjkim</dc:creator>
    <dc:date>2022-07-21T11:13:49Z</dc:date>
    <item>
      <title>Problem reading imx7ulp uboot gpio input value</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Problem-reading-imx7ulp-uboot-gpio-input-value/m-p/1493292#M192820</link>
      <description>&lt;P&gt;I want to read gpio input value from u-boot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;static iomux_cfg_t const_board_pad[] = {&lt;BR /&gt;MX7ULP_PAD_PTE6__PTE6 | MUX_PAD_CTRL(PAD_CTL_IBE_ENABLE),&lt;BR /&gt;MX7ULP_PAD_PTE7__PTE7 | MUX_PAD_CTRL(PAD_CTL_IBE_ENABLE),&lt;BR /&gt;MX7ULP_PAD_PTE10__PTE10 | MUX_PAD_CTRL(PAD_CTL_IBE_ENABLE),&lt;BR /&gt;MX7ULP_PAD_PTE11__PTE11 | MUX_PAD_CTRL(PAD_CTL_IBE_ENABLE),&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;int show_hardware_version(void);&lt;/P&gt;&lt;P&gt;#define HW0_GPIO IMX_GPIO_NR(5, 7)&lt;BR /&gt;#define HW1_GPIO IMX_GPIO_NR(5, 6)&lt;BR /&gt;#define HW2_GPIO IMX_GPIO_NR(5, 10)&lt;BR /&gt;#define HW3_GPIO IMX_GPIO_NR(5, 11)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;mx7ulp_iomux_setup_multiple_pads(const_board_pad, ARRAY_SIZE(const_board_pad));&lt;BR /&gt;if (gpio_request(HW0_GPIO, "hw0"))&lt;BR /&gt;printf("request error hw0\n");&lt;BR /&gt;if (gpio_request(HW1_GPIO, "hw1"))&lt;BR /&gt;printf("request error hw1\n");&lt;BR /&gt;if (gpio_request(HW2_GPIO, "hw2"))&lt;BR /&gt;printf("request error hw2\n");&lt;BR /&gt;if (gpio_request(HW3_GPIO, "hw3"))&lt;BR /&gt;printf("request error hw3\n");&lt;BR /&gt;&lt;BR /&gt;gpio_direction_input(HW0_GPIO);&lt;BR /&gt;gpio_direction_input(HW1_GPIO);&lt;BR /&gt;gpio_direction_input(HW2_GPIO);&lt;BR /&gt;gpio_direction_input(HW3_GPIO);&lt;BR /&gt;&lt;BR /&gt;hw_pin[0] = gpio_get_value(HW0_GPIO);&lt;BR /&gt;hw_pin[1] = gpio_get_value(HW1_GPIO);&lt;BR /&gt;hw_pin[2] = gpio_get_value(HW2_GPIO);&lt;BR /&gt;hw_pin[3] = gpio_get_value(HW3_GPIO);&lt;BR /&gt;&lt;BR /&gt;printf("####################### %d %d %d %d\n", hw_pin[0], hw_pin[1], hw_pin[2], hw_pin[3]);&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;PMC_1V8 pull up is applied to MX7ULP_PAD_PTE6__PTE 6 pin.&lt;/P&gt;&lt;P&gt;However, all gpio values ​​are displayed as 0 .&lt;BR /&gt;The scope shows 1.8v high, but the value doesn't change.&lt;/P&gt;&lt;P&gt;Conversely, after setting the output, it was confirmed that it is controlled.&lt;/P&gt;&lt;P&gt;--------------------------------------&lt;/P&gt;&lt;P&gt;md 40AC0118&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;40ac0118: 00010100&lt;/P&gt;&lt;P&gt;-------------------------------------&lt;/P&gt;&lt;P&gt;I checked the registry value in u boot and there was no problem.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But when I read the values ​​below, there is no change.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;--------------------------------------&lt;/P&gt;&lt;P&gt;md 400f0090 1&lt;/P&gt;&lt;P&gt;400f0090: 00000000&lt;/P&gt;&lt;P&gt;---------------------------------------&lt;/P&gt;&lt;P&gt;I tried to read the value in various ways, but it didn't solve the problem.&lt;/P&gt;&lt;P&gt;Can you tell me how to solve it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://clipsold.com/metric/?wid=51824&amp;amp;sid=&amp;amp;tid=8731&amp;amp;mid=&amp;amp;rid=LOADED&amp;amp;custom1=community.nxp.com&amp;amp;custom2=%2Ft5%2Fforums%2Fpostpage%2Fboard-id%2Fimx-processors&amp;amp;custom3=clipsold.com&amp;amp;t=1658401309869" border="0" /&gt;&lt;IMG src="https://clipsold.com/metric/?wid=51824&amp;amp;sid=&amp;amp;tid=8731&amp;amp;mid=&amp;amp;rid=BEFORE_OPTOUT_REQ&amp;amp;t=1658401309869" border="0" /&gt;&lt;IMG src="https://clipsold.com/metric/?wid=51824&amp;amp;sid=&amp;amp;tid=8731&amp;amp;mid=&amp;amp;rid=FINISHED&amp;amp;custom1=community.nxp.com&amp;amp;t=1658401309869" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 11:13:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Problem-reading-imx7ulp-uboot-gpio-input-value/m-p/1493292#M192820</guid>
      <dc:creator>sjkim</dc:creator>
      <dc:date>2022-07-21T11:13:49Z</dc:date>
    </item>
  </channel>
</rss>

