You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2018/12/04 13:10:20 UTC

[mynewt-core] 02/04: hw/mcu/nordic: Reset shorts on RX error

This is an automated email from the ASF dual-hosted git repository.

andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 2aca00e83b4100f89c972b282da6301288156d0b
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Mon Nov 26 11:10:35 2018 +0100

    hw/mcu/nordic: Reset shorts on  RX error
    
    We manually trigger STOP task so there's no need for setting shorts
    here. We should better just clear them instead.
---
 hw/mcu/nordic/nrf52xxx/src/hal_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/mcu/nordic/nrf52xxx/src/hal_i2c.c b/hw/mcu/nordic/nrf52xxx/src/hal_i2c.c
index cea346c..dcab21e 100644
--- a/hw/mcu/nordic/nrf52xxx/src/hal_i2c.c
+++ b/hw/mcu/nordic/nrf52xxx/src/hal_i2c.c
@@ -556,7 +556,7 @@ hal_i2c_master_read(uint8_t i2c_num, struct hal_i2c_master_data *pdata,
 
 err:
     regs->TASKS_STOP = 1;
-    regs->SHORTS = TWI_SHORTS_BB_STOP_Msk;
+    regs->SHORTS = 0;
 
     if (regs->EVENTS_ERROR) {
         nrf_status = regs->ERRORSRC;