Commit Graph

1614 Commits

Author SHA1 Message Date
dragonmux
9efcb120f7 usb: Begun implementing support for sending the microsoft OS descriptor set structures 2025-07-11 19:14:29 -07:00
dragonmux
9e0dbfc137 usb/microsoft: Implemented the set header structure 2025-07-11 19:14:29 -07:00
dragonmux
b7ddb7c7c0 usb: Implemented support for sending the Microsoft OS-specific descriptor component of a platform capability descriptor 2025-07-11 19:14:29 -07:00
dragonmux
c1247110d8 usb: Begun implementing microsoft OS-specific descriptor support 2025-07-11 19:14:29 -07:00
dragonmux
1bc180c639 usb_standard: Implemented support for sending out what we have so far of a BOS descriptor 2025-07-11 19:14:29 -07:00
dragonmux
1d97cbf6e1 usb: Begun implementing support for Binary Object Stores and their capability descriptors 2025-07-11 19:14:29 -07:00
Karl Palsson
201f5bcfb3 stm32/dmamux: fix typo in EDGE
Fixes: https://github.com/libopencm3/libopencm3/issues/1563
2024-10-10 21:47:39 +00:00
Karl Palsson
228f28fa66 stm32g4: flash: fix OPTR_DUALBANK definition
off by one error transcribing the document.

Fixes: https://github.com/libopencm3/libopencm3/issues/1559
2024-09-16 22:15:51 +00:00
Karl Palsson
b8e6e5d373 stm32h7: rcc: fix RCC_PLLFRAC address
copy/paste in original submission

Fixes: 2ca56f4c stm32h7: updates to PWR and RCC to support PLL configuration.
Fixes: https://github.com/libopencm3/libopencm3/issues/1547
Signed-off-by: Karl Palsson <karlp@tweak.au>
2024-06-21 22:36:43 +00:00
Roman Buchert
bb4c5d7324 stm32: quadspi: Add missing bracket at line 51.
Fixes: https://github.com/libopencm3/libopencm3/issues/1534
Reviewed-by: Karl Palsson <karlp@tweak.au>
2024-03-25 16:59:28 +00:00
neoxic
ec5aeba354 stm32g4: add IWDG support
Reviewed-by: Karl Palsson <karlp@tweak.au>
2024-03-11 09:11:29 +00:00
neoxic
0ee2477d08 stm32g4: fix ST_TSENSE_CAL2_110C -> ST_TSENSE_CAL2_130C
Fixes: 4e70d06d6 stm32g4: Add basic support
Reviewed-by: Karl Palsson <karlp@tweak.au>
2024-03-04 09:45:51 +00:00
Karl Palsson
1f3abd4376 stm32g4: irq.json: use fdcanX_itY consistently
Other families used fdcanX_itY already, and that matches the terminology
of the reference manual, so move to that style for consistency.

Signed-off-by: Karl Palsson <karlp@tweak.au>
2023-10-04 21:44:27 +00:00
TomasPech
1acf0c1f56 stm32g4: irc.json: fix FDCAN1_INT0/1 swap
The swapped lines generated the wrong nvic.h, then jumping into the wrong ISR.
See data sheet RM0440rev7 (page442, table 97).

Reviewed-by: Karl Palsson <karlp@tweak.au>
2023-10-04 21:40:45 +00:00
Karl Palsson
32a1692077 stm32/g4/dmamux: fix duplicated defines
Fixes: https://github.com/libopencm3/libopencm3/issues/1491

Signed-off-by: Karl Palsson <karlp@tweak.au>
2023-08-16 13:49:16 +00:00
dragonmux
10cfbd7652 lm4f/uart: Implemented a function to get the current parity setting for a UART 2023-04-16 22:18:43 -07:00
dragonmux
f0262cb4a9 lm4f/uart: Implemented a function to get the current stop bits setting for a UART 2023-04-16 22:18:43 -07:00
dragonmux
78ace36308 lm4f/uart: Implemented a function to get the current databits setting for a UART 2023-04-16 22:18:43 -07:00
dragonmux
c212d19cd4 usb/cdc: Added a definition for the GET_LINE_CODING class-specific request 2023-04-16 22:18:43 -07:00
dragonmux
56ec4c2b06 stm32/usart: Automatic whitespace cleanup 2023-04-16 22:18:43 -07:00
dragonmux
188671389d stm32/usart: Implemented a function to get the current parity setting for a USART 2023-04-16 22:18:43 -07:00
dragonmux
48a8355874 stm32/usart: Implemented a function to get the current stop bits setting for a USART 2023-04-16 22:18:43 -07:00
dragonmux
0241982fb4 stm32/usart: Implemented a function to get the current databits setting for a USART 2023-04-16 22:18:43 -07:00
Karl Palsson
189017b25c usb:msc: include referenced usbd_device headers
In addition to stdint.h, MSC directly relies on the usbd_device type
definition existing.  Ensure it has included it's own dependencies.

Fixes: https://github.com/libopencm3/libopencm3/issues/1471
Signed-off-by: Karl Palsson <karlp@tweak.au>
2023-03-07 14:27:20 +00:00
Karl Palsson
9914cd1d6c usb: add missing stdint.h includes
Some class headers were not including stdint.h themselves, despite
relying on those types, and relying on them already being included
earlier elsewhere.  Consistently include stdint.h where it's used.

Fixes: https://github.com/libopencm3/libopencm3/issues/1471
Signed-off-by: Karl Palsson <karlp@tweak.au>
2023-03-07 14:23:49 +00:00
Karl Palsson
e643f66342 stm32g4:rcc: add uart peripheral clock source helpers
Required so that the common uart infrastructure can be updated. This was
the last family to receive this implementation.

Signed-off-by: Karl Palsson <karlp@tweak.au>
2023-02-03 00:02:59 +00:00
Karl Palsson
e9426db222 stm32l4: rcc: use SYSCLK consistently with other families
Signed-off-by: Karl Palsson <karlp@tweak.au>
2023-02-02 23:58:02 +00:00
Karl Palsson
0878a04696 stm32g4: rcc: use SYSCLK consistently with other families
Signed-off-by: Karl Palsson <karlp@tweak.au>
2023-02-02 23:55:27 +00:00
Karl Palsson
f0575c3560 stm32g4: rcc: use datasheet naming for CCIPR fields
Follow HACKING specifications, be consistent with all other parts.
Yes, the SEL suffix is kinda superfluous, but it's _consistent_ which is
why we do it.

Signed-off-by: Karl Palsson <karlp@tweak.au>
2023-02-02 23:51:13 +00:00
Karl Palsson
b8bdc87d2d trivial: stm32f0:crc fix typo in doxygen
Signed-off-by: Karl Palsson <karlp@tweak.au>
2023-02-02 23:15:54 +00:00
Karl Palsson
e54650fba4 stm32f0: adc: external trigger selection to unshifted
Cleanup one function at a time.  Use the correct doxygen references, use
unshifted forms in user facing apis.  Yes, only the trigger at the
moment, as the polarity is shared.

Signed-off-by: Karl Palsson <karlp@tweak.au>
2023-02-02 22:47:44 +00:00
neoxic
69e4ade399 stm32:f0/g0/l0: adc: Add EXTSEL defines
Add definitions for all the specific options, as is done for other
families.

Reviewed-by: Karl Palsson <karlp@tweak.au>
(Added extra g0 definitions that were missed)
2023-02-02 22:13:05 +00:00
neoxic
7bd0f4097b stm32g0:adc: drop non-existant ADC_OR register
Reviewed-by: Karl Palsson <karlp@tweak.au>
2023-02-02 21:43:43 +00:00
neoxic
d262e70fc3 stm32g4/g0: adc: fix clock prescalers
CCR register definitions were completely wrong, both decimal/hex mixups,
and straightup transcriptions from the reference manual errors.

Unify the styles for both g0 and g4, using the same (duplicated)
function for both implmentations.

Reviewed-by: Karl Palsson <karlp@tweak.au>
2023-02-01 21:40:56 +00:00
Karl Palsson
88e91c9a7c stm32:rcc: update _get_clock (uart/i2c) to handle all cases
Adds handling for missing cases.  While i2c only has 3 cases, uarts have
all 4, so make sure they're handled properly.
Removes duplicated/redundant definitions.
Adds doxygen wrappers, even if only for internal use.

Fixes: e41ac6ea71 stm32: added peripheral clock get helpers for all stm32
Signed-of-by: Karl Palsson <karlp@tweak.au>
2023-01-13 02:15:41 +00:00
Karl Palsson
df654d7f28 stm32: spi: drop spi_reset()
It's simply a wrapper around rcc_reset_pulse already.
Just drop it. See 034dbf20ff for the same deletion for timers.

Signed-off-by: Karl Palsson <karlp@tweak.au>
2023-01-13 02:15:41 +00:00
Karl Palsson
b3bdf025d7 stm32: i2c: drop i2c_reset()
It's simply a wrapper around rcc_reset_pulse already.
Just drop it. See 034dbf20ff for the same deletion for timers.

Signed-off-by: Karl Palsson <karlp@tweak.au>
2023-01-13 02:15:41 +00:00
Karl Palsson
2c180d8431 stm32g0: rcc: add missing periphs
A bunch of periphs on newer parts weren't defined.  Add their
enable/reset bit definitions so they can be used.

Signed-off-by: Karl Palsson <karlp@tweak.au>
2023-01-13 02:15:41 +00:00
Karl Palsson
5796f41caa [BREAKING] stm32g0: add/rename missing periphs/irqs
Updated to RM0444_rev5

Breaking: renames some irqs to be more specific and better match with
refman.  We're still in the "between" tags, so break all the toys!

Signed-off-by: Karl Palsson <karlp@tweak.au>
2023-01-13 02:15:41 +00:00
Karl Palsson
7c09d0d14c stm32f3: enable RTC
Fixes: https://github.com/libopencm3/libopencm3/issues/1446
Fixes: 18f4d7c1b7 stm32f3: rtc: include correct shared header

No testing on real hardware, but the docs imply that this should have
always had the "basic" rtc-v2 peripheral.

Signed-off-by: Karl Palsson <karlp@tweak.net.au>
2022-11-17 21:15:47 +00:00
Karl Palsson
e1ec3e4e18 stm32: rcc: clarify flash_prefetch_enable documentation
It's not globally enabled by default, and it has consumption impacts as
well.  Reported on IRC.
2022-11-07 14:38:19 +00:00
Oskar
d8d33ca36d stm32: cordic: add new peripheral
Review-URL: https://github.com/libopencm3/libopencm3/pull/1418
Reviewed-by: Karl Palsson <karlp@tweak.net.au>

Edits: removed non-existant u5 code, squished to a single commit,
whitespace cleanup.
2022-10-27 21:37:00 +00:00
Karl Palsson
5980c58f9b stm32g4: syscfg: fix doxygen
Signed-off-by: Karl Palsson <karlp@tweak.net.au>
2022-09-19 12:59:05 +00:00
andrej
2f29614133 stm32: Support CRC, SYSCFG and USART on G4 2022-09-19 13:43:46 +02:00
neoxic
0a132c0f6c stm32: dmamux: Fix tabs as tab size 8 2022-09-16 10:24:45 +00:00
neoxic
b37811915e stm32:dmamux: fix individual DMAMUX register aliases DMAMUXn_*
Argument 'dmamux_base' is set by an alias and hence is always unused.
2022-09-15 21:36:38 -07:00
Karl Palsson
44e142d4f9 cm3: scb: C11 keyword compliance
Avoid use of the gnu specific "asm" keyword, and use the __asm__
keyword, as used everywhere else in the library.  This fixes compilation
in C11, and unifies all uses of asm literals in the codebase.

Reported-by: @dragonmux
Fixes: https://github.com/libopencm3/libopencm3/pull/1425

Signed-off-by: Karl Palsson <karlp@tweak.net.au>
2022-07-05 16:55:11 +00:00
Oskar
4675227783 stm32g4: rng: enable common code support
Also fixes an error in the memory map exposed by enabling this.

Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2022-06-03 21:02:19 +00:00
Oskar
1e71f18be2 stm32g4: i2c: enable common peripheral code. 2022-06-03 20:59:34 +00:00
Vlad Logyin
3122c0b33f stm32l4: rcc: Implement PLL helper as seen in other MCU families
Reviewed-by: Karl Palsson <karlp@tweak.net.au>
2022-06-03 20:53:15 +00:00