From ee7b9f200100107761e60ef71981e74d5b573ddb Mon Sep 17 00:00:00 2001 From: bsongis Date: Sun, 6 Jan 2013 11:34:48 +0000 Subject: [PATCH] [X9D] Soft switch not working. I remove the code for the moment. --- src/x9d/hal.h | 2 +- src/x9d/pwr_driver.cpp | 5 ++++- src/x9d/stm32_flash.ld | 13 ++++--------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/x9d/hal.h b/src/x9d/hal.h index 6dfa5f32d..d60d45f8c 100644 --- a/src/x9d/hal.h +++ b/src/x9d/hal.h @@ -168,7 +168,7 @@ // EEPROM and CAT5137 #define I2C_Speed 200000 -#define I2C_FLASH_PAGESIZE (64) +#define I2C_FLASH_PAGESIZE 64 #define I2C_EEPROM_ADDRESS 0xA0 #define I2C_CAT5137_ADDRESS 0x5C //0101110 diff --git a/src/x9d/pwr_driver.cpp b/src/x9d/pwr_driver.cpp index 63c1ec92c..b4f29c437 100644 --- a/src/x9d/pwr_driver.cpp +++ b/src/x9d/pwr_driver.cpp @@ -41,9 +41,12 @@ void soft_power_off() uint32_t check_soft_power() { - if (GPIO_ReadInputDataBit(GPIOPWR,PIN_PWR_STATUS) == Bit_RESET) +#if 0 + // TODO doesn't work :( + if (GPIO_ReadInputDataBit(GPIOPWR, PIN_PWR_STATUS) == Bit_RESET) return e_power_off; else +#endif return e_power_on; } diff --git a/src/x9d/stm32_flash.ld b/src/x9d/stm32_flash.ld index 9e297a396..647b9a192 100644 --- a/src/x9d/stm32_flash.ld +++ b/src/x9d/stm32_flash.ld @@ -3,8 +3,8 @@ ** ** File : stm32_flash.ld ** -** Abstract : Linker script for STM32F207IG Device with -** 1MByte FLASH, 128KByte SRAM +** Abstract : Linker script for STM32F205 Device with +** 0.5MByte FLASH, 128KByte SRAM ** ** Set heap size, stack size and stack location according ** to application requirements. @@ -42,7 +42,7 @@ _Min_Stack_Size = 0x200; /* required amount of stack */ /* Specify the memory areas */ MEMORY { - FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K + FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K } @@ -51,17 +51,12 @@ MEMORY SECTIONS { /* The startup code goes first into FLASH */ - .isr_vector : - { - . = ALIGN(4); - KEEP(*(.isr_vector)) /* Startup code */ - . = ALIGN(4); - } >FLASH /* The program code and other data goes into FLASH */ .text : { . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ *(.text) /* .text sections (code) */ *(.text*) /* .text* sections (code) */ *(.rodata) /* .rodata sections (constants, strings, etc.) */