mbed library sources that still uses the stm standard peripheral library
Fork of mbed-src by
Revision 399:7a7127adb6e8, committed 2014-11-12
- Comitter:
- mbed_official
- Date:
- Wed Nov 12 09:15:06 2014 +0000
- Parent:
- 398:e6a80499f8a6
- Child:
- 400:7c3047f858e1
- Commit message:
- Synchronized with git revision 6737282994f53776e456c9036bc68c04cc36a665
Full URL: https://github.com/mbedmicro/mbed/commit/6737282994f53776e456c9036bc68c04cc36a665/
Targets: LPC11U68 - Fix GPIO init for specific pins
Changed in this revision
--- a/targets/cmsis/TARGET_NXP/TARGET_LPC13XX/TOOLCHAIN_IAR/startup_LPC1347.s Wed Nov 12 09:00:07 2014 +0000 +++ b/targets/cmsis/TARGET_NXP/TARGET_LPC13XX/TOOLCHAIN_IAR/startup_LPC1347.s Wed Nov 12 09:15:06 2014 +0000 @@ -33,13 +33,14 @@ SECTION .intvec:CODE:NOROOT(2) EXTERN __iar_program_start + EXTERN SystemInit PUBLIC __vector_table PUBLIC __vector_table_0x1c DATA __vector_table DCD sfe(CSTACK) ; Top of Stack - DCD __iar_program_start ; Reset Handler + DCD Reset_Handler ; Reset Handler DCD NMI_Handler ; NMI Handler DCD HardFault_Handler ; Hard Fault Handler DCD MemManage_Handler ; MPU Fault Handler @@ -91,7 +92,16 @@ ;; ;; Default interrupt handlers. ;; + THUMB + PUBWEAK Reset_Handler + SECTION .text:CODE:NOROOT:REORDER(2) +Reset_Handler + LDR R0, =SystemInit + BLX R0 + LDR R0, =__iar_program_start + BX R0 + PUBWEAK NMI_Handler PUBWEAK HardFault_Handler PUBWEAK MemManage_Handler
--- a/targets/hal/TARGET_NXP/TARGET_LPC11U6X/gpio_api.c Wed Nov 12 09:00:07 2014 +0000 +++ b/targets/hal/TARGET_NXP/TARGET_LPC11U6X/gpio_api.c Wed Nov 12 09:15:06 2014 +0000 @@ -31,11 +31,14 @@ if (!gpio_enabled) gpio_enable(); - int f = ((pin == P0_0) || - (pin == P0_10) || - (pin == P0_15)) ? (1) : (0); + int func = ((pin == P0_0) || // reset + (pin == P0_10) || // SWCLK + (pin == P0_12) || // TMS + (pin == P0_13) || // TDO + (pin == P0_14) || // TRST + (pin == P0_15)) ? (1) : (0); // SWDIO - pin_function(pin, f); + pin_function(pin, func); return (1UL << ((int)pin >> PIN_SHIFT & 0x1F)); }