You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "michallenc (via GitHub)" <gi...@apache.org> on 2023/02/25 16:51:13 UTC
[GitHub] [nuttx] michallenc opened a new pull request, #8655: samv7: add support for ADC conversion triggering with PWM
michallenc opened a new pull request, #8655:
URL: https://github.com/apache/nuttx/pull/8655
## Summary
This commit enhances ADC and PWM drivers with option to trigger ADC conversion with events generated by PWM comparison units.
The comparison value is currently set from the configuration, future enhcement could be an additoon of IOCTL command that would handle this kind of stuff.
## Impact
SAMv7 MCU only.
## Testing
Tested on a custom board with SAMv7 MCU.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] acassis commented on a diff in pull request #8655: samv7: add support for ADC conversion triggering with PWM
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on code in PR #8655:
URL: https://github.com/apache/nuttx/pull/8655#discussion_r1117959771
##########
arch/arm/src/samv7/Kconfig:
##########
@@ -656,6 +700,94 @@ config SAMV7_PWM0_CH3_COMP
endif
+menu "PWM Comparison units"
+
+config SAMV7_PWM0_TRIG0
+ int "PWM0 Comparison Unit 0 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM0_TRIG1
+ int "PWM0 Comparison Unit 1 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM0_TRIG2
+ int "PWM0 Comparison Unit 2 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM0_TRIG3
+ int "PWM0 Comparison Unit 3 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM0_TRIG4
+ int "PWM0 Comparison Unit 4 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM0_TRIG5
+ int "PWM0 Comparison Unit 5 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM0_TRIG6
+ int "PWM0 Comparison Unit 6 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM0_TRIG7
+ int "PWM0 Comparison Unit 7 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM
+
+endmenu
+
+config SAMV7_PWM0_EVENT0
+ bool "Genrate trigger on Event Line 0"
Review Comment:
```suggestion
bool "Generate trigger on Event Line 0"
##########
arch/arm/src/samv7/Kconfig:
##########
@@ -715,6 +847,92 @@ config SAMV7_PWM1_CH3_COMP
endif
+menu "PWM Comparison units"
+
+config SAMV7_PWM1_TRIG0
+ int "PWM1 Comparison Unit 0 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM1_TRIG1
+ int "PWM1 Comparison Unit 1 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM1_TRIG2
+ int "PWM1 Comparison Unit 2 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM1_TRIG3
+ int "PWM1 Comparison Unit 3 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM1_TRIG4
+ int "PWM1 Comparison Unit 4 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM1_TRIG5
+ int "PWM1 Comparison Unit 5 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM1_TRIG6
+ int "PWM1 Comparison Unit 6 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM1_TRIG7
+ int "PWM1 Comparison Unit 7 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+endmenu
+
+config SAMV7_PWM1_EVENT0
+ bool "Genrate trigger on Event Line 0"
Review Comment:
```suggestion
bool "Generate trigger on Event Line 0"
##########
arch/arm/src/samv7/Kconfig:
##########
@@ -656,6 +700,94 @@ config SAMV7_PWM0_CH3_COMP
endif
+menu "PWM Comparison units"
+
+config SAMV7_PWM0_TRIG0
+ int "PWM0 Comparison Unit 0 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM0_TRIG1
+ int "PWM0 Comparison Unit 1 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM0_TRIG2
+ int "PWM0 Comparison Unit 2 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM0_TRIG3
+ int "PWM0 Comparison Unit 3 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM0_TRIG4
+ int "PWM0 Comparison Unit 4 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM0_TRIG5
+ int "PWM0 Comparison Unit 5 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM0_TRIG6
+ int "PWM0 Comparison Unit 6 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM0_TRIG7
+ int "PWM0 Comparison Unit 7 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM
+
+endmenu
+
+config SAMV7_PWM0_EVENT0
+ bool "Genrate trigger on Event Line 0"
+ default n
+ ---help---
+ PWM allows trigger generation on event lines. This can be
+ used for ADC conversion triggering for example. It is
+ necessary to set a comparison unit in order to generate an
+ event.
+
+config SAMV7_PWM0_EVENT1
+ bool "Genrate trigger on Event Line 1"
Review Comment:
```suggestion
bool "Generate trigger on Event Line 1"
##########
arch/arm/src/samv7/Kconfig:
##########
@@ -715,6 +847,92 @@ config SAMV7_PWM1_CH3_COMP
endif
+menu "PWM Comparison units"
+
+config SAMV7_PWM1_TRIG0
+ int "PWM1 Comparison Unit 0 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM1_TRIG1
+ int "PWM1 Comparison Unit 1 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM1_TRIG2
+ int "PWM1 Comparison Unit 2 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM1_TRIG3
+ int "PWM1 Comparison Unit 3 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM1_TRIG4
+ int "PWM1 Comparison Unit 4 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM1_TRIG5
+ int "PWM1 Comparison Unit 5 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM1_TRIG6
+ int "PWM1 Comparison Unit 6 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+config SAMV7_PWM1_TRIG7
+ int "PWM1 Comparison Unit 7 value"
+ range 0 100
+ default 0
+ ---help---
+ Timer value on which the comparison unit generates
+ an event. Value is in percentages.
+
+endmenu
+
+config SAMV7_PWM1_EVENT0
+ bool "Genrate trigger on Event Line 0"
+ default n
+ ---help---
+ PWM allows trigger generation on event lines. This can be
+ used for ADC conversion triggering for example. It is
+ necessary to set a comparison unit in order to generate an
+ event.
+
+config SAMV7_PWM1_EVENT1
+ bool "Genrate trigger on Event Line 1"
Review Comment:
```suggestion
bool "Generate trigger on Event Line 1"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] xiaoxiang781216 merged pull request #8655: samv7: add support for ADC conversion triggering with PWM
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #8655:
URL: https://github.com/apache/nuttx/pull/8655
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [nuttx] michallenc commented on pull request #8655: samv7: add support for ADC conversion triggering with PWM
Posted by "michallenc (via GitHub)" <gi...@apache.org>.
michallenc commented on PR #8655:
URL: https://github.com/apache/nuttx/pull/8655#issuecomment-1445220909
Thanks Alan @acassis, good catch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org