Hi Scott,
Im trying to optimize my code by lowering the CPU load. I thought of using the internal Timer which was provided in your old version PGA970 1.5.
I realized that in startup_ccs.c the M0 System timer handler is beeing refferenced to. Hoping that these mention are responisble for calling the handler i replaced this line (out of the latest version)
IntDefaultHandler, // The M0 System timer handler
with the following code of the 1.5 release
#if (SYST_TESTING == 1)
SYST_Handler, // The M0 System timer handler
#else
IntDefaultHandler, // The M0 System timer handler
#endif
Also I implemented a new pga970_syst.c and pga970_syst.h and included the .h file. Also i enabled SYST_TESTING in the pga970_switch.h file. From now on every command in the syst.c file should be working
Normally you could use this command for example: SYST_Config(0x0000FFFF,0x00000007); which sets a reload value and enables the clock. The CVR register now counts down from the reload value to zero. Hitting zero sets the 16th bit in SYST_CSR (the countflag bit) and resets to the determined reload value. Aditionally the CSR countflag bit gets reset everytime it is accesed. All of the described works as intended. Now to my Question:
My goal is that whenever the countflag is set in the CSR the defined interrupt SYST_Handler shall be called. However if I understood all the datasheets correctly that should be the case with all the things I did. Calling the SYST_Handler manually into my main works fine but it just doesnt get triggered and the Countflagbit remains set meaning there seems to be some kind of trigger missing which should react to the countflag bit.
Regards,
Paul