You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2023/02/24 08:56:59 UTC
[mynewt-core] branch master updated: mcu/nrf5340: Fix spi frequency selection
This is an automated email from the ASF dual-hosted git repository.
jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push:
new 58d277afa mcu/nrf5340: Fix spi frequency selection
58d277afa is described below
commit 58d277afafe4b6fd59d4245fa1edce58d72b53fd
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Fri Feb 17 12:46:35 2023 +0100
mcu/nrf5340: Fix spi frequency selection
16 and 32 MHz are only valid for SPI4 not SPI3
---
hw/mcu/nordic/nrf5340/src/hal_spi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/mcu/nordic/nrf5340/src/hal_spi.c b/hw/mcu/nordic/nrf5340/src/hal_spi.c
index aa6901588..a52eee110 100644
--- a/hw/mcu/nordic/nrf5340/src/hal_spi.c
+++ b/hw/mcu/nordic/nrf5340/src/hal_spi.c
@@ -424,13 +424,13 @@ hal_spi_config_master(struct nrf5340_hal_spi *spi,
case 8000:
frequency = SPIM_FREQUENCY_FREQUENCY_M8;
break;
- /* 16 and 32 MHz is only supported on SPI_3_MASTER */
-#if defined(SPIM_FREQUENCY_FREQUENCY_M16) && MYNEWT_VAL(SPI_3_MASTER)
+ /* 16 and 32 MHz is only supported on SPI_4_MASTER */
+#if defined(SPIM_FREQUENCY_FREQUENCY_M16) && MYNEWT_VAL(SPI_4_MASTER)
case 16000:
frequency = SPIM_FREQUENCY_FREQUENCY_M16;
break;
#endif
-#if defined(SPIM_FREQUENCY_FREQUENCY_M32) && MYNEWT_VAL(SPI_3_MASTER)
+#if defined(SPIM_FREQUENCY_FREQUENCY_M32) && MYNEWT_VAL(SPI_4_MASTER)
case 32000:
frequency = SPIM_FREQUENCY_FREQUENCY_M32;
break;