1 of 1 people found this helpful
You need to call the ReadStatusRegister() API for the timer. This will clear the interrupt so that another one may happen.
Additionally you sholg declare
volatile uint32 systickcounter = 0;
Thanx for the answer. Now it works.
But now I have another problem. Maybe you can tell me where it is documentated. I cannot find it.
Maybe I'm to stupid. But my boss is very upset cos I spent 4h to find this problem.
He blames me why I don't looked in the documents and wasted his money. But I cannot find it.
And I need the documenataion for my class B documenation.
I searched again and again in the timer documenation... but nothing...
I've also used NXP (Freescale) MCUs a lot, and I still like them.
But PSoC has its own beauty (and pit holes and traps)...
Anyway, You can access datasheet of a particular component
(1) when you select a component from the Component Catalog
In the right-bottom pane, typical component is shown, and there at the left-upper corner
link to "Datasheet" is located.
(2) or if you have inserted the component in the schematic, double clicking the component opens the configuration dialog
In the left-bottom button is "Datasheet"
Now when you open the Datasheet
In the left, there is an index.
Although I recommend you to read through (or skim through) all,
but for the time being, let's find the suspect.
So I'd click the index "Application Programming Interface"
Now list of available application program interface, aka API is shown.
Again, it won't harm if you read at least the Functions table and Descriptions.
Now let's click the Timer_ReadStatusRegister()
Finally we caught the suspect, Timer_ReadStatusRegister(void)
And its "Side Effects, it is written.
Yes, I agree, that it is not clear nor friendly, but this is the way they implemented the component.
There are other components with "ClearInterrupt()" or "ClearPending()", but unfortunately this one does not.
thank you for your comprehensive answer. I know these ways to get the info.
Actually the way to get info is very good.
But in this case it is not clear. The interrupt flag is automaticly cleared but the TC bit not.
Even not if I check the "Interrupt on TC".
This is not well considered.
But anyway. I gave up the hopness to have find a new system what I can programm without these hours
of wasted time :-) Finally everywhere the same. The brand doesn't matter.
At least the forum here is very helpful and you get fast an answer.
So thanx a lot again JoMe !!!
Spending 4 hours to learn a new concept in Programmable Systems is a little bit too few. The timer component is not quite easy to understand and it took me some more hours to fully understand it. Even now I have to look into the documenttion to be on the safe side.
I am working with PSoCs for more than 12 years now and I can assure you that these devices have lots of features most of the other devices miss. You could show this to your boss and show him that the datasheet for the timer only has 35 pages.
I meant 4h for this one issue ;-)