lib
Fork of mbed-dev by
Revision 125:e632577a484c, committed 2016-05-09
- Comitter:
- mbed_official
- Date:
- Mon May 09 18:45:11 2016 +0100
- Parent:
- 124:6a4a5b7d7324
- Child:
- 126:4d7eabe73831
- Commit message:
- Synchronized with git revision 7b4f4fc40d0b72877a32d9e786ac4ddd76927c92
Full URL: https://github.com/mbedmicro/mbed/commit/7b4f4fc40d0b72877a32d9e786ac4ddd76927c92/
Changed the heap size to the correct MCU heap size for SRAM1
Changed in this revision
--- a/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/TOOLCHAIN_ARM_MICRO/startup_stm32l476xx.s Mon May 09 18:30:12 2016 +0100 +++ b/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/TOOLCHAIN_ARM_MICRO/startup_stm32l476xx.s Mon May 09 18:45:11 2016 +0100 @@ -48,7 +48,7 @@ ; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> ; </h> -Heap_Size EQU 0x8000 ; 32KB +Heap_Size EQU 0x18000 ; 96KB AREA HEAP, NOINIT, READWRITE, ALIGN=3 EXPORT __heap_base
--- a/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/TOOLCHAIN_IAR/stm32l476xx.icf Mon May 09 18:30:12 2016 +0100 +++ b/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_DISCO_L476VG/TOOLCHAIN_IAR/stm32l476xx.icf Mon May 09 18:45:11 2016 +0100 @@ -31,5 +31,5 @@ place at address mem:__intvec_start__ { readonly section .intvec }; place in ROM_region { readonly }; -place in SRAM2_region { readwrite, block STACKHEAP }; -place in SRAM1_region { }; +place in SRAM2_region { readwrite }; +place in SRAM1_region { block STACKHEAP };
--- a/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_NUCLEO_L476RG/TOOLCHAIN_ARM_MICRO/startup_stm32l476xx.s Mon May 09 18:30:12 2016 +0100 +++ b/targets/cmsis/TARGET_STM/TARGET_STM32L4/TARGET_NUCLEO_L476RG/TOOLCHAIN_ARM_MICRO/startup_stm32l476xx.s Mon May 09 18:45:11 2016 +0100 @@ -48,7 +48,7 @@ ; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> ; </h> -Heap_Size EQU 0x8000 ; 32KB +Heap_Size EQU 0x18000 ; 96KB AREA HEAP, NOINIT, READWRITE, ALIGN=3 EXPORT __heap_base
--- a/targets/hal/TARGET_STM/TARGET_STM32F4/can_api.c Mon May 09 18:30:12 2016 +0100 +++ b/targets/hal/TARGET_STM/TARGET_STM32F4/can_api.c Mon May 09 18:45:11 2016 +0100 @@ -31,6 +31,7 @@ void can_init(can_t *obj, PinName rd, PinName td) { + uint32_t filter_number; CANName can_rd = (CANName)pinmap_peripheral(rd, PinMap_CAN_RD); CANName can_td = (CANName)pinmap_peripheral(td, PinMap_CAN_TD); obj->can = (CANName)pinmap_merge(can_rd, can_td); @@ -71,7 +72,10 @@ if (HAL_CAN_Init(&CanHandle) != HAL_OK) { error("Cannot initialize CAN"); } - can_filter(obj, 0, 0, CANStandard, 0); + + filter_number = (obj->can == CAN_1) ? 0 : 14; + + can_filter(obj, 0, 0, CANStandard, filter_number); } void can_irq_init(can_t *obj, can_irq_handler handler, uint32_t id)