diff options
Diffstat (limited to 'platform/ext/target/cypress/psoc64/spm_hal.c')
-rw-r--r-- | platform/ext/target/cypress/psoc64/spm_hal.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/ext/target/cypress/psoc64/spm_hal.c b/platform/ext/target/cypress/psoc64/spm_hal.c index 350845a7fa..23eb65573d 100644 --- a/platform/ext/target/cypress/psoc64/spm_hal.c +++ b/platform/ext/target/cypress/psoc64/spm_hal.c @@ -28,6 +28,7 @@ #include "cy_ipc_drv.h" #include "cy_prot.h" #include "pc_config.h" +#include "driver_dap.h" /* Get address of memory regions to configure MPU */ extern const struct memory_region_limits memory_regions; @@ -215,6 +216,14 @@ uint32_t tfm_spm_hal_get_ns_entry_point(void) void tfm_spm_hal_boot_ns_cpu(uintptr_t start_addr) { smpu_print_config(); + + if (cy_access_port_control(CY_CM4_AP, CY_AP_EN) == 0) { + /* The delay is required after Access port was enabled for + * debugger/programmer to connect and set TEST BIT */ + Cy_SysLib_Delay(100); + printf("Enabled CM4_AP DAP control\n"); + } + printf("Starting Cortex-M4 at 0x%x\r\n", start_addr); Cy_SysEnableCM4(start_addr); } |