Skip to content
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.

STM32F303 HAL made working; added SPI 3-way / half-duplex / bidi mode #30

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

marnix
Copy link

@marnix marnix commented Oct 26, 2023

See the commit texts for details.

Things I'd like to look at in the future:

  • Splitting up the one big file into separate files.
  • Looking at the other STM32 HALs, to make things consistent and extract common code.

Please note that I've tested this only with one piece of UART/SPI/I2C code (marnix/zig-stm32f3discovery-play#31). I've tested this with Zig 0.11.0 and currently-latest ZigEmbeddedGroup/microzig 2873e9e0 + ZigEmbeddedGroup/microzig#153 + ZigEmbeddedGroup/microzig#152, and I didn't find any issues...

Functional enhancement:

- SPI now uses 3-wire / half-duplex / bidi mode
  if BIDIMODE==1 is set on the bus.
  (There is no HAL API way to ask for bidi mode yet.)

HAL updates:

- Tell build.zig that STM32F303 has a HAL.
- Switch to new names for some Microzig parts.
- A few changes to match recent Zig language changes.
- Adopt small changes in regz-generated register descriptions.

And also:

- A few comment clarifications.
- Updated debug statements and comments for consistency.
This is to match the latest microzig 2873e9e0 after
ZigEmbeddedGroup/microzig#151.
@marnix marnix marked this pull request as draft November 6, 2023 16:23
@marnix
Copy link
Author

marnix commented Nov 6, 2023

I've set this to 'draft' again, until #31 has been merged to main.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant