Hi guys, I understand that most GPIOs of both processors are connected between them and setting a connected GPIO on both processors to "out" can damage the board. But what is the default state of the GPIOs? Is it configured to "IN" by default on both processors? For example: Is it safe to set pin GPIO 123 on Freescale (pin 22) to OUT and change it values, without checking the state of Atmel? (Explicitly making an Arduino sketch that defines PIN 2 to IN) Thanks Meir Tseitlin
Well lets see, for the imx6 side the GPIO are configured to "IN" by default while for the SAM there isn't a default configuration for the GPIO but the processor puts them in High impedance (which means "IN") when there's no sketch uploaded.
Regarding Freescale - you are probably right. Regarding SAM - this is not what I am experiencing (and it is actually pretty weird): On all GPIOs I measure 3.3v by default (even if I explicitly set them as INPUT). Only if I set them to OUTPUT and LOW, I can measure 0v. According to my knowledge - GPIO set to INPUT should behave as "Disconnected". Can you explain it? -- Meir Tseitlin
I'm having the exact same issue, I've been looking for hours now, have you found an answer yet, someone please respond to this matter thank you in advance
Hi, I have posted a nearly similar discussion here: how-setup-gpio-state-sam3x-when-kernel-not-booted-t1851.html I wanted to have the subject different.
I found at least one exception to all SAM3X pins coming up as input/high-impedance state by default, which instead gets forced hard-high (not just pulled up). This is "CANTX" over in the corner near the DACs and analog-ins, also known as "D69" when used as a plain Arduino GPIO, and gpio8 on the i.MX6 side. Maybe the standard Arduino library enables CAN bus I/O by default? This only happens when the SAM3X chip is actually running-- if it's held in reset (via echo 0 >/sys/class/gpio/gpio0/value, or shorting jumper J16) then CANTX/D69 remains high-impedance, while overall Udoo power consumption also drops by about 0.44W -- something to keep in mind if you don't need the SAM3X. Fortunately, it's easy to override this with a simple pinMode statement in the sketch setup() section. I explicitly set D68 (CANRX) as an input as well, just in case there's any weirdness with that one: Code: pinMode(68, INPUT); pinMode(69, INPUT);