{"id":234221,"date":"2024-09-29T20:26:35","date_gmt":"2024-09-29T20:26:35","guid":{"rendered":"https:\/\/www.emtrion.de\/gpios-on-dimm-am335-under-linux-2\/"},"modified":"2024-10-24T07:35:38","modified_gmt":"2024-10-24T07:35:38","slug":"gpios-on-dimm-am335-under-linux-2","status":"publish","type":"page","link":"https:\/\/www.emtrion.de\/en\/gpios-on-dimm-am335-under-linux-2\/","title":{"rendered":"GPIOs on DIMM-AM335 under Linux"},"content":{"rendered":"<h2><a id=\"enabeling_gpio_control\" name=\"enabeling_gpio_control\"><\/a>Enabling GPIO control<\/h2>\n<div class=\"level2\">\n<p>To get access to an GPIO pin, first, write the GPIO number to \/sys\/class\/gpio\/export<\/p>\n<pre class=\"uboot\">echo 7 [gt] \/sys\/class\/gpio\/export<\/pre>\n<p>Now you should find a directory in \/sys\/class\/gpio to access your GPIO pin. Write in or out to direction to change the direction of the pin:<\/p>\n<pre class=\"uboot\">echo out [gt] \/sys\/class\/gpio\/gpio7\/direction<\/pre>\n<p>The value (0 for off, 1 for on) of the pin is in the value file. To read or change it, read the file or write to it.<\/p>\n<pre class=\"uboot\">echo 1 [gt] \/sys\/class\/gpio\/gpio7\/value<\/pre>\n<pre class=\"uboot\">cat \/sys\/class\/gpio\/gpio7\/value<\/pre>\n<p>The list of GPIO numbers can be found below.<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<h2><a id=\"cpu_module\" name=\"cpu_module\"><\/a>CPU Module<\/h2>\n<div class=\"level2\">\n<p>&nbsp;<\/p>\n<p>The two color led can be controlled by two GPIO pins.<\/p>\n<p>&nbsp;<\/p>\n<table class=\"inline\">\n<tbody>\n<tr>\n<th>Color<\/th>\n<th>Bank and pin<\/th>\n<th>GPIO Number<\/th>\n<th class=\"leftalign\">Notes<\/th>\n<\/tr>\n<tr>\n<td>Green<\/td>\n<td class=\"leftalign\">2-4<\/td>\n<td class=\"leftalign\">68<\/td>\n<td>output is inverted, 0 is on<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">Red<\/td>\n<td class=\"leftalign\">2-5<\/td>\n<td class=\"leftalign\">69<\/td>\n<td class=\"rightalign\">&nbsp;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2>&nbsp;<\/h2>\n<h2><a id=\"verno_3_4\" name=\"verno_3_4\"><\/a>Verno 3\/4\/Cadun<\/h2>\n<div class=\"level2\">\n<p>&nbsp;<\/p>\n<p>There are 8 GPIOs on J12 with a signal level of 3.3V and 14 more on J16 using the GPIO expander.<\/p>\n<p>&nbsp;<\/p>\n<table class=\"inline\">\n<tbody>\n<tr>\n<th>Connector<\/th>\n<th>Pin<\/th>\n<th class=\"leftalign\">Signal<\/th>\n<th>Bank and pin<\/th>\n<th>GPIO Number<\/th>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J12<\/td>\n<td class=\"leftalign\">4<\/td>\n<td class=\"leftalign\">GPIO_0<\/td>\n<td class=\"leftalign\">0-7<\/td>\n<td class=\"leftalign\">7<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J12<\/td>\n<td class=\"leftalign\">8<\/td>\n<td class=\"leftalign\">GPIO_2<\/td>\n<td class=\"leftalign\">1-21<\/td>\n<td class=\"leftalign\">53<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J12<\/td>\n<td class=\"leftalign\">12<\/td>\n<td class=\"leftalign\">GPIO_4<\/td>\n<td class=\"leftalign\">2-19<\/td>\n<td class=\"leftalign\">83<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J12<\/td>\n<td class=\"leftalign\">14<\/td>\n<td class=\"leftalign\">GPIO_5<\/td>\n<td class=\"leftalign\">3-9<\/td>\n<td class=\"leftalign\">105<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J12<\/td>\n<td class=\"leftalign\">16<\/td>\n<td class=\"leftalign\">GPIO_6<\/td>\n<td class=\"leftalign\">2-18<\/td>\n<td class=\"leftalign\">82<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J12<\/td>\n<td class=\"leftalign\">18<\/td>\n<td class=\"leftalign\">GPIO_7<\/td>\n<td class=\"leftalign\">3-10<\/td>\n<td class=\"leftalign\">106<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J12<\/td>\n<td class=\"leftalign\">20<\/td>\n<td class=\"leftalign\">GPIO_8<\/td>\n<td class=\"leftalign\">0-13<\/td>\n<td class=\"leftalign\">13<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J12<\/td>\n<td class=\"leftalign\">22<\/td>\n<td class=\"leftalign\">GPIO_9<\/td>\n<td class=\"leftalign\">0-12<\/td>\n<td class=\"leftalign\">12<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J16<\/td>\n<td class=\"leftalign\">3<\/td>\n<td class=\"leftalign\">GPIO_I2C_0<\/td>\n<td class=\"rightalign\">&nbsp;<\/td>\n<td class=\"leftalign\">128<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J16<\/td>\n<td class=\"leftalign\">4<\/td>\n<td class=\"leftalign\">GPIO_I2C_8<\/td>\n<td class=\"rightalign\">&nbsp;<\/td>\n<td class=\"leftalign\">136<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J16<\/td>\n<td class=\"leftalign\">5<\/td>\n<td class=\"leftalign\">GPIO_I2C_1<\/td>\n<td class=\"rightalign\">&nbsp;<\/td>\n<td class=\"leftalign\">129<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J16<\/td>\n<td class=\"leftalign\">6<\/td>\n<td class=\"leftalign\">GPIO_I2C_9<\/td>\n<td class=\"rightalign\">&nbsp;<\/td>\n<td class=\"leftalign\">137<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J16<\/td>\n<td class=\"leftalign\">7<\/td>\n<td class=\"leftalign\">GPIO_I2C_2<\/td>\n<td class=\"rightalign\">&nbsp;<\/td>\n<td class=\"leftalign\">130<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J16<\/td>\n<td class=\"leftalign\">8<\/td>\n<td>GPIO_I2C_10<\/td>\n<td class=\"rightalign\">&nbsp;<\/td>\n<td class=\"leftalign\">138<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J16<\/td>\n<td class=\"leftalign\">9<\/td>\n<td class=\"leftalign\">GPIO_I2C_3<\/td>\n<td class=\"rightalign\">&nbsp;<\/td>\n<td class=\"leftalign\">131<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J16<\/td>\n<td class=\"leftalign\">10<\/td>\n<td>GPIO_I2C_11<\/td>\n<td class=\"rightalign\">&nbsp;<\/td>\n<td class=\"leftalign\">139<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J16<\/td>\n<td class=\"leftalign\">11<\/td>\n<td class=\"leftalign\">GPIO_I2C_4<\/td>\n<td class=\"rightalign\">&nbsp;<\/td>\n<td class=\"leftalign\">132<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J16<\/td>\n<td class=\"leftalign\">12<\/td>\n<td>GPIO_I2C_12<\/td>\n<td class=\"rightalign\">&nbsp;<\/td>\n<td class=\"leftalign\">140<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J16<\/td>\n<td class=\"leftalign\">13<\/td>\n<td class=\"leftalign\">GPIO_I2C_5<\/td>\n<td class=\"rightalign\">&nbsp;<\/td>\n<td class=\"leftalign\">133<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J16<\/td>\n<td class=\"leftalign\">14<\/td>\n<td>GPIO_I2C_13<\/td>\n<td class=\"rightalign\">&nbsp;<\/td>\n<td class=\"leftalign\">141<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J16<\/td>\n<td class=\"leftalign\">15<\/td>\n<td class=\"leftalign\">GPIO_I2C_6<\/td>\n<td class=\"rightalign\">&nbsp;<\/td>\n<td class=\"leftalign\">134<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J16<\/td>\n<td class=\"leftalign\">17<\/td>\n<td class=\"leftalign\">GPIO_I2C_7<\/td>\n<td class=\"rightalign\">&nbsp;<\/td>\n<td class=\"leftalign\">135<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2>&nbsp;<\/h2>\n<h2><a id=\"lothron_3\" name=\"lothron_3\"><\/a>Lothron 3<\/h2>\n<p>&nbsp;<\/p>\n<p>The Lothron 3 has 8 accessible GPIO pins on J25.<\/p>\n<p>&nbsp;<\/p>\n<table class=\"inline\">\n<tbody>\n<tr>\n<th>Connector<\/th>\n<th>Pin<\/th>\n<th class=\"leftalign\">Signal<\/th>\n<th>Bank and pin<\/th>\n<th>GPIO Number<\/th>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J25<\/td>\n<td class=\"leftalign\">11<\/td>\n<td class=\"leftalign\">GPIO_0<\/td>\n<td class=\"leftalign\">0-7<\/td>\n<td class=\"leftalign\">7<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J25<\/td>\n<td class=\"leftalign\">13<\/td>\n<td class=\"leftalign\">GPIO_2<\/td>\n<td class=\"leftalign\">1-21<\/td>\n<td class=\"leftalign\">53<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J25<\/td>\n<td class=\"leftalign\">15<\/td>\n<td class=\"leftalign\">GPIO_4<\/td>\n<td class=\"leftalign\">2-19<\/td>\n<td class=\"leftalign\">83<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J25<\/td>\n<td class=\"leftalign\">16<\/td>\n<td class=\"leftalign\">GPIO_5<\/td>\n<td class=\"leftalign\">3-9<\/td>\n<td class=\"leftalign\">105<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J25<\/td>\n<td class=\"leftalign\">17<\/td>\n<td class=\"leftalign\">GPIO_6<\/td>\n<td class=\"leftalign\">2-18<\/td>\n<td class=\"leftalign\">82<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J25<\/td>\n<td class=\"leftalign\">18<\/td>\n<td class=\"leftalign\">GPIO_7<\/td>\n<td class=\"leftalign\">3-10<\/td>\n<td class=\"leftalign\">106<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J25<\/td>\n<td class=\"leftalign\">19<\/td>\n<td class=\"leftalign\">GPIO_8<\/td>\n<td class=\"leftalign\">0-13<\/td>\n<td class=\"leftalign\">13<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J25<\/td>\n<td class=\"leftalign\">20<\/td>\n<td class=\"leftalign\">GPIO_9<\/td>\n<td class=\"leftalign\">0-12<\/td>\n<td class=\"leftalign\">12<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>Enabling GPIO control To get access to an GPIO pin, first, write the GPIO number to \/sys\/class\/gpio\/export echo 7 [gt] \/sys\/class\/gpio\/export Now you should find a directory in \/sys\/class\/gpio to access your GPIO pin. Write in or out to direction to change the direction of the pin: echo out [gt] \/sys\/class\/gpio\/gpio7\/direction The value (0 for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"class_list":["post-234221","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>GPIOs on DIMM-AM335 under Linux - emtrion<\/title>\n<meta name=\"description\" content=\"Learn how to enable and control GPIOs on DIMM-AM335 under Linux with step-by-step instructions and detailed GPIO pin mappings for various modules.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.emtrion.de\/en\/gpios-on-dimm-am335-under-linux-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"GPIOs on DIMM-AM335 under Linux - emtrion\" \/>\n<meta property=\"og:description\" content=\"Learn how to enable and control GPIOs on DIMM-AM335 under Linux with step-by-step instructions and detailed GPIO pin mappings for various modules.\" \/>\n<meta property=\"og:site_name\" content=\"emtrion\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-24T07:35:38+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.emtrion.de\\\/en\\\/gpios-on-dimm-am335-under-linux-2\\\/\",\"url\":\"https:\\\/\\\/www.emtrion.de\\\/en\\\/gpios-on-dimm-am335-under-linux-2\\\/\",\"name\":\"GPIOs on DIMM-AM335 under Linux - emtrion\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.emtrion.de\\\/en\\\/#website\"},\"datePublished\":\"2024-09-29T20:26:35+00:00\",\"dateModified\":\"2024-10-24T07:35:38+00:00\",\"description\":\"Learn how to enable and control GPIOs on DIMM-AM335 under Linux with step-by-step instructions and detailed GPIO pin mappings for various modules.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.emtrion.de\\\/en\\\/gpios-on-dimm-am335-under-linux-2\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.emtrion.de\\\/en\\\/gpios-on-dimm-am335-under-linux-2\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.emtrion.de\\\/en\\\/gpios-on-dimm-am335-under-linux-2\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.emtrion.de\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"GPIOs on DIMM-AM335 under Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.emtrion.de\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/www.emtrion.de\\\/en\\\/\",\"name\":\"emtrion\",\"description\":\"Embedded Software and Hardware Development\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.emtrion.de\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"GPIOs on DIMM-AM335 under Linux - emtrion","description":"Learn how to enable and control GPIOs on DIMM-AM335 under Linux with step-by-step instructions and detailed GPIO pin mappings for various modules.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.emtrion.de\/en\/gpios-on-dimm-am335-under-linux-2\/","og_locale":"en_US","og_type":"article","og_title":"GPIOs on DIMM-AM335 under Linux - emtrion","og_description":"Learn how to enable and control GPIOs on DIMM-AM335 under Linux with step-by-step instructions and detailed GPIO pin mappings for various modules.","og_site_name":"emtrion","article_modified_time":"2024-10-24T07:35:38+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.emtrion.de\/en\/gpios-on-dimm-am335-under-linux-2\/","url":"https:\/\/www.emtrion.de\/en\/gpios-on-dimm-am335-under-linux-2\/","name":"GPIOs on DIMM-AM335 under Linux - emtrion","isPartOf":{"@id":"https:\/\/www.emtrion.de\/en\/#website"},"datePublished":"2024-09-29T20:26:35+00:00","dateModified":"2024-10-24T07:35:38+00:00","description":"Learn how to enable and control GPIOs on DIMM-AM335 under Linux with step-by-step instructions and detailed GPIO pin mappings for various modules.","breadcrumb":{"@id":"https:\/\/www.emtrion.de\/en\/gpios-on-dimm-am335-under-linux-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.emtrion.de\/en\/gpios-on-dimm-am335-under-linux-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.emtrion.de\/en\/gpios-on-dimm-am335-under-linux-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.emtrion.de\/en\/"},{"@type":"ListItem","position":2,"name":"GPIOs on DIMM-AM335 under Linux"}]},{"@type":"WebSite","@id":"https:\/\/www.emtrion.de\/en\/#website","url":"https:\/\/www.emtrion.de\/en\/","name":"emtrion","description":"Embedded Software and Hardware Development","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.emtrion.de\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.emtrion.de\/en\/wp-json\/wp\/v2\/pages\/234221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.emtrion.de\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.emtrion.de\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.emtrion.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.emtrion.de\/en\/wp-json\/wp\/v2\/comments?post=234221"}],"version-history":[{"count":1,"href":"https:\/\/www.emtrion.de\/en\/wp-json\/wp\/v2\/pages\/234221\/revisions"}],"predecessor-version":[{"id":234222,"href":"https:\/\/www.emtrion.de\/en\/wp-json\/wp\/v2\/pages\/234221\/revisions\/234222"}],"wp:attachment":[{"href":"https:\/\/www.emtrion.de\/en\/wp-json\/wp\/v2\/media?parent=234221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}