-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Adding support to the button subsystem #16153
Conversation
[Experimental Bot, please feedback here] No, this PR does not fully meet the NuttX requirements. Here's why and how to fix it: Missing or Inadequate Information:
Unresolved Issues: The testing section highlights significant unresolved problems. A PR should generally fix bugs, not introduce new ones. Before submitting, you must address the issues with 8 buttons and the built-in button. If you cannot resolve these issues, create separate issues on GitHub and reference them in the PR. Recommendations:
By addressing these points, you'll significantly improve the quality of your PR and increase the likelihood of it being accepted. |
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove extra empty lines
* BTN1 --> BTN_BLUE --> PG9 (D0) | ||
* BTN2 --> BTN_RED --> PG14 (D1) | ||
* BTN3 --> BTN_YELLOW --> PF15 (D2) | ||
* BTN4 --> BTN_GREEN --> PE13 (D3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use TAB for formatting text, use Space
* is connected to GPIO PI11. | ||
* A high value will be sensed when the button is depressed. | ||
* | ||
* For the external application the following configuration will be used: | ||
* | ||
* ====== ext button SOLUTION ======= | ||
* ====== external buttons ======= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use TAB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this change fits upstream. By default the board supports only one button and this one button should be supported by upstream configuration.
With your change one-board button is not even supported.
If you wish to support additional buttons for this board, then they should be in addition to the on-board button (not replace it) and probably controlled via Kconfig options.
nucleo-f767zi.zip
Note: Please adhere to Contributing Guidelines.
Summary
This is the pull request for the changes I've done for the stm32 nucleo-f767zi board, fixing the issues to use the buttons.
More information can be found at this ticket: #16097
The 'core' fix was include the /dev/buttons at stm32_bringup.c file but it was not the only change. I have also added here the same logic used on stm32f103c8t6 (blue pill).
This change was needed otherwise the buttons subsystems won't run at all.
Impact
Basically I've removed the internal board button by for GPIOs to be used by the user (for sure it is the main impact). At least now we can run the button subsystem.
Testing
I have test if for 1 week and although I've test it, and worked very well with 4 external push-buttons, there is 2 situation it is still not working.
A – When I added 8 buttons, only 5 worked. It is NOT a hardware problem since I tested all the buttons with an oscilloscope. It’s also not an issue with the GPIOs I chose, because when I mix the GPIOs but use only 4 buttons, everything works as expected. However, when I use 8 buttons, the GPIOs that were previously working stop working completely (again, I can see the pulses on the oscilloscope, but there’s no feedback on nsh).
B – Probably related to issue A.
When I add the built-in button along with the 4 external buttons, the built-in button stops working. But when I use only the built-in button, it works fine.