[riot-notifications] [RIOT-OS/RIOT] cpu/qn908x: ADC support (#15847)

benpicco notifications at github.com
Sun Jan 24 21:32:07 CET 2021


@benpicco commented on this pull request.

Looks good!
I feel like we should move forward on the new ADC API at some point, if you have any suggestions - #13247

> +config BOARD_HAS_ADC_PA06_CAP
+    bool
+    help
+         Indicates that the board has an external capacitor connected to PA06
+         which shold be used to stabilize the ADC reference voltage.
+         This external capacitor is optional but it can reduce the noise of the
+         ADC sampling.

I'm not sure if Kconfig is the right way to expose this, as this is a hardware property that will not change / is not user configurable.

I'd rather suggest an ordinary `define` like `NRF5X_ENABLE_DCDC` / `USE_VREG_BUCK`.

This documentation would then go inside a 

```C
#if DOXYGEN
/**
 * @brief Indicates that the board has an external capacitor connected to PA06
 *        which shold be used to stabilize the ADC reference voltage.
 *        This external capacitor is optional but it can reduce the noise of the
 *        ADC sampling.
 */
#define BOARD_HAS_ADC_PA06_CAP
#endif
```

block in the cpu header.

@leandrolanzieri what do you think?

> @@ -28,6 +28,29 @@
 extern "C" {
 #endif
 
+/**
+ * @name ADC configuration
+ *
+ * Names "An" are as described in the "Analog In" header on the PCB. All "An"
+ * inputs are configured referenced to 1.8V.

Are the ADC pins fixed? 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15847#pullrequestreview-574965219
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210124/88a8b726/attachment.htm>


More information about the notifications mailing list