AS7 - GCC C Compiler
Atmel ICE Debugger/Programmer
I have a perplexing problem that I need some troubleshooting help.
I wrote an application using existing source that has been successfully used in other applications. The purpose of the application was for some simple eeprom memory testing. The problem regards a Timer overflow interrupt that *may* work properly depending on how the microcontroller (xmega128A3U) is programmed.
Should the controller be programmed using the Atmel ICE (using PDI with AS7) the application runs as expected. The Timer ovf interrupt works. (there is a blinking LED as confirmation).
This doesn't work:
When the microcontroller is programmed using my boot loader, the app runs fine with the exception that the timer interrupt is not firing. (No LED blink). The application is using the USART interrupt and that works as expected. Memory testing data gets transmitted through the USART, so all of this works as expected. Only the Timer int is not firing (or it *appears* to not be firing).
Here are the steps that I have done at this point to troubleshoot the issue.
1 Program the microcontroller with the PDI interface using the Atmel ICE. Test. App runs as expected.
2 Read back the entire FLASH program memory using the Atmel ICE and save the results to a binary file.
3 Program the microcontroller using the Boot loader and repeat the read back to a file. Test, int not working
4 Test both files for a binary match. No problems, files matched exactly.
5 Modified the application so that the PMIC and TIMER.CNT, etc. registers are reported through the USART. I was curious if the PMIC interrupt table select bit was reset when jumping to the main application. I could find nothing out of whack with the interrupt enable bits or PMIC interrupt enable bits.
6 Modified the application to use a *different* timer and changed the interrupt vector as needed. Problem persists.
7 Erased just the boot loader memory after programming the microcontroller using the boot loader. Performed a power up reset and got the same results, the Timer Int will not fire.
8 Checked the listing file (LSS) to see if the timer interrupt vector was correct but saw nothing out of the ordinary.
I have absolutely no idea WHY I'm seeing this problem.
Any suggestions from fellow 'freaks' would be appreciated.