git.graph-it.com
/
graphit
/
unipi-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f573df7
)
fix spi baudrate to 6MHz on arm64. H5 can set only 6MHz or 12MHz
author
Miroslav Ondra
<ondra@faster.cz>
Mon, 19 Aug 2019 16:23:29 +0000
(18:23 +0200)
committer
Miroslav Ondra
<ondra@faster.cz>
Mon, 19 Aug 2019 16:23:29 +0000
(18:23 +0200)
modules/unipi/src/unipi_common.h
patch
|
blob
|
history
diff --git
a/modules/unipi/src/unipi_common.h
b/modules/unipi/src/unipi_common.h
index 603456b5afe240032df80824c369516b9e683425..5a79c20439bd392ffd8b5a9ae8142fbf26a83c2e 100644
(file)
--- a/
modules/unipi/src/unipi_common.h
+++ b/
modules/unipi/src/unipi_common.h
@@
-64,7
+64,14
@@
#define NEURONSPI_B_PER_WORD 8
#define NEURONSPI_DEFAULT_FREQ 600000
#define NEURONSPI_COMMON_FREQ 12000000
-#define NEURONSPI_SLOWER_FREQ 7500000
+
+#if defined(CONFIG_ARM64)
+/* on NanoPi there are only 12MHz and 6MHz available, not in between */
+ #define NEURONSPI_SLOWER_FREQ 6000000
+#else
+ #define NEURONSPI_SLOWER_FREQ 7500000
+#endif
+
#define NEURONSPI_MAX_TX 60
//#define NEURONSPI_MAX_TX 256
#define NEURONSPI_MAX_BAUD 115200