aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlamy Liu <alamy.liu@cypress.com>2020-01-09 18:03:57 -0800
committerDavid Hu <david.hu@arm.com>2020-01-21 08:14:58 +0000
commit2b632e2886de711e965ecee0e5b84e1ceb249259 (patch)
tree366d4c6d356022ec21b320f59387dee6f9182bbb
parent5d03ca85329bc4c784f4880b18588d6d6cca76fc (diff)
downloadtrusted-firmware-m-2b632e2886de711e965ecee0e5b84e1ceb249259.tar.gz
Platform: PSoC64: S-IRQ: Initialize Interrupt for TFM_TIMER0_IRQ
Change-Id: I2c6d57b5f4993ddddaa5ee540ca82f11f0f4c18c Signed-off-by: Alamy Liu <alamy.liu@cypress.com>
-rw-r--r--platform/ext/target/cypress/psoc64/target_cfg.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/platform/ext/target/cypress/psoc64/target_cfg.c b/platform/ext/target/cypress/psoc64/target_cfg.c
index 302db9980..aba45dbbe 100644
--- a/platform/ext/target/cypress/psoc64/target_cfg.c
+++ b/platform/ext/target/cypress/psoc64/target_cfg.c
@@ -99,11 +99,22 @@ void system_reset_cfg(void)
extern void Cy_Platform_Init(void);
void platform_init(void)
{
+#ifdef TFM_ENABLE_IRQ_TEST
+ cy_en_sysint_status_t rc;
+#endif
+
Cy_PDL_Init(CY_DEVICE_CFG);
init_cycfg_all();
Cy_Platform_Init();
+#ifdef TFM_ENABLE_IRQ_TEST
+ rc = Cy_SysInt_Init(&CY_TCPWM_NVIC_CFG_S, TFM_TIMER0_IRQ_Handler);
+ if (rc != CY_SYSINT_SUCCESS) {
+ printf("WARNING: Fail to initialize timer interrupt (IRQ TEST might fail)!\n");
+ }
+#endif /* TFM_ENABLE_IRQ_TEST */
+
/* make sure CM4 is disabled */
if (CY_SYS_CM4_STATUS_ENABLED == Cy_SysGetCM4Status()) {
Cy_SysDisableCM4();