[riot-notifications] [RIOT-OS/RIOT] cpu/saml21: extend and fix exti configuration for saml21 variants (#10794)

Dylan Laduranty notifications at github.com
Mon Jan 21 14:34:46 CET 2019


dylad commented on this pull request.

This is absolute madness, debugging this...

> @@ -29,12 +29,45 @@ extern "C" {
 /**
  * @brief   Mapping of pins to EXTI lines, -1 means not EXTI possible
  */
+#if defined(CPU_MODEL_SAML21E18A) || defined(CPU_MODEL_SAML21E18B) || \
+    defined(CPU_MODEL_SAML21E17A) || defined(CPU_MODEL_SAML21E17B) || \
+    defined(CPU_MODEL_SAML21E16A) || defined(CPU_MODEL_SAML21E16B) || \
+    defined(CPU_MODEL_SAML21E15A) || defined(CPU_MODEL_SAML21E15B)
+static const int8_t exti_config[1][32] = {
+    { 0,  1,  2,  3,  4,  5,  6,  7, -1,  9, 10, 11, -1, -1, 14, 15,
+      0,  1,  2,  3, -1, -1,  6,  7, 12, 13, -1, 15, -1, -1, 10, 11},
+};
+#elif defined(CPU_MODEL_SAMR30E18A)
+static const int8_t exti_config[1][32] = {
+    { 0,  1, -1, -1,  4,  5,  6,  7, -1,  9, -1, -1, 12, 13, 14, 15,
+      0,  1,  2,  3, -1, -1, -1, -1, 12, 13, -1, 15,  8, -1, 10, 11},
+};

PA00, PA01, PA04, PA05, PA12, PA13 do not exist on SAMR30E
PA10, PA11, PA20 exist on SAMR30E (internally connected to RF)

>  static const int8_t exti_config[2][32] = {
+#if defined(CPU_MODEL_SAML21G18A) || defined(CPU_MODEL_SAML21G18B) || \
+    defined(CPU_MODEL_SAML21G17A) || defined(CPU_MODEL_SAML21G17B) || \
+    defined(CPU_MODEL_SAML21G16A) || defined(CPU_MODEL_SAML21G16B)

I think I misread one row. I rechecked and it looks good.

>      { 0,  1,  2,  3,  4,  5,  6,  7, -1,  9, 10, 11, 12, 13, 14, 15,
       0,  1,  2,  3,  4,  5,  6,  7, 12, 13, -1, 15, -1, -1, 10, 11},
     { 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
       0,  1, -1, -1, -1, -1,  6,  7, -1, -1, -1, -1, -1, -1, 14, 15},
+#elif defined(CPU_MODEL_SAMR30G18A)
+    { 0,  1, -1, -1,  4,  5,  6,  7, -1,  9, -1, -1, 12, 13, 14, 15,
+      0,  1,  2,  3, -1, -1,  6,  7, 12, 13, -1, 15,  8, -1, 10, 11},
+    {-1, -1,  2,  3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+     -1, -1, -1, -1, -1, -1,  6,  7, -1, -1, -1, -1, -1, -1, -1, -1},

PA10, PA11, PA20, PB0, PB15, PB16, PB17, PB30, PB31 exist internally (see table 6.2 of SAMR30 datasheet)

-- 
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/10794#pullrequestreview-194595123
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190121/dc9aefc3/attachment.html>


More information about the notifications mailing list