summaryrefslogtreecommitdiff
path: root/source/hal/source/components/npu_ta
diff options
context:
space:
mode:
Diffstat (limited to 'source/hal/source/components/npu_ta')
-rw-r--r--source/hal/source/components/npu_ta/CMakeLists.txt4
-rw-r--r--source/hal/source/components/npu_ta/ethosu_ta_init.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/source/hal/source/components/npu_ta/CMakeLists.txt b/source/hal/source/components/npu_ta/CMakeLists.txt
index 6f7dac5..73bbef7 100644
--- a/source/hal/source/components/npu_ta/CMakeLists.txt
+++ b/source/hal/source/components/npu_ta/CMakeLists.txt
@@ -36,6 +36,10 @@ if (NOT DEFINED SOURCE_GEN_DIR)
set(SOURCE_GEN_DIR ${CMAKE_BINARY_DIR}/generated/ta)
endif()
+# Base address definitions for the two timing adapters (platform should override these):
+set(TA0_BASE "0x58103000" CACHE STRING "Ethos-U NPU timing adapter 0")
+set(TA1_BASE "0x58103200" CACHE STRING "Ethos-U NPU timing adapter 1")
+
## If a TA config file is provided, we generate a settings file
if (DEFINED TA_CONFIG_FILE)
include(${TA_CONFIG_FILE})
diff --git a/source/hal/source/components/npu_ta/ethosu_ta_init.c b/source/hal/source/components/npu_ta/ethosu_ta_init.c
index 323ab73..f3c95b6 100644
--- a/source/hal/source/components/npu_ta/ethosu_ta_init.c
+++ b/source/hal/source/components/npu_ta/ethosu_ta_init.c
@@ -42,13 +42,13 @@ int arm_ethosu_timing_adapter_init(void)
.histbin = TA0_HISTBIN,
.histcnt = TA0_HISTCNT};
- if (0 != ta_init(&ta_0, TA0_BASE))
- {
+ if (0 != ta_init(&ta_0, TA0_BASE)) {
printf_err("TA0 initialisation failed\n");
return 1;
}
ta_set_all(&ta_0, &ta_0_settings);
+ info("TA0 values set\n");
#endif /* defined (TA0_BASE) */
#if defined(TA1_BASE)
@@ -76,6 +76,7 @@ int arm_ethosu_timing_adapter_init(void)
}
ta_set_all(&ta_1, &ta_1_settings);
+ info("TA1 values set\n");
#endif /* defined (TA1_BASE) */
return 0;