- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I have two problems on my project :
1/ I'm using a DigitalComp to stop a BasicCounter when a specific amount is reached => It does not work (the output rises at 32 instead of 26)
2/ When the DigitalComp rises, I planned to generate an interrupt through a Status_Reg => It does not work (nothing change)
I searched around to find some clues but without success ....
Can you help me ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1) The compare and the basic counter usually works. Check the reset pulse, it will be used at the rising edge of the clock pulse See page 4 of basic counter datasheet.
2) Why don't you connect the isr directly to the DigitalComp output (set to rising edge)
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bob,
1) You were right : everything worked fine once, then as the counter was not resetted it continued for one loop. I managed so the reset now is doing its job... The BasicCounter lacks of a configurable reset : synchronous or not !
2) I thought Status_Reg was mandatory to use cy_isr. I changed and connect it directly without success
No way to a have my interrupt callback entered.....
// ...
- In fact I added CyGlobalIntEnable;
And it works !
Thank you for your help
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Vive la patience!
You are always welcome, Harvey.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Harvey I was looking at you last design and I found that the Clock setting of the 1.5Mhz was incorrect and the clocks page had an ! on this clock. Also the design also has a Combinational loop on net 1211. For stability you should break up the net with a a clocked LUT, that would force it to be registered and sampled. Do a search in the forum for Combinational Loop. It was in Aug 4 2015.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello bobgoar,
Thank you for taking the time to check my project, and for your comments; I was out of the office this week but I will consider your comments.
Regards