8000 ports/stm32/rfcore.c: STM32WB BLE improvements by jimmo · Pull Request #6393 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content

ports/stm32/rfcore.c: STM32WB BLE improvements #6393

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

Closed
wants to merge 9 commits into from

Conversation

jimmo
Copy link
Member
@jimmo jimmo commented Sep 1, 2020
  • Update to support newer WS versions (tested with WS=1.8). This fixes concurrent use of USB and BLE.
  • Fix HCI parsing which lead to dropped HCI frames (now passes BLE multitests)
  • Hook the RX IRQ for lower-latency BLE responses.
  • Add a helper script for debugging the IPCC mechanism.

Also some other minor fixes and tidy-ups.

@jimmo
Copy link
Member Author
jimmo commented Sep 1, 2020

@dmazzella FYI

@dmazzella
Copy link
Contributor

@jimmo tested and work for me.

@jimmo
Copy link
Member Author
jimmo commented Sep 8, 2020

Rebased after merging #6405. Added RX IRQ handler.

@dpgeorge
Copy link
Member
dpgeorge commented Sep 8, 2020

I think the only CI failure is black which wants to reformat rfcore.py, so pls reformat it.

@dpgeorge
Copy link
Member
dpgeorge commented Sep 8, 2020

The commit "Update rfcore.c to match ST examples." adds 2 commented-out lines that call LL_C2_EXTI_EnableEvent_32_63 and LL_EXTI_EnableRisingTrig_32_63, which are removed in commit "Minor refactoring.". Please remove them from the first commit there.

- Split tables and buffers into SRAM2A/2B.
- Use structs rather than word offsets to access tables.
- Use FLASH_IPCCDBA register value rather than option bytes directly.
This is required to allow using WS firmware newer than 1.1.1 concurrently with USB (e.g. VCP). Prevents CPU2 from modifying the CLK48 config on boot.

Tested on WS=1.8 FUS=1.1.

See AN5289 and micropython#6316
Remove some magic numbers and explain the payload fixup code.
Before this change there was up to a 128ms delay on incoming payloads from
CPU2 as it was polled by SysTick.

Now the RX IRQ immediately schedules the PendSV.
This allows prototyping rfcore.c improvements from Python.

This was mostly written by @dpgeorge with small modifications to work after rfcore_init() by @jimmo.
@dpgeorge
Copy link
Member
dpgeorge commented Sep 8, 2020

This was merged in b27edb8 through 632e3b7 with some very minor clean ups.

@dpgeorge dpgeorge closed this Sep 8, 2020
tannewt pushed a commit to tannewt/circuitpython that referenced this pull request May 16, 2022
fix SPI pin names qtpy esp32s3
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.

3 participants
0