Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
card10
firmware
Merge requests
!76
fix(display): Re-init SPI before every transaction
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
fix(display): Re-init SPI before every transaction
schneider/spi-display
into
master
Overview
1
Commits
1
Pipelines
3
Changes
2
Merged
schneider
requested to merge
schneider/spi-display
into
master
5 years ago
Overview
1
Commits
1
Pipelines
3
Changes
2
Expand
Closes
#63
in a very ugly way.
0
0
Merge request reports
Compare
master
version 2
4ce1592e
5 years ago
version 1
5fb5ff16
5 years ago
master (base)
and
latest version
latest version
494d30a9
1 commit,
5 years ago
version 2
4ce1592e
1 commit,
5 years ago
version 1
5fb5ff16
1 commit,
5 years ago
2 files
+
15
−
14
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
lib/card10/card10.c
+
1
−
12
Options
@@ -24,11 +24,7 @@
#include
<stdint.h>
#include
<string.h>
/* XXX: The display supports max 15 Mhz, but we have stability issues at that rate.
* Current suspicion is that the SDK is buggy.
*
* At 12 MHz things seem stable*/
#define SPI_SPEED (12 * 1000 * 1000) // Bit Rate. Display has 15 MHz limit
#define SPI_SPEED (15 * 1000 * 1000) // Bit Rate
const
gpio_cfg_t
bhi_interrupt_pin
=
{
PORT_0
,
PIN_13
,
GPIO_FUNC_IN
,
GPIO_PAD_PULL_UP
@@ -82,19 +78,12 @@ void card10_init(void)
spi17y_master_cfg
.
ss0
=
Enable
;
spi17y_master_cfg
.
ss1
=
Disable
;
spi17y_master_cfg
.
ss2
=
Disable
;
if
(
SPI_Init
(
SPI0
,
0
,
SPI_SPEED
,
spi17y_master_cfg
)
!=
0
)
{
printf
(
"Error configuring SPI
\n
"
);
while
(
1
)
;
}
if
(
SPI_Init
(
SPI2
,
0
,
SPI_SPEED
,
spi17y_master_cfg
)
!=
0
)
{
printf
(
"Error configuring SPI
\n
"
);
while
(
1
)
;
}
display_init
();
leds_init
();
Loading