Hello there.
As a senior electrical engineer, I have rich experience in ARM, Atmel and PIC series programming.
I mainly use Atmel Studio 7 to develop the Atmel series firmware.
I think you have an error in global interrupt configuration. At least, I can check your code to find out the mistake. Please feel free to message me.
Best regards,
Alexander.