Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
NuttX RTOS
Commits
60e64ae9
Commit
60e64ae9
authored
10 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
Don't have to set SDA high initially in I2C reset because that is done by the pin configuration
parent
981c1ebf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arch/arm/src/sama5/sam_twi.c
+5
-5
5 additions, 5 deletions
arch/arm/src/sama5/sam_twi.c
with
5 additions
and
5 deletions
arch/arm/src/sama5/sam_twi.c
+
5
−
5
View file @
60e64ae9
...
...
@@ -1574,7 +1574,11 @@ int up_i2creset(FAR struct i2c_dev_s *dev)
up_disable_irq
(
priv
->
attr
->
irq
);
/* Use PIO configuration to un-wedge the bus */
/* Use PIO configuration to un-wedge the bus.
*
* Reconfigure both pins as open drain outputs with initial output value
* "high" (i.e., floating since these are open-drain outputs).
*/
sclpin
=
MKI2C_OUTPUT
(
priv
->
attr
->
sclcfg
);
sdapin
=
MKI2C_OUTPUT
(
priv
->
attr
->
sdacfg
);
...
...
@@ -1590,10 +1594,6 @@ int up_i2creset(FAR struct i2c_dev_s *dev)
sam_pio_forceclk
(
sclpin
,
true
);
sam_pio_forceclk
(
sdapin
,
true
);
/* Let SDA go high (i.e., floating since this is an open-drain output). */
sam_piowrite
(
sdapin
,
true
);
/* Clock the bus until any slaves currently driving it low let it float.
* Reading from the output will return the actual sensed level on the
* SDA pin (not the level that we wrote).
...
...
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