{"id":234261,"date":"2024-09-29T20:26:35","date_gmt":"2024-09-29T20:26:35","guid":{"rendered":"https:\/\/www.emtrion.de\/gpios-on-dimm-rz-a1h-under-linux-2\/"},"modified":"2024-10-24T07:35:39","modified_gmt":"2024-10-24T07:35:39","slug":"gpios-on-dimm-rz-a1h-under-linux-2","status":"publish","type":"page","link":"https:\/\/www.emtrion.de\/en\/gpios-on-dimm-rz-a1h-under-linux-2\/","title":{"rendered":"GPIOs on DIMM-RZ\/A1H under Linux"},"content":{"rendered":"<p>Please see the following table for the translation from baseboard pin to CPU pin:<\/p>\n<p>&nbsp;<\/p>\n<p>Under Linux you can use sysfs to access gpios.<\/p>\n<p>To get access to an GPIO pin, first, write the GPIO number to \/sys\/class\/gpio\/export<\/p>\n<pre class=\"code\">echo 83 [gt] \/sys\/class\/gpio\/export<\/pre>\n<p>Now you should find a directory in \/sys\/class\/gpio to access your GPIO pin. Write &#8216;in&#8217; or &#8216;out&#8217; to the direction to change the direction of the pin:<\/p>\n<pre class=\"code\">echo out [gt] \/sys\/class\/gpio\/GPIO0\/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=\"code\">echo 1 [gt] \/sys\/class\/gpio\/GPIO0\/value<\/pre>\n<pre class=\"code\">cat \/sys\/class\/gpio\/GPIO0\/value<\/pre>\n<p>The list of GPIO numbers can be found below.<\/p>\n<p>&nbsp;<\/p>\n<h2><a id=\"verno_3_verno_4_cadun\" name=\"verno_3_verno_4_cadun\"><\/a>Verno 3\/Verno 4\/Cadun<\/h2>\n<div class=\"level2\">\n<p>There are 10 GPIOs on J12 with a signal level of 3.3V and 14 more on J16 via an 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 class=\"leftalign\">Signal on RZ\/A1H<\/th>\n<th>Port 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\">GPIO0<\/td>\n<td class=\"leftalign\">6-3<\/td>\n<td class=\"leftalign\">83<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J12<\/td>\n<td class=\"leftalign\">6<\/td>\n<td class=\"leftalign\">GPIO_1<\/td>\n<td class=\"leftalign\">GPIO1<\/td>\n<td class=\"leftalign\">6-4<\/td>\n<td class=\"leftalign\">84<\/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\">GPIO2<\/td>\n<td class=\"leftalign\">4-0<\/td>\n<td class=\"leftalign\">54<\/td>\n<\/tr>\n<tr>\n<td class=\"leftalign\">J12<\/td>\n<td class=\"leftalign\">10<\/td>\n<td class=\"leftalign\">GPIO_3<\/td>\n<td class=\"leftalign\">GPIO3<\/td>\n<td class=\"leftalign\">4-1<\/td>\n<td class=\"leftalign\">55<\/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\">GPIO4<\/td>\n<td class=\"leftalign\">4-2<\/td>\n<td class=\"leftalign\">56<\/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\">GPIO5<\/td>\n<td class=\"leftalign\">4-3<\/td>\n<td class=\"leftalign\">57<\/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\">GPIO6<\/td>\n<td class=\"leftalign\">11-12<\/td>\n<td class=\"leftalign\">165<\/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\">GPIO7<\/td>\n<td class=\"leftalign\">11-13<\/td>\n<td class=\"leftalign\">\n<p>166<\/p>\n<\/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\">GPIO8<\/td>\n<td class=\"leftalign\">11-14<\/td>\n<td class=\"leftalign\">\n<p>167<\/p>\n<\/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\">GPIO9<\/td>\n<td class=\"leftalign\">11-15<\/td>\n<td class=\"leftalign\">\n<p>168<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Please see the following table for the translation from baseboard pin to CPU pin: &nbsp; Under Linux you can use sysfs to access gpios. To get access to an GPIO pin, first, write the GPIO number to \/sys\/class\/gpio\/export echo 83 [gt] \/sys\/class\/gpio\/export Now you should find a directory in \/sys\/class\/gpio to access your GPIO pin. [&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-234261","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-RZ\/A1H under Linux - emtrion<\/title>\n<meta name=\"description\" content=\"Learn how to access and configure GPIOs on DIMM-RZ\/A1H under Linux. A complete guide for developers to control GPIOs efficiently for embedded projects.\" \/>\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-rz-a1h-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-RZ\/A1H under Linux - emtrion\" \/>\n<meta property=\"og:description\" content=\"Learn how to access and configure GPIOs on DIMM-RZ\/A1H under Linux. A complete guide for developers to control GPIOs efficiently for embedded projects.\" \/>\n<meta property=\"og:site_name\" content=\"emtrion\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-24T07:35:39+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=\"1 minute\" \/>\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-rz-a1h-under-linux-2\\\/\",\"url\":\"https:\\\/\\\/www.emtrion.de\\\/en\\\/gpios-on-dimm-rz-a1h-under-linux-2\\\/\",\"name\":\"GPIOs on DIMM-RZ\\\/A1H under Linux - emtrion\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.emtrion.de\\\/en\\\/#website\"},\"datePublished\":\"2024-09-29T20:26:35+00:00\",\"dateModified\":\"2024-10-24T07:35:39+00:00\",\"description\":\"Learn how to access and configure GPIOs on DIMM-RZ\\\/A1H under Linux. A complete guide for developers to control GPIOs efficiently for embedded projects.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.emtrion.de\\\/en\\\/gpios-on-dimm-rz-a1h-under-linux-2\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.emtrion.de\\\/en\\\/gpios-on-dimm-rz-a1h-under-linux-2\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.emtrion.de\\\/en\\\/gpios-on-dimm-rz-a1h-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-RZ\\\/A1H 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-RZ\/A1H under Linux - emtrion","description":"Learn how to access and configure GPIOs on DIMM-RZ\/A1H under Linux. A complete guide for developers to control GPIOs efficiently for embedded projects.","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-rz-a1h-under-linux-2\/","og_locale":"en_US","og_type":"article","og_title":"GPIOs on DIMM-RZ\/A1H under Linux - emtrion","og_description":"Learn how to access and configure GPIOs on DIMM-RZ\/A1H under Linux. A complete guide for developers to control GPIOs efficiently for embedded projects.","og_site_name":"emtrion","article_modified_time":"2024-10-24T07:35:39+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.emtrion.de\/en\/gpios-on-dimm-rz-a1h-under-linux-2\/","url":"https:\/\/www.emtrion.de\/en\/gpios-on-dimm-rz-a1h-under-linux-2\/","name":"GPIOs on DIMM-RZ\/A1H under Linux - emtrion","isPartOf":{"@id":"https:\/\/www.emtrion.de\/en\/#website"},"datePublished":"2024-09-29T20:26:35+00:00","dateModified":"2024-10-24T07:35:39+00:00","description":"Learn how to access and configure GPIOs on DIMM-RZ\/A1H under Linux. A complete guide for developers to control GPIOs efficiently for embedded projects.","breadcrumb":{"@id":"https:\/\/www.emtrion.de\/en\/gpios-on-dimm-rz-a1h-under-linux-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.emtrion.de\/en\/gpios-on-dimm-rz-a1h-under-linux-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.emtrion.de\/en\/gpios-on-dimm-rz-a1h-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-RZ\/A1H 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\/234261","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=234261"}],"version-history":[{"count":1,"href":"https:\/\/www.emtrion.de\/en\/wp-json\/wp\/v2\/pages\/234261\/revisions"}],"predecessor-version":[{"id":234262,"href":"https:\/\/www.emtrion.de\/en\/wp-json\/wp\/v2\/pages\/234261\/revisions\/234262"}],"wp:attachment":[{"href":"https:\/\/www.emtrion.de\/en\/wp-json\/wp\/v2\/media?parent=234261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}