The XMOS Try/Catch library https://www.xmos.com/support/libraries/lib_trycatch can be used to catch exceptions.
Handling exceptions correctly avoids the core sitting in the trap handler.
Example of catching an application thrown exception: https://github.com/xmos/lib_trycatch/bl ... rc/main.xc
Example of catching a hardware exception:
https://github.com/xmos/lib_trycatch/bl ... rc/main.xc
The limitation is that lib_trycatch won’t attempt to free any resources allocated inside the try block or return any variables to their original state in the event of an exception being raised. See https://github.com/xmos/lib_trycatch/bl ... README.rst for more details.
Notes on using lib_trycatch
Thanks John