Releases: stm32-rs/stm32f3xx-hal
Releases · stm32-rs/stm32f3xx-hal
Release v0.10.0
Breaking changes
- Update
stm32f3pac to v0.15.1 (#335) - Update
bxcanpac to v0.7.0 (#335) - Remove
Toggleenum and useSwitchinstead for better naming purposes - Fix undefined behavior in SPI implementation (#346)
- Add
num_traits::PrimIntbounds toWord
- Add
- Remove
Serial::split, which possibly creates two mutable references two
one Serial instance, which could've caused UB. The use case of this function
was hard to find out anyway. (#351) - Remove
defmt-*features (defmtfeature is still available), to finalize
migration fromdefmt-0.2.x->defmt-0.3.x. (#349) - Removed implicit
stm32-usbdfeature (useusbinstead) (#349)
Added
Fixed
- Fix wrong timer frequency calculation and unexpected panics (#338)
- Fixed integer saturation in Timer::start, see #342 (#356)
Changed
- The PWM implementation was deprecated. There is not yet an alternative
implementation, but it is hard to maintain the current implementation
and not easy to verify if it is really a safe implementation.
It is also not consistent with the rest of the crates API. (#352) - Use critical-section crate instead of
interrupt_free, which is not always
sound. (#350)
It is also not consistent with the rest of the crates API. - The MSRV was bumped to 1.60 (#349)
Release v0.9.2
Release v0.9.1
Release v0.9.0
Added
- Generic
into_af_push_pull<A>andinto_af_open_drain<A>(#308) BusClockandBusTimerClocktraits (#302)RccBus,Enable,Resettraits and implementations for peripherals (#299)- Support cortex-m-rt
v0.7.0but still allowv0.6.13(#283) - Make timer
InterruptTypesfields public to be useful. (#304) - Add support for the internal signature peripheral (#281)
- Add common derives to
Toggle. (#281) - Add
is_interrupt_configuredandconfigured_interruptsfunction to
serial::Serialandtimer::Timer. (#281)
Fixed
- Fix
cansupport. Can would not build forstm32f302x6for example.
Also supportcanfor every chip other thanstm32f301andstm32f318.
(#283) - Fix wrong ADC votlage regulator startup time calculation effecting
calibration. (#281)
Breaking Changes
- Make
rtcan optional feature. Without that featurertccas a dependency is
not needed. (#283) - Update
rtcctov0.3.0. For a detailed changelog, go here. (#314) - Enable
rt,usb,can,rtcandldfeature by default.
To disable that behavior, setdefault-features = false. (#283) - The MSRV was bumped to 1.54 (#308)
- Update
stm32f3pac to v0.14.0 (#282) - Remove the
bxcanre-export. (#304) - The LICENSE has been changed from BSD 0-clause to the familiar dual license
MIT / Apache 2.0. This has been done, as this fits the ecosystem better and
the dependencies where using the MIT / Apache 2.0 dual licensing already,
which resulted into the situtation, that BSD 0-clause was not affectivly
0-clause as MIT conditions had to be met anyways. (🧂 IANAL). (#309) - Renamed
Serial::raw_readtoSerial::read_data_register. (#281) - Seal
FlashExtandRccExttraits. These are no longer implementable by
a user of this crate. (#281) - Move ADC from a macro to a generic implementation, meaning that
it is possible to obtain an ADC instance viaAdc::newinstead of
Adc::adc1. (#281) - Remove
adc::ClockModeand the clock configuration of the ADC.- Clock configuration effects the common ADC which inturn controls e.g. ADC1
and ADC2, which the old API did not resemble. - The API provides no clock configuration for ADC peripherals yet, but
correctly acts upon changes done through thepac. (#281)
- Clock configuration effects the common ADC which inturn controls e.g. ADC1
- Major rework of the ADC implementation: (#281)
- Add
CommonAdcsupport. - Add internal sensor peripheral support like
TemeperaturSensorand similar. - Lift restriction of the ADC implementation for
stm32f303, though
stm32f373is still not supported. - Enable manual configuration of the Adc peripheral of most important features
ConversionModeSequencelengthOverrunMode- etc.
- Leverage type states to:
- Allow a
DisabledADC, which can be manually calibrated. - Allow a
OneShotADC implementation throughinto_oneshotwith an
optimal configuration for theOneShotembedded-hal trait.
- Allow a
- Support every possible ADC channel.
- Add interrupt support.
- Add
Release v0.8.2
Added
- Add missing SPI impls for the gpio-f303 device groups (e.g. stm32f303vc) (#304)
Release v0.8.1
Fixed
- ADC Channel SMP Register mismatch. (#291)
- While
read()ing a Pin mapped to channel10and unexpected panic happened.
- While
Release v0.8.0
Added
- Readd MonoTimer. This was accidentally removed before. (#247)
- Different to before, frequency() and now() now do not consume the MonoTimer.
&selfis used instead. (#267)
- Different to before, frequency() and now() now do not consume the MonoTimer.
- Basic serial implementation also available for UART4 and UART5 (#246)
- Implement serial DMA also for Serial (#246)
- Add
enumsetas a optional dependency, which allow more ergonomic functions
regarding enums. This is especially useful for status event query functions.
(#253) - As serial
Errorand serialEventsshare things in common.TryFrom<Event>
andFrom<Error>is implemented for conversions. (#253) - Add serial character match function, with which events can be triggered for
the set character. (#253) - Add receiver timeout function, which configures the serial peripheral to
trigger an event, if nothing happened after a certain time on the serial
receiver line. (#253) - Add
raw_read()function, which does no error handling and also does not
clear anyEventby itself. Useful, if the error_handling has to be done in
another context (like an interrupt rountine). (#253) - Introduce
Toggle, withOnandOffas a convinience wrapper aroundbool
for configuration purposes. (#253) - Add an associated const to
serial::Instanceto return the corresponding
pac::Interrupt-number, which is useful tounmask()interrupts.
Aninterrupt()function toSerialwas also added for convinience. (#253) - Add a
Serial::is_busy()function to check, if the serial device is busy.
Useful to block on this function, e.g.while serial.is_busy() {}. (#253) - Add
BaudTablea convinience wrapper aroundBaudto configure theSerial
to the most commen baud rates. (#253) - Add
Serial::detect_overrun()function, to en- or disable the overrun
detection of theSerial. If overrun is disabled (enabled by default), than
newly arrived bytes are overwriting the current data in the read receive
register without throwing any event. (#253). - Lift generic constraint of most
Serialmethod onTxPinandRxPin.
This should make it easier to generically use theSerialperipheral. (#253) - Greatly increase coverage of
Debuganddefmt::Formatimplementations.
Almost all important types should now be supported. (#265) - Add a
free()function to the RTC implementation to retrieve the passed-in
peripheral. (#266) - Implement an API to return the corresponding interrupt number of timer through
the newly introducedInterruptNumbertrait, where theInterruptis held
as an associated const. (#267)- Depending on the timer one
Interruptor a bundle ofInterruptTypesis
returned. - On the bases of these interrupts, the interrupt controller (NVIC) can
be set to mask or unmask these interrupts.
- Depending on the timer one
- Implement the
embedded-hal::timer::Canceltrait for timers. (#267) - Add
use_plltoCFGR- the clock configuration - to force to use the PLL
source for the systemclock. AlsoClocks::pllclk()was introduced to be able
to check, whether PLL is used. - Add unsafe peripheral function to access underlying peripheral (#277)
- Implement
fmt::WriteforSerial(#278)- This allowes using
writeln!in combination withSerial.
- This allowes using
Changed
PXxstruct (representing a generic GPIO pin) implementsSendandSync(#251)- Each pin aliases (
PA0,PA1, ..) are defined undergpiomodule directly.
Re-export from gpio port sub-modules are provided for compatibility. (#257) - The
embedded-halRead implementation ofSerialdoes now returnWoudBlock
if the peripheral is busy. Also if anOverrunoccured the receive data
register (RDR) is flushed to have a more consistent API. (#253) - Remove
cargo-metadataas a build dependency to cut down dependencies and
the reliance onresolver = "2". (#270)
Fixed
- The "unproven" feature, which itself does enable the "embedded-hal/unproven"
features, can no longer be disabled. (#259)- The "unproven" features are no longer unproven and used anywhere anyways.
- This crate was not building successfully without the unproven feature.
- Set the correct baud rate for chips where
USART1SW_A::PCLKleads to a
baud rate derived from PCLK1, rather than the ports own bus clock, PCLK2.
(#260)
Breaking Changes
- Refactor CAN to use the
bxCancrate. (#207) - Add support for configuring parity and stop bits in addition to baud rate for
Serialwithserial::config::Config. (#239) - Implement
Serial::joinwhich allows to re-create the serial peripheral,
whenSerial::splitwas previously called. (#252) - Parameterized
usb::Peripheralandusb::UsbTypeon the pin configuration
used (#255) - Add (almost) all missing serial (interrupt and status) events.
Also rename all the event names to be more descriptive. (#253) - A new serial interrupt API was introduced: (#253)
listen()andunlisten()are renamed toenable_interrupt()and
disable_interrupt().is_tc()and other non-parametrizable functions are removed.configure_interrupt()was added, which can be parameterized.clear_event()was added to clear specific events.clear_events()was added to clear all events at once.is_event_triggered()can check if anEventis triggered.triggered_eventsreturns anEnumSetof triggered events.
- Change gpio interrupt API to be more in line with the new serial interrupt
API. (#262) - Move EXTI interrupt management to SysCfg. (#262)
- Becuase EXTI interrupt confiugration could cancel out, make it more obvious
in that SysCfg manages the interrupts, not the pin itself.
Changemake_interrupt_source()toSysCfg::select_exti_interrupt_source().
- Becuase EXTI interrupt confiugration could cancel out, make it more obvious
- Change dma interrupt API to be more in line with the new serial interrupt
API. (#263) - Change timer interrupt API to the same of the serial interface. (#264)
- Make timer Events
#[non_exhaustive]. (#264) - Renames timers
release()function tofree()to be more in line with the
rest of this crate. (#264) - rtc's
Errortype andOperationModeandCkModeof adc are now#[non_exhaustive].
(#266) - All non-camel-case types are chaged to be consistently camel-case types.
Types which do not follow these rules are re-exported types bystm32f3for
example. (#266) - Adc's
SampleTimetype has been reworked and is now a consistent wrapper around
the underlying types forstm32f3'sSMP9_AandSMP18_Atype. (#266) - Rename
CkModetoClockMode(#266) - Rename
stm32-usbdfeature tousb.stm32-usbdis still used as a
dependency. (#271) - Rework the timer implementation: (#267)
PclkSrctrait was removed in favor of genericInstancetrait, which
is a common ground for all available timers.Timer::tim1and so on are renamed toTimer::new- The implementation of the timers are corrected to better represent the
avaibilities of timers of the hardware. Timer::newnow does not take a timeout value. This means, that the
timer will now not be started automatically and one has to explicitly call
start().
- Rework SPI implementation: (#273)
- A generic
Instancetrait now represents all Spi peripherals. Spi::spi1and so on are renamed toSpi::new.- Add SPI configuration type to be passed into
Spi::new
- A generic
- Remove public fields from
AdcandRtc(#277)
Release v0.7.0
Added
- Make
Clocksppre1()andppre2()methods public, to get the current
Prescaler value. ([#210]) - Support for more CAN bit rates and modes. ([#186])
- Implement
into_xxxmethods for partially erased pins ([#189]) - Enable better GPIO internal resistor configuration ([#189])
- Support for GPIO output slew rate configuration ([#189])
- Support for GPIO interrupts ([#189])
ldfeature, which enables the memory.x generation ([#216])- Implement
DelayMsforMillisecondsandDelayUsforMicroseconds([#234]) - ADC can now be
free()'d ([#212]) - Serial does now implement
embedded_hal::serial::{Read, Write}.
Nosplit()necessary. ([#232]) - Serial can now listen for the "Transmission Complete"
Tcinterrupt event ([#232]) - Serial can now listen for the
Idleinterrupt event ([#238])
Changed
- The structure of
gpio.rsis greatly changed. GenericPinstruct is used
for every GPIO pin now ([#189])
Fixed
- Delay based on systick no longer panics ([#203]) for to high values
and support longer delays ([#208]) - Long delay during ADC initialization ([#217])
Breaking Changes
- The MSRV was bumped to 1.51 ([#227])
- Replace custom time based units with types defined in the [embedded-time][]
crate ([#192]) - The
rccpublic API now expects time based units inMegahertz.
If the supplied frequency cannot be converted toHertzthe code
willpanic. This will occur if the suppliedMegahertzfrequency
cannot fit intou32::MAXwhen converting toHertz([#192])
// The supplied frequencies must be in `MHz`.
let clocks = rcc
.cfgr
.use_hse(8.MHz())
.hclk(48.MHz())
.sysclk(48.MHz())
.pclk1(12.MHz())
.pclk2(12.MHz())- You always required to select a sub-target for target chips ([#216])
- Bump dependencies: ([#229])
cortex-mto 0.7.2cortex-m-rtto 0.6.4defmtto 0.2.2embedded-halto 0.2.5nbto 1.0.0stm32f3to 0.13.2stm32-usbdto 0.6.0
into_afxmethods are splitted intointo_afx_push_pulland
into_afx_open_drain([#189])- GPIO output mode (
PushPullorOpenDrain) is encoded into pin typestate
in alternate function mode ([#189]) - GPIO internal resistor configuration is no longer encoded into pin typestate
in input mode ([#189]) - Remove
stm32module. Useuse stm32f3xx_hal::pacinstead.
This module was a deprecated in [v0.5.0][] and is now subject for
removal. ([#220]) Serial::uart1... functions are renamed toSerial::new. ([#212])