Comments (17)
I looked at the reference manuals yesterday. stm32-extended
and stm32l4
are in fact the same implementation. The memory maps and features seem to be completely identical except for the WUPEN
bit (Wakeup from Stop mode enable) in I2C_CR1
that is missing on some controllers (some F0, F7 ?).
I would suggest to rename the L4 I2C to stm32-extended
and enable it for all the other controllers. That would need some changes in the L4 I2C driver and device file generator. The name stm32-extended
is problably ok because it supports more features than the other I2C IP (Fast Mode Plus support).
from modm.
This data is available because for FastModePlus
the io pin has to be configured in SYSCFG_CFGR1
to a special mode that can drive the I2C bus with 20mA.
from modm.
It's not that easy, thank you ST:
I hope this is somewhere in the CubeMX dataβ¦
However, we do not support any of these optional features right now.
from modm.
The WUPEN
bit is not used by the modm anyway, so we can simply ignore it.
I remember that the digital noise filter DNF
is not available on all controllers.
from modm.
I remember that the digital noise filter DNF is not available on all controllers.
I think this is only true for the other IP. If I didn't overlook anything the DNF
bits are available in all controllers that have the extended IP.
from modm.
@rleh Are you currently working on this? It wouldn't be very efficient if we end up with 2 PRs implementing the same thing.
from modm.
At least the feature tables are similar in the reference manuals...
from modm.
CubeMX has data about e.g. FastModePlus
:
<RefParameter Name="GPIO_FM6" Comment="Fast Mode" Type="list" DefaultValue="__NULL">
<PossibleValue Value="__NULL" Comment="Disable"/>
<PossibleValue Value="I2C_FASTMODEPLUS_PB6" Comment="Enable"/>
</RefParameter>
<RefParameter Comment="I2C Speed Mode " DefaultValue="I2C_Standard" Group="Timing configuration" Name="I2C_Speed_Mode" Type="list">
<PossibleValue Comment="Standard Mode" Value="I2C_Standard"/>
<PossibleValue Comment="Fast Mode" Value="I2C_Fast"/>
<PossibleValue Comment="Fast Mode Plus" Semaphore="$IpInstance_FastMP" Value="I2C_Fast_Plus"/>
</RefParameter>
But I don't know where $IpInstance_FastMP
is defined π
from modm.
Are you currently working on this? It wouldn't be very efficient if we end up with 2 PRs implementing the same thing.
No.
from modm.
According to CubeMX every device with the stm32-extended
IP supports FM+ except I2C instance 2 on devices that match STM32F030C8Tx|STM32F030R8Tx|STM32F051R8Tx|STM32F051C8Tx|STM32F051R8Ux|STM32F051C8Ux|STM32F0x0_Value_Line
.
All instances of stm32-extended
support SMBus except I2C2 on F0/L0.
This data is somehow contradictory to the reference manuals. STM32F05xxx have no FM+ but I can configure it in CubeMX for STM32F058x8. The correct rule according to the reference manual is that every instance supports FM+ except for I2C2 on F03x, F05x and F070xB devices.
from modm.
Is there a way in lbuild to see if there are multiple instances of the peripheral?
in module.lb:
properties["aid"] = "2" if self.instance == 4 else "1"
but ST sometimes leaves out the postfix 1
if there is only one peripheral.
Or should I just create an alias between APB1RSTR
and APB1RSTR1
?
from modm.
Is there a way in lbuild to see if there are multiple instances of the peripheral?
You mean like this?
has_instances = "instance" in device.get_driver("i2c")
This is just a dictionary, so you can always use the get(key, default)
function: device.get_driver("i2c").get("instance", [])
.
from modm.
The above is an issue in the CAN drivers, where there's CAN or CAN1 and/or CAN2. We follow the reference manual naming here, since we don't want to rename stuff (that gets you into trouble).
from modm.
in module.lb:
properties["aid"] = "2" if self.instance == 4 else "1"
but ST sometimes leaves out the postfix
1
if there is only one peripheral.Or should I just create an alias between
APB1RSTR
andAPB1RSTR1
?
This is probably not the right solution to this problem. This relation only holds for some L4. For instance, STM32F745 has 4 I2Cs but no APB1RSTR1
.
from modm.
Or should I just create an alias between APB1RSTR and APB1RSTR1?
L4 controllers have APB1RSTR1
/APB1RSTR2
, all the others APB1RSTR
. That should be manageable.
from modm.
There is a little FIXME we/I need to fix. Blame me :-O
The timing blob was taken from the CubeMX. Does anybody know how to calculate these settings? Is a LUT with a bunch of common frequencies an intermediate solution?
from modm.
Closed in #118.
from modm.
Related Issues (20)
- monochrome graphic display won't compile - vector ? HOT 4
- [fiber] multi stack size ? HOT 5
- SAMD51/SAME5x cache not enabled? HOT 5
- STM32G0B1 currently black listed HOT 2
- Placement of data section in wrong memory for STM32H7 HOT 1
- Segmentation fault when building documentation files HOT 3
- Heap not implemented. HOT 6
- Most UART drivers don't implement the full `modm::Uart` interface
- External interrupt causes immediate reset on Arduino Mega 2560 HOT 1
- STM32H7 Flash Support? HOT 5
- vscode json generation HOT 2
- CI docs all job is broken
- Docs Page, Search Function is Intermittent? HOT 6
- OpenOCD cannot configure TPIU/SWO on STM32H7 HOT 5
- Error when trying to compile example on M1 mac HOT 2
- Using SPI on Linux/Darwin target HOT 3
- CMake usage in recommended project structure HOT 3
- lbuild fails when relative paths are on different Windows drives HOT 1
- Fibers not implemented on ARM64
- CI Failling in a apprently nor related point HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modm.