Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Proyecto Smart Watch
Manage
Activity
Members
Labels
Plan
Issues
7
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Leonardo Martinez Hornak
Proyecto Smart Watch
Commits
73adcb43
Commit
73adcb43
authored
3 years ago
by
Leonardo Martinez Hornak
Browse files
Options
Downloads
Patches
Plain Diff
Setting SCL to 400kHz
parent
4e34677e
Branches
i2cIssueFix
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
firmware/src/i2c.c
+2
-4
2 additions, 4 deletions
firmware/src/i2c.c
with
2 additions
and
4 deletions
firmware/src/i2c.c
+
2
−
4
View file @
73adcb43
...
...
@@ -34,10 +34,8 @@ void initializeI2C(int slave_address)
//The STOP condition is generated by the user
EUSCI_B0
->
CTLW1
=
0
;
//TODO Increase to 400kHz
// SMCLK / BRW = 100kHz - desired baudrate (12MHz/100kHz)=120
//EUSCI_B0->BRW = 120;
EUSCI_B0
->
BRW
=
480
;
// To get 25kHz
// SMCLK / BRW = 100kHz - desired baudrate (12MHz/400kHz)=30
EUSCI_B0
->
BRW
=
30
;
//Slave address
EUSCI_B0
->
I2CSA
=
slave_address
;
...
...
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