- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello members.
I want to create a project shown in the attached file (H Pulse Count) and measure the H width of Input_Signal.
[Question]
1.How can I read the captured current count value?
2.Is there a register that saves the count value?
3.Is the component configure (Capture_Input = Falling Edge, Count Input = Rising Edge) correct?
Best Regards
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
1. You can use the Cy_TCPWM_Counter_GetCapture() API to read the captured count value.
2. Yes, TCPWMx_CNTy_CC register stores the captured count (x is the TCPWM group number - 0 or 1, and y is the counter number). Please use the API mentioned above instead of direct register reads since PSoC Creator may re-assign the Counter to a different TCPWM address when you make changes to the TopDesign schematic.
3. The logic looks ok to me. However, I'd recommend examining the following code example for component settings and API reference, which documents a similar technique used for frequency measurement:
CE220692 - PSoC 6 MCU: Frequency Measurement Using TCPWM
Please let me know if you have more questions.
Regards
Nidhin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
1. You can use the Cy_TCPWM_Counter_GetCapture() API to read the captured count value.
2. Yes, TCPWMx_CNTy_CC register stores the captured count (x is the TCPWM group number - 0 or 1, and y is the counter number). Please use the API mentioned above instead of direct register reads since PSoC Creator may re-assign the Counter to a different TCPWM address when you make changes to the TopDesign schematic.
3. The logic looks ok to me. However, I'd recommend examining the following code example for component settings and API reference, which documents a similar technique used for frequency measurement:
CE220692 - PSoC 6 MCU: Frequency Measurement Using TCPWM
Please let me know if you have more questions.
Regards
Nidhin