Skip to content

ARM split - Add uart half duplex transport support#7987

Merged
zvecr merged 5 commits intoqmk:masterfrom
zvecr:feature/arm_split_uart_half
May 21, 2020
Merged

ARM split - Add uart half duplex transport support#7987
zvecr merged 5 commits intoqmk:masterfrom
zvecr:feature/arm_split_uart_half

Conversation

@zvecr
Copy link
Member

@zvecr zvecr commented Jan 23, 2020

Current Issue

Transport does not exist

TL;DR

This PR adds a hardware backed transport mechanism which might work on I2C based boards.

Description

Provides a method of transport that does not require a patch or upgrade to ChibiOS. Hardware backed, this avoids some of the locking conflicts from within #7072. The downside is that it requires pullups on the TX line, and using pins which share I2C/USART, rather than the bitbang serial which can run on whatever. A good proportion of pro micro splits can run I2C, so this is potentially already covered for CTPC.

Scan rate goes over 2k with higher speed options so more than enough to keep up with current AVR boards.

TODO

Testing Notes

Chip Status Notes
f072 ? compiles but not enough hardware to test
f103 ✔️ with AFIO->MAPR |= AFIO_MAPR_USART1_REMAP
f303 ✔️
f401/f411 ✔️

Types of Changes

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

Checklist

  • My code follows the code style of this project.
  • 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).

@zvecr zvecr added the core label Jan 23, 2020
@zvecr zvecr requested a review from a team January 23, 2020 15:20
@zvecr zvecr force-pushed the feature/arm_split_uart_half branch from e5cdfc2 to 1c43421 Compare January 24, 2020 13:55
@zvecr zvecr mentioned this pull request Jan 24, 2020
13 tasks
@drashna
Copy link
Member

drashna commented Jan 25, 2020

Looks good, though, the default keymaps for the levinson is compiling too large.

@zvecr
Copy link
Member Author

zvecr commented Jan 25, 2020

Going to rip those extra files out once I rebase for #7995. This PR should have no impact on existing board, unless you basically add those changes back locally, but while im fixing things up I thought i would leave them there.

@zvecr zvecr force-pushed the feature/arm_split_uart_half branch from 7e90818 to 2fd7b9c Compare January 27, 2020 22:48
@zvecr zvecr marked this pull request as ready for review February 2, 2020 03:31
drashna
drashna previously approved these changes Feb 2, 2020
@drashna drashna requested a review from a team February 2, 2020 19:52
zvecr added a commit that referenced this pull request Feb 4, 2020
ARM split - Add uart half duplex transport support
@tzarc tzarc requested a review from a team February 21, 2020 09:05
@tzarc
Copy link
Member

tzarc commented Feb 21, 2020

I guess half of the requested changes should probably be split out into a differently-focused PR, specifically that works for both the AVR and ARM implementations. Split transport uses the SSTD_t stuff, so probably best left out of scope for this PR. Will go cancel the requested changes accordingly.

@zvecr zvecr force-pushed the feature/arm_split_uart_half branch from 833d03b to 03c36fb Compare February 21, 2020 21:38
tzarc
tzarc previously approved these changes Feb 24, 2020
@tzarc tzarc requested a review from a team February 24, 2020 01:39
@zvecr zvecr force-pushed the feature/arm_split_uart_half branch 2 times, most recently from 2edfc8c to 979a48d Compare February 24, 2020 02:29
@zvecr zvecr dismissed stale reviews from tzarc and drashna via 2fb9bae February 28, 2020 23:14
@zvecr zvecr force-pushed the feature/arm_split_uart_half branch from 979a48d to 2fb9bae Compare February 28, 2020 23:14
@zvecr zvecr changed the base branch from master to future February 28, 2020 23:14
@zvecr zvecr changed the base branch from future to master March 1, 2020 03:01
@zvecr zvecr force-pushed the feature/arm_split_uart_half branch 3 times, most recently from d288937 to ee33ac1 Compare March 7, 2020 02:56
@zvecr zvecr force-pushed the feature/arm_split_uart_half branch from cc1e7a7 to 8e90f4c Compare April 7, 2020 03:03

Configure the hardware via your config.h:
```c
#define SOFT_SERIAL_PIN B6 // USART TX pin
Copy link
Member

@drashna drashna Apr 28, 2020

Choose a reason for hiding this comment

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

Does this default to B6? If you're using CTPC, this may not be B6.

Edit: This doesn't appear to be set to a default. But it may be worth mentioning if CPTC is enabled, then you want to use the AVR pin name.

Copy link
Member Author

Choose a reason for hiding this comment

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

No default, it was just an example based on D0 above, but pins change depending on which stm chip you target so couldnt list them all.

@drashna drashna requested a review from a team May 18, 2020 09:59
Co-authored-by: Nick Brassel <nick@tzarc.org>
@zvecr zvecr merged commit 6515098 into qmk:master May 21, 2020
@zvecr zvecr mentioned this pull request May 21, 2020
13 tasks
@zvecr zvecr deleted the feature/arm_split_uart_half branch May 21, 2020 20:18
drashna pushed a commit to zsa/qmk_firmware that referenced this pull request May 24, 2020
* ARM split - Add uart half duplex transport support

* Fix for f103

* initial full duplex pass

* partially remove full duplex

* Correct speeds within driver docs

Co-authored-by: Nick Brassel <nick@tzarc.org>

Co-authored-by: Nick Brassel <nick@tzarc.org>

format code according to conventions [skip ci]
sowbug pushed a commit to sowbug/qmk_firmware that referenced this pull request May 24, 2020
* ARM split - Add uart half duplex transport support

* Fix for f103

* initial full duplex pass

* partially remove full duplex

* Correct speeds within driver docs

Co-authored-by: Nick Brassel <nick@tzarc.org>

Co-authored-by: Nick Brassel <nick@tzarc.org>
fdidron pushed a commit to zsa/qmk_firmware that referenced this pull request Jun 12, 2020
* ARM split - Add uart half duplex transport support

* Fix for f103

* initial full duplex pass

* partially remove full duplex

* Correct speeds within driver docs

Co-authored-by: Nick Brassel <nick@tzarc.org>

Co-authored-by: Nick Brassel <nick@tzarc.org>

format code according to conventions [skip ci]
turky pushed a commit to turky/qmk_firmware that referenced this pull request Jun 13, 2020
* ARM split - Add uart half duplex transport support

* Fix for f103

* initial full duplex pass

* partially remove full duplex

* Correct speeds within driver docs

Co-authored-by: Nick Brassel <nick@tzarc.org>

Co-authored-by: Nick Brassel <nick@tzarc.org>
jakobaa pushed a commit to jakobaa/qmk_firmware that referenced this pull request Jul 7, 2020
* ARM split - Add uart half duplex transport support

* Fix for f103

* initial full duplex pass

* partially remove full duplex

* Correct speeds within driver docs

Co-authored-by: Nick Brassel <nick@tzarc.org>

Co-authored-by: Nick Brassel <nick@tzarc.org>
sjmacneil pushed a commit to sjmacneil/qmk_firmware that referenced this pull request Feb 19, 2021
* ARM split - Add uart half duplex transport support

* Fix for f103

* initial full duplex pass

* partially remove full duplex

* Correct speeds within driver docs

Co-authored-by: Nick Brassel <nick@tzarc.org>

Co-authored-by: Nick Brassel <nick@tzarc.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants