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 2019/04/16 08:47:39 UTC

[mynewt-core] branch master updated: hw/mcu/dialog: Fix hal_spi_config()

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 37da4ea  hw/mcu/dialog: Fix hal_spi_config()
37da4ea is described below

commit 37da4eaaae6f0de790184a9cb910c86bcea435ad
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Tue Apr 16 10:27:33 2019 +0200

    hw/mcu/dialog: Fix hal_spi_config()
    
    Wrong bit mask was used for masking bits in SPI_CTRL_REG.
    One mask was taken from totally different register.
    Second mask was not really needed.
---
 hw/mcu/dialog/da1469x/src/hal_spi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/mcu/dialog/da1469x/src/hal_spi.c b/hw/mcu/dialog/da1469x/src/hal_spi.c
index 3612099..08cb8f6 100644
--- a/hw/mcu/dialog/da1469x/src/hal_spi.c
+++ b/hw/mcu/dialog/da1469x/src/hal_spi.c
@@ -296,9 +296,8 @@ hal_spi_config(int spi_num, struct hal_spi_settings *settings)
     regs->SPI_CTRL_REG |= SPI_SPI_CTRL_REG_SPI_RST_Msk;
 
     /* Preserve some register fields only */
-    ctrl_reg = regs->SPI_CTRL_REG & (SPI_SPI_RX_TX_REG_SPI_DATA_Msk |
+    ctrl_reg = regs->SPI_CTRL_REG & (SPI_SPI_CTRL_REG_SPI_TX_FIFO_NOTFULL_MASK_Msk |
                                      SPI_SPI_CTRL_REG_SPI_DMA_TXREQ_MODE_Msk |
-                                     SPI_SPI_CTRL_REG_SPI_9BIT_VAL_Msk |
                                      SPI_SPI_CTRL_REG_SPI_PRIORITY_Msk |
                                      SPI_SPI_CTRL_REG_SPI_EN_CTRL_Msk |
                                      SPI_SPI_CTRL_REG_SPI_SMN_Msk |