Open qff233 opened 7 months ago
May do this is so hard. It is different from another chip, because it has different register. AT company rewrite a new library for F435/437
, should we F435/437
support as another project?
Indeed, Artery has collected all their MCUs in the F4 family, although they are fundamentally different.
Parts of the project are compiled depending on the configuration, this allows to reuse the code for different MCUs depending on the set of peripherals. So far I don’t know any reason to divide into several crates.
While the entire family in one crate provides the same HAL syntax and behavior for any MCU, since changes affect all MCUs at once. It is simpler and more obvious to the user in the first place. But it makes the development of a HAL crate very difficult.
You might be interested in some development tools for peripheral comparison:
svdtools htmlcompare
also check https://github.com/rust-embedded/svdtools/pull/177#issuecomment-1783749772
It's a good idea! So I can not find the library written by C, and I can simply find the different of F4 family!
Should I create other mod that save in other folder to save the F435/F437
support? Or I put it into same file?
No, you don't need to create another modules. To implement support, first of all you need to add pins to src/gpio/f4.rs Next there is a big problem. I have only implemented STM32F1-like GPIO which is used in AT32F415. But F435/7 uses STM32F3-like GPIO. We will have to implement it first of all.
What the parameter PEPin
in this line do? And what does PEPin
mean?
Not sure. Just copy of https://github.com/stm32-rs/stm32f4xx-hal/blob/d567d5f6951ff01ca1e2c4c4957d0c7256b46171/src/gpio.rs#L547
EDIT: PE stands for Partially Erased
I add some at32f435/437 support. Please check and pull the commit.
Thank you very much, I saw it. I'll write a review when I find time
As the title says.