Skip to content
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

Added SPI_SCK_PAL_CURRENT_LEVEL configuration #15389

Closed
wants to merge 4 commits into from

Conversation

itarze
Copy link
Contributor

@itarze itarze commented Dec 3, 2021

Description

Depends on ChibiOS/ChibiOS-Contrib#309 and subsequent update of the submodule.

The SCK pin of WB32F371XX MCU needs to increase the driving current when using SPI, so add this code.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@github-actions github-actions bot added the core label Dec 3, 2021
@tzarc tzarc changed the base branch from master to develop December 3, 2021 08:37
@tzarc
Copy link
Member

tzarc commented Dec 3, 2021

Retargeted to develop due to core changes.

@tzarc tzarc requested a review from a team December 3, 2021 08:37
Copy link
Member

@fauxpark fauxpark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LEVEL, not LEVE?

@itarze
Copy link
Contributor Author

itarze commented Dec 3, 2021

LEVEL, not LEVE?
I'll fix it right away.

@itarze itarze requested a review from fauxpark December 3, 2021 09:32
Copy link
Member

@zvecr zvecr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not 100% sure why this would need to be configurable

@@ -63,6 +63,14 @@
# endif
#endif

#ifndef SPI_SCK_PAL_CURRENT_LEVEL
# if defined(WB32F3G71xx)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole point of platforms/chibios/chibios_config.h is so this doesnt happen

Copy link
Member

@zvecr zvecr Apr 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still needs resolving, and should be implemented per the existing examples within chibios_config.h.

platforms/chibios/chibios_config.h Outdated Show resolved Hide resolved
@zvecr zvecr added the awaiting_pr Relies on another PR to be merged first label Dec 3, 2021
@zvecr zvecr changed the title Added SPI_SCK_PAL_CURRENT_LEVE configuration Added SPI_SCK_PAL_CURRENT_LEVEL configuration Dec 3, 2021
@github-actions github-actions bot added keyboard keymap via Adds via keymap and/or updates keyboard for via support labels Dec 6, 2021
@github-actions github-actions bot removed keyboard via Adds via keymap and/or updates keyboard for via support keymap labels Dec 6, 2021
@itarze
Copy link
Contributor Author

itarze commented Dec 22, 2021

ChibiOS/ChibiOS-Contrib#309 has been merged.

@itarze itarze requested a review from zvecr December 29, 2021 01:05
@itarze
Copy link
Contributor Author

itarze commented Feb 14, 2022

Should there be some progress in this PR?

@zvecr
Copy link
Member

zvecr commented Feb 14, 2022

Should there be some progress in this PR?

We are not updating chibios or chibios-contrib this cycle, so no, its still on hold.

@drashna
Copy link
Member

drashna commented Feb 26, 2022

I believe this is mostly waiting on #16251 now. That and for a matching update for chibios-contrib.

@itarze
Copy link
Contributor Author

itarze commented Mar 14, 2022

Could this PR be merged as soon as possible? I have a keyboard and need it. I see that Chibios-contrib has been updated.

@drashna drashna requested a review from a team March 23, 2022 05:12
@drashna drashna removed the awaiting_pr Relies on another PR to be merged first label Mar 23, 2022
@drashna
Copy link
Member

drashna commented Mar 23, 2022

Even if it's merged today, it will be merged to develop, and won't hit master until the next breaking changes cycle (end of may, I believe).

That said:

Not 100% sure why this would need to be configurable

is there a specific reason for needing this?

@itarze
Copy link
Contributor Author

itarze commented Mar 23, 2022

This is because the default IO configuration is the lowest driving capacity. If the resistance used in the circuit design of some SPI devices is too large, the driving capacity will be insufficient and normal communication will not be possible.

@itarze
Copy link
Contributor Author

itarze commented Mar 23, 2022

With the merger now in place, customers will be able to develop keyboards based on the Develop branch and merge into the Master branch in May.

@itarze
Copy link
Contributor Author

itarze commented Apr 20, 2022

I think this PR needs some progress, it has been 5 months. These additions do not affect the overall architecture of the application.

@zvecr
Copy link
Member

zvecr commented Apr 22, 2022

These additions do not affect the overall architecture of the application.

I would argue they do, given its an additional abstraction that is now in place. An abstraction that personally I don't think is correct for the direction of QMK.

If this needs to be configurable is still potentially in question, given the USB config in contrib hard codes the value https://github.com/ChibiOS/ChibiOS-Contrib/blob/chibios-21.11.x/os/hal/ports/WB32/WB32F3G71xx/hal_lld.c#L345. spi_init is also weak so there is scope for this to just live at the keyboard level till there are more boards using this chipset.

As for timeframes, I would say resolving comments and not actually changing anything for them is what is partially slowing this down overall.

@itarze
Copy link
Contributor Author

itarze commented Apr 22, 2022

@zvecr Please help me review whether the current handling is feasible. Thank you.

@github-actions
Copy link

Thank you for your contribution!
This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready.
For maintainers: Please label with bug, awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

@github-actions github-actions bot added the stale Issues or pull requests that have become inactive without resolution. label Jul 13, 2022
@tzarc tzarc added awaiting review and removed stale Issues or pull requests that have become inactive without resolution. labels Jul 13, 2022
@tzarc
Copy link
Member

tzarc commented Jul 13, 2022

@wb-Joy can you try the alternate solution #17650 please?

@itarze itarze closed this Jul 13, 2022
@itarze itarze deleted the wb_master branch July 13, 2022 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants