summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIkjoon Jang <ikjn@google.com>2024-04-11 02:50:27 +0000
committerIkjoon Jang <ikjn@google.com>2024-04-11 08:37:02 +0000
commitc44feda797145384e1b5a8e506a9653ffcce842a (patch)
tree64c3fc23a26b516a94f972af7482409d6d62cfa5
parent58a6841e6e5da23e761254585774f126f87ecc1a (diff)
downloaduwb-c44feda797145384e1b5a8e506a9653ffcce842a.tar.gz
Apply chip-reset right before FW downloading
To explictly have FW downloading mode, Apply chip-reset right before FW download. Remove chip-reset from phTmlUwb_spi_open_and_configure(), which is called from phNxpUciHal_open(). Bug: 332268554 Test: HAL init from sr100 and sr200, akash daemon Merged-in: Ic6982ed1ee8f388d187660628c7caf7c65bdacdd Change-Id: Ic6982ed1ee8f388d187660628c7caf7c65bdacdd
-rw-r--r--halimpl/hal/sr1xx/NxpUwbChipSr1xx.cc4
-rw-r--r--halimpl/tml/phTmlUwb_spi.cc6
2 files changed, 2 insertions, 8 deletions
diff --git a/halimpl/hal/sr1xx/NxpUwbChipSr1xx.cc b/halimpl/hal/sr1xx/NxpUwbChipSr1xx.cc
index 32c65b0..f39ccae 100644
--- a/halimpl/hal/sr1xx/NxpUwbChipSr1xx.cc
+++ b/halimpl/hal/sr1xx/NxpUwbChipSr1xx.cc
@@ -566,6 +566,8 @@ tHAL_UWB_STATUS NxpUwbChipSr1xx::chip_init()
NXPLOG_UCIHAL_D("Start SR1XX FW download");
for (int i = 0; i < 5; i++) {
+ phTmlUwb_Chip_Reset();
+
status = phNxpUciHal_fw_download();
if (status == UWBSTATUS_SUCCESS) {
@@ -576,8 +578,6 @@ tHAL_UWB_STATUS NxpUwbChipSr1xx::chip_init()
break;
} else {
NXPLOG_UCIHAL_E("FW download failed, status= 0x%x, retry.", status);
- phTmlUwb_Chip_Reset();
- usleep(5000);
}
}
diff --git a/halimpl/tml/phTmlUwb_spi.cc b/halimpl/tml/phTmlUwb_spi.cc
index e51261f..132a990 100644
--- a/halimpl/tml/phTmlUwb_spi.cc
+++ b/halimpl/tml/phTmlUwb_spi.cc
@@ -60,12 +60,6 @@ tHAL_UWB_STATUS phTmlUwb_spi_open_and_configure(const char* pDevName, void** pLi
*pLinkHandle = (void*)((intptr_t)nHandle);
- /*Reset SR100 */
- phTmlUwb_Spi_Ioctl((void*)((intptr_t)nHandle), phTmlUwb_ControlCode_t::SetPower, 0);
- usleep(1000);
- phTmlUwb_Spi_Ioctl((void*)((intptr_t)nHandle), phTmlUwb_ControlCode_t::SetPower, 1);
- usleep(10000);
-
return UWBSTATUS_SUCCESS;
}