Hello everyone,
Processor : Arm Cortex-m4For an experiment, I purposely triggering hard fault exception, by making T-bit in Execution Program Status Register to 0. The program execution control reaches hard fault handler.Inside the hard fault handler I was triggering SVC instruction using "__asm volatile ("SVC #0");". After executing this line, system goes reset. May I know the reason.
SVC from within a hard fault handler causes lockup on Cortex M cpus. I think the default behaviour on lockup is reset. I use Silabs EFM32 cpus, which have hardware options to not reset but simply stay in lockup. Yiu's Definitive Guide to M3/M4 includes commentary on lockup.
Thank you for your input, it was really helpful.