- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings,
Im starting to learn programming PSoC 5 and i'm blocked in one functionality. Maybe you guys can help me.
The test i made is trying to read the status signals from the StatusRegister hw block. I can read polling the signals and send the values to uart-usb console just fine.
If i use same StatusRegister, configured as Generate Interrupt and in consequence i enable interrupt api too, using the same status signals read api, i get no result.
The idea i want to implement is:
Store 4 digital signals in the StatusRegister, once i have one of them at high level, generate an interrupt and read the status signals of the register and decide what to do depending on this value.
Thanks in advance!
BestRegards.
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No need for ORing, the status register is able to create an interrupt. As the datasheet says you will need to call StatusReg_WriteMask() and StatusReg_InterruptEnable() to setup the component.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome in the forum.
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
You can OR the 4 signals together, and use the result as trigger for the interrupt.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No need for ORing, the status register is able to create an interrupt. As the datasheet says you will need to call StatusReg_WriteMask() and StatusReg_InterruptEnable() to setup the component.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for the comments.
I tried this method but if i have 4 status signals and in the initial case of configuring the int mask for all of them.Once i have one signal active at high, the interrupt its triggered.
Afterwards, in the ISR function, i must configure for each status bit, the corresponding interrupt mask and then, wait for another interrupt trigger in order to know which of the status bits was really changed.
Thanks,
BR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But with the OR you don't get as many interrupts (only when the actual result changes, but not necessarily for each pin change)