diff options
author | Harald Welte <laforge@gnumonks.org> | 2012-08-20 00:25:51 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2012-08-20 00:25:51 +0200 |
commit | c23568f39b7c7fa43e5bdfc08deb6e33966033cf (patch) | |
tree | 19b2bf2155c322f5af059b3da757e679056b328a | |
parent | dc7a5264932183b6f7d78f0ab0febe2edae74ab9 (diff) |
SPI: it seems there is an undocumented bit that needs to be set...
-rw-r--r-- | src/cc32/cc32_spi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cc32/cc32_spi.c b/src/cc32/cc32_spi.c index 1c55ed3..75dafae 100644 --- a/src/cc32/cc32_spi.c +++ b/src/cc32/cc32_spi.c @@ -83,7 +83,9 @@ int cc32_spi_init(uint8_t cpol, uint8_t cpha, uint8_t divide_2n) val = ((cpol & 1) << 0) | ((cpha & 1) << 1) | ((divide_2n-1) << 2) | SPICON2_RUNEN; - *SPI_REG(SPICON2) = val; + /* this is an undocumented value, but without it seems the SPI + * is not working! */ + *SPI_REG(SPICON2) = val | 0x60; return 0; } |