From 8ac4838b92fe39266ca432299e22cf6f2efea5bb Mon Sep 17 00:00:00 2001 From: Brett Nicholas <7547222+bigbrett@users.noreply.github.com> Date: Sun, 29 Mar 2026 20:07:27 -0600 Subject: [PATCH] tc3: disable/capture bus errors for lifetime of bootloader --- hal/aurix_tc3xx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hal/aurix_tc3xx.c b/hal/aurix_tc3xx.c index 99010f9e..16255607 100644 --- a/hal/aurix_tc3xx.c +++ b/hal/aurix_tc3xx.c @@ -308,6 +308,9 @@ void hal_init(void) WOLFBOOT_VERSION); #endif #endif /* DEBUG_UART */ + + /* Catch bus errors due to ECC faults. Reenabled on application boot */ + TC3_CAPTURE_BUS_ERRORS(); } /* This function is called by the bootloader at a very late stage, before @@ -338,6 +341,9 @@ void hal_prepare_boot(void) /* Undo pre-init*/ tc3tc_UnpreInit(); #endif + + /* Reenable bus trap/exception masking */ + TC3_ENFORCE_BUS_ERRORS(); } #ifndef WOLFBOOT_AURIX_TC3XX_HSM