Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
b8068895
Commit
b8068895
authored
7 years ago
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
stm32/i2c: Support more I2C baudrates for F746, and more F7 MCUs.
parent
008e1788
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ports/stm32/i2c.c
+10
-4
10 additions, 4 deletions
ports/stm32/i2c.c
with
10 additions
and
4 deletions
ports/stm32/i2c.c
+
10
−
4
View file @
b8068895
...
...
@@ -136,11 +136,17 @@ const pyb_i2c_obj_t pyb_i2c_obj[] = {
// The value 0x40912732 was obtained from the DISCOVERY_I2Cx_TIMING constant
// defined in the STM32F7Cube file Drivers/BSP/STM32F746G-Discovery/stm32f7456g_discovery.h
#define MICROPY_HW_I2C_BAUDRATE_TIMING {{100000, 0x40912732}}
#define MICROPY_HW_I2C_BAUDRATE_DEFAULT (100000)
#define MICROPY_HW_I2C_BAUDRATE_MAX (100000)
#define MICROPY_HW_I2C_BAUDRATE_TIMING { \
{100000, 0x40912732}, \
{400000, 0x10911823}, \
{1000000, 0x00611116}, \
}
#define MICROPY_HW_I2C_BAUDRATE_DEFAULT (400000)
#define MICROPY_HW_I2C_BAUDRATE_MAX (1000000)
#elif defined(STM32F767xx) || defined(STM32F769xx)
#elif defined(STM32F722xx) || defined(STM32F723xx) \
|| defined(STM32F732xx) || defined(STM32F733xx) \
|| defined(STM32F767xx) || defined(STM32F769xx)
// These timing values are for f_I2CCLK=54MHz and are only approximate
#define MICROPY_HW_I2C_BAUDRATE_TIMING { \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment