diff options
Diffstat (limited to 'software/mpu/board/board.h')
-rw-r--r-- | software/mpu/board/board.h | 43 |
1 files changed, 13 insertions, 30 deletions
diff --git a/software/mpu/board/board.h b/software/mpu/board/board.h index 4839948..53a5e37 100644 --- a/software/mpu/board/board.h +++ b/software/mpu/board/board.h @@ -30,7 +30,6 @@ /*
* Setup for mur.sat MPU board.
- * copy from setup for Olimex STM32-P103 proto board.
*/
/*
@@ -42,7 +41,7 @@ /*
* Board frequencies.
*/
-#define STM32_LSECLK 32768
+#define STM32_LSECLK 0
#define STM32_HSECLK 8000000
/*
@@ -53,17 +52,8 @@ /*
* IO pins assignments.
*/
-#define GPIOA_BUTTON 0
-#define GPIOA_SPI1NSS 4
-
-#define GPIOB_SPI2NSS 12
-
-#define GPIOC_USB_P 4
-#define GPIOC_MMCWP 6
-#define GPIOC_MMCCP 7
-#define GPIOC_CAN_CNTL 10
-#define GPIOC_USB_DISC 11
-#define GPIOC_LED 12
+#define GPIOA_LED 8
+#define GPIOA_USB_DISC 13
/*
* I/O ports initial setup, this configuration is established soon after reset
@@ -92,37 +82,30 @@ /*
* Port A setup.
* Everything input with pull-up except:
- * PA0 - Normal input (BUTTON).
* PA2 - Alternate output (USART2 TX).
* PA3 - Normal input (USART2 RX).
+ * PA8 - Push Pull output (LED).
+ * PA13 - Push Pull output (USB DISC).
*/
-#define VAL_GPIOACRL 0x88884B84 /* PA7...PA0 */
-#define VAL_GPIOACRH 0x88888888 /* PA15...PA8 */
+#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */
+#define VAL_GPIOACRH 0x88388883 /* PA15...PA8 */
#define VAL_GPIOAODR 0xFFFFFFFF
/*
* Port B setup.
* Everything input with pull-up except:
- * PB13 - Alternate output (MMC SPI2 SCK).
- * PB14 - Normal input (MMC SPI2 MISO).
- * PB15 - Alternate output (MMC SPI2 MOSI).
*/
#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */
-#define VAL_GPIOBCRH 0xB4B88888 /* PB15...PB8 */
+#define VAL_GPIOBCRH 0x88888888 /* PB15...PB8 */
#define VAL_GPIOBODR 0xFFFFFFFF
/*
* Port C setup.
* Everything input with pull-up except:
- * PC4 - Normal input because there is an external resistor.
- * PC6 - Normal input because there is an external resistor.
- * PC7 - Normal input because there is an external resistor.
- * PC10 - Push Pull output (CAN CNTRL).
- * PC11 - Push Pull output (USB DISC).
- * PC12 - Push Pull output (LED).
+ * nothing here
*/
-#define VAL_GPIOCCRL 0x44848888 /* PC7...PC0 */
-#define VAL_GPIOCCRH 0x88833388 /* PC15...PC8 */
+#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */
+#define VAL_GPIOCCRH 0x88888888 /* PC15...PC8 */
#define VAL_GPIOCODR 0xFFFFFFFF
/*
@@ -162,12 +145,12 @@ /*
* USB bus activation macro, required by the USB driver.
*/
-#define usb_lld_connect_bus(usbp) palClearPad(GPIOC, GPIOC_USB_DISC)
+#define usb_lld_connect_bus(usbp) palClearPad(GPIOA, GPIOA_USB_DISC)
/*
* USB bus de-activation macro, required by the USB driver.
*/
-#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOC, GPIOC_USB_DISC)
+#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOA, GPIOA_USB_DISC)
#if !defined(_FROM_ASM_)
#ifdef __cplusplus
|