- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
Sorry for the thousands of posts but the CYBLE keeps fooling me ...
I followed the example here: http://www.cypress.com/documentation/code-examples/ce95385-tcpwm-timercounter-operation-psoc-4?sourc... . I can't find any difference to my example and it drives me crazy. I also tried doing all the configuration 100% programmatically. Didn't work.
I am running out of stuff to try. I tested if the counter even counts and it doesn't. I checked every function in the datasheet and still can't figure it out ... I don't know if the clock might be broken ...
Thanks in advance for any help!
Peace Noah
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ohh so I need to start the clock? I thought about that, but in the creator it said "start on reset" for that clock ... Or am I mistaken? Running the same Creator version here 🙂
Thanks for your help, Bob!
Peace Noah
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Noah I start all components I think this is the best method to insure that they work as expected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Adding the clk_Start() didn't help at all, unfortunately ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Noah, as usual: Can you please post your complete project, so that we all can have a look at all of your settings? To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In your interrupt handler you should clear the interrupt cause, the timer interrupt.
tmr_switch_ClearInterrupt(tmr_switch_GetInterruptSource()); // Remove interrupt cause
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, Bob, there is not even one interrupt occuring. That is my problem. I have a Breakpoint in the ISR and it doesn't stop once. Also the counter doesn't count at all (reading it in the while(1) in the main()). Clearing it is only a second step, but thanks for that one anyways 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Noah I have found two things in the timer configuration that is different than the example I sent you. The timer was set for a down counter and the interrupt was set to a check mark in the box compare /capture count. In the box on the right side of the timer configuration settings the capture box was checked. Also on the compare/capture pull down select box was set to capture. Check the PDF file in the example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Couldn't get your timer to work either.
Do the following: Because I was informed that you used an old version of some components(I have TCPWM 2.10) you should use Creator -> Project -> Update Components.
Remove the timer, and insert a new one, change the name to the original and it will run.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@bobgoar well, that doesn't matter. the capture is just a second feature that isn't influenced by the first one 🙂
@Bob Marlowe I actually updated all components in the meantime. But it told me that the timer was on the newest version yet. Removing and adding it again worked! Why so? Do you know? Well I just wasted 5 hrs on a broken component 😄 Life's good 🙂 (I love debugging, no joke)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can assure you: You will not die 5 hrs earlier. At least you learnt patience 😉
Probably a data error in the Creator file. So the "broken" component could be repaired. I have seen an error like yours with a GPIO-pin, made me gnaw the keyboard...
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Bob When I updated the components it updated the Ble component to 4.2 and it was labeled Proto type and had a orange background. . BobGoar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Bob: It updated to v 3.0 for BLE 4.2. Read datasheet "Component changes" to know it is a Beta release.
Bob