You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/06/15 11:15:43 UTC
[GitHub] [incubator-nuttx] retogaeh opened a new pull request #3924: stm32h7 fix for adc to handle overrun and the DR's fifo
retogaeh opened a new pull request #3924:
URL: https://github.com/apache/incubator-nuttx/pull/3924
## Summary
* port didn't know about data-register fifo
* port didn't handle overrun condition
* driver could get stuck if interrupts were skipped due to saturation
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #3924: stm32h7 fix for adc to handle overrun and the DR's fifo
Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #3924:
URL: https://github.com/apache/incubator-nuttx/pull/3924#discussion_r651988399
##########
File path: arch/arm/src/stm32h7/stm32_adc.c
##########
@@ -1833,7 +1837,7 @@ static int adc_interrupt(FAR struct adc_dev_s *dev, uint32_t adcisr)
FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv;
int32_t value;
- /* Identifies the interruption AWD or OVR */
+ /* Identifies the interruption AWD */
Review comment:
```suggestion
/* Identifies the AWD interrupt */
```
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] retogaeh edited a comment on pull request #3924: stm32h7 fix for adc to handle overrun and the DR's fifo
Posted by GitBox <gi...@apache.org>.
retogaeh edited a comment on pull request #3924:
URL: https://github.com/apache/incubator-nuttx/pull/3924#issuecomment-862051569
> @retogaeh - This looks good.
>
> Once we see an overrun, how would one throttle the interrupt rate?
> Do we need an IOCTL to adjust the rate?
@davids5 Thanks for your input. We got into this due to a very costly ISR for the DW1000 during compliance. The unmodified ISR takes much longer than the conversion of four ADC channels. The FIFO itself already resolved our situation. So haven't had to think about throttling the interrupt rate.
Since this was a compliance related issue which required some extra stress, we expect that things are much calmer in the field.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #3924: stm32h7 fix for adc to handle overrun and the DR's fifo
Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #3924:
URL: https://github.com/apache/incubator-nuttx/pull/3924#discussion_r651985035
##########
File path: drivers/analog/adc.c
##########
@@ -420,6 +435,23 @@ static int adc_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
return ret;
}
+/****************************************************************************
+ * Name: adc_reset
+ ****************************************************************************/
+
+static int adc_reset(FAR struct adc_dev_s *dev)
+{
+ /* Set overrun flag to give read a chance to recover */
+
+ dev->ad_isovr = true;
+
+ /* No need to notify here. The adc_receive callback will be called next.
+ * If an adc overrun occurs then there must be at least one conversion.
Review comment:
```suggestion
* If an ADC overrun occurs then there must be at least one conversion.
```
nit: ADC acronym in all caps, for consistency.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] retogaeh commented on pull request #3924: stm32h7 fix for adc to handle overrun and the DR's fifo
Posted by GitBox <gi...@apache.org>.
retogaeh commented on pull request #3924:
URL: https://github.com/apache/incubator-nuttx/pull/3924#issuecomment-861414451
@davids5 Hello David, as far as I know are you also working with the stm32h7. Would be create if you could have a look at our pull request and if required to validate it. Appreciate it, thanks.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] retogaeh commented on pull request #3924: stm32h7 fix for adc to handle overrun and the DR's fifo
Posted by GitBox <gi...@apache.org>.
retogaeh commented on pull request #3924:
URL: https://github.com/apache/incubator-nuttx/pull/3924#issuecomment-862051569
> @retogaeh - This looks good.
>
> Once we see an overrun, how would one throttle the interrupt rate?
> Do we need an IOCTL to adjust the rate?
We got into this due to a very costly ISR for the DW1000 during compliance. The unmodified ISR takes much longer than the conversion of four ADC channels. The FIFO itself already resolved our situation. So haven't had to think about throttling the interrupt rate.
Since this was a compliance related issue which required some extra stress, we expect that things are much calmer in the field.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org