-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Arduino Uno R4 WiFi: GPIO's which are not port 1 in overlay fail to build #90827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
If you look at the resulting build/zephyr/zephyr.dts, you'll see that the D8 pin is using GPIO ioport3. If you check this node, you'll find that the port is disabled: The solution is to enable the port by adding the following lines in your overlay file:
|
@ljd42 thanks for highlighting this. That's good to know. I would have expected all ports used in the Arduino R3 pin layout to be enabled by default. Then up to the user to disable by choice in their code. |
@Gerriko : no worries, we're all here to learn 😉 I agree that this choice of disabling ioport3 is rather... surprising... This might be an oversight, or perhaps some clever thoughts that only the original author knows about. Would you mind to convert this bug to a question if possible and mark it answered? Thanks! |
Same applies for ioport0 (analog pins A0 - A3) and for ioport4 (D11 and D12). Surely this issue should remain open, until such time as it's resolved by either someone fixing or scheduling a fix for the issue via pull request, or by clarifying the reason for keeping the anomaly (I don't view this as normal expected GPIO behaviour for an Arduino dev board). |
I understand your expectations. While I agree that the behavior might not be what you are expecting, the following previous statement is no longer valid:
Looking at the DTS structure, the UNO R4 uses a Renesas System-On-Chip (SoC), namely the r7fa4m1ab3cfm. This SoC is used in other boards, where the ioport isn't necessarily configured as on the Uno R4. There's also the concept that hardware gets enabled, only when needed by the user (to save power etc). The Arduino R4 overlay board (in zephyr/boards/arduino/uno_r4/) could indeed enable the ioport it uses for the arduino headers and documents it accordingly. I think, your proposal could be a neat enhancement. |
Now that I understand the issue, I've downgraded the issue to: Functional Limitation - Some features not working as expected, but system usable. I would agree, only the Arduino Uno R4 dts file would need modifying to include the following:
|
Hi @Gerriko, Do you feel like creating your first PR? If not, I can take care of it. |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
I am using the following:
CODE: samples/basic/blinky example.
BOARD: Arduino Uno R4 WiFi
I created the following working overlay to change the default LED (led0)
If I then change the GPIO to Arduino D8. using
gpios = <&arduino_header ARDUINO_HEADER_R3_D8 GPIO_ACTIVE_HIGH>;
orgpios = <&ioport3 4 GPIO_ACTIVE_HIGH>;
I get a build error.
Upon experimentation, I discovered that only GPIO's using port1 work here.
Regression
Steps to reproduce
Save overlay in boards folder.
run: west build -p always -b arduino_uno_r4@wifi
Observe that device tree compiler happy but fails on build.
Relevant log output
Impact
Functional Limitation - Some features not working as expected, but system usable..
Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: