paparazzi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paparazzi-commits] [5327] removed setting all pins as analog input.


From: antoine drouin
Subject: [paparazzi-commits] [5327] removed setting all pins as analog input.
Date: Thu, 12 Aug 2010 00:37:44 +0000

Revision: 5327
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5327
Author:   poine
Date:     2010-08-12 00:37:44 +0000 (Thu, 12 Aug 2010)
Log Message:
-----------
removed setting all pins as analog input. Seemed to solve some initilaization 
issues on some chip. Would need to look more into that

Modified Paths:
--------------
    paparazzi3/trunk/sw/airborne/stm32/init_hw.h

Modified: paparazzi3/trunk/sw/airborne/stm32/init_hw.h
===================================================================
--- paparazzi3/trunk/sw/airborne/stm32/init_hw.h        2010-08-12 00:35:28 UTC 
(rev 5326)
+++ paparazzi3/trunk/sw/airborne/stm32/init_hw.h        2010-08-12 00:37:44 UTC 
(rev 5327)
@@ -38,6 +38,18 @@
 
 #include BOARD_CONFIG
 
+/* should probably not be here
+ *   a couple of macros to use the rev instruction
+ */
+#define MyByteSwap16(in, out) {                        \
+    asm volatile (                             \
+                 "rev16        %0, %1\n\t"     \
+                 : "=r" (out)                  \
+                 : "r"(in)                     \
+                 );                            \
+  }
+
+
 #ifdef PERIPHERALS_AUTO_INIT
 #ifdef USE_LED
 #include "led.h"
@@ -101,13 +113,18 @@
 #endif /* HSE_TYPE_EXT_CLK */
    /* Set the Vector Table base location at 0x08000000 */
   NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0);
+
+
+#if 0
   /* Configure all unused GPIO port pins in Analog Input mode (floating input
      trigger OFF), this will reduce the power consumption and increase the 
device
      immunity against EMI/EMC 
*************************************************/
   RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB |
                          RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD |
                          RCC_APB2Periph_GPIOE, ENABLE);
+#endif
   
+#if 0
   GPIO_InitTypeDef GPIO_InitStructure;
   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
@@ -116,19 +133,15 @@
   GPIO_Init(GPIOC, &GPIO_InitStructure);
   GPIO_Init(GPIOD, &GPIO_InitStructure);
   GPIO_Init(GPIOE, &GPIO_InitStructure);
+#endif
 
 #if 0
-  RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB |
-                         RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD |
-                         RCC_APB2Periph_GPIOE, DISABLE);  
-#endif
-
   RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA |
                         RCC_APB2Periph_GPIOB |
-                        RCC_APB2Periph_GPIOC |
+                         RCC_APB2Periph_GPIOC |
                         RCC_APB2Periph_GPIOD |
-                        RCC_APB2Periph_AFIO, ENABLE);
-  
+                         RCC_APB2Periph_GPIOE, DISABLE);  
+#endif
 
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]