Commit Graph

309 Commits (80d58e55722107d2d004704de7b6050f0eb2e91e)

Author SHA1 Message Date
Roberto Spelta e466685666 copy of L476RG ld file 2017-10-10 13:58:41 +02:00
Roberto Spelta 4d75cbec01 peripherals pins adaptation 2017-10-10 13:58:41 +02:00
Roberto Spelta a95acdabb3 copy of L476RG target 2017-10-10 13:58:41 +02:00
bcostm 6ac1b0e046 NUCLEO_L432KC: add ALT pins + cleanup 2017-10-10 10:51:04 +02:00
Jimmy Brisson 80ff7071b4 Merge pull request #5210 from bcostm/L4_add_adc_calib
STM32: add ADC calibration for L4, F1, F3 devices
2017-10-09 11:15:31 -05:00
Pierre-Marie Ancele c476a600a2 remove sys.cpp file of the ARM_STD toolchain as done in the MR #4949 2017-10-06 11:37:03 +02:00
Pierre-Marie Ancele ed32f57070 fix can_s struct definition 2017-10-06 11:37:03 +02:00
adustm 4e83d7fb15 Fix for IAR tests 2017-10-06 11:35:16 +02:00
adustm 554125ef07 Align IAR files with mbed-os implementation (tests are still failing) 2017-10-06 11:35:16 +02:00
adustm 3ca0b64318 Replace tab by spaces 2017-10-06 11:35:16 +02:00
adustm fa54e1ecba Make ARM test pass on mbed-os5 tests 2017-10-06 11:35:16 +02:00
adustm 02df64b7d6 replace tab by spaces 2017-10-06 11:35:16 +02:00
Nabil Elqatib 507d05915d Remove analogin_s definition from objects.h
The structure being already defined in
targets/TARGET_STM/TARGET_STM32L4/common_objects.h#L119, there is a
redefinition conflict.
2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele fb27107416 NUCLEO_L496ZG change LPUART1 clock source to fix crash on serial init 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele abb5e2d0d3 NUCLEO_L496ZG JSON Clock Configuration 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele 65fec215ab NUCLEO_L496ZG Fix IAR startup script 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele 4219ffc626 NUCLEO_L496ZG Fix ARM startup script 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele 3b2bc2d10c STM32L496xG fix objects.h to fit common_objects definition 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele 313a933c09 NUCLEO_L496ZG Update comments 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele cca32d8196 NUCLEO_L496ZG Use new alternative pins definition 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele aebc227c15 NUCLEO_L496ZG update date in file copyrights headers 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele 7c6c710ee1 NUCLEO_L496ZG Use correct linker script for IAR 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele eea667567e STM32L496ZG add IAR toolchain 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele dc2f29c86e STM32L496ZG add ARM_STD toolchain 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele 53d66bb013 STM32L496ZG add ARM_MICRO toolchain 2017-10-06 11:35:16 +02:00
Nabil Elqatib fd7008c779 Add BSP files for NUCLEO_L496ZG 2017-10-06 11:35:16 +02:00
Pierre-Marie Ancele 6d3e17cb3c add compatibility with STM32L496xG MCUs 2017-10-06 11:35:16 +02:00
bcostm 88b82e312d fix init struct analogout 2017-10-05 16:35:05 +02:00
Jimmy Brisson cc0b3d05aa Merge pull request #5130 from bcostm/freeze_timer_in_debug
STM32: Freeze master timer on stop/breakpoint
2017-10-02 10:38:57 -05:00
Jimmy Brisson c06368a21e Merge pull request #5171 from jeromecoutant/PR_L432_RAM
STM32L432KC: increase RAM size from 48k to 64k
2017-09-27 15:35:44 -05:00
Jimmy Brisson 6cb0258344 Merge pull request #5026 from LMESTM/flash_init_issue_4967
STM32: Lock / Unlock flash for each operation
2017-09-27 15:17:26 -05:00
bcostm 4824e18a95 STM32L4: add ADC calibration 2017-09-27 14:38:34 +02:00
Jimmy Brisson a2cdb10bf7 Merge pull request #4932 from LMESTM/can_reset
Fix STM32 CAN reset to not lose context
2017-09-20 16:24:40 -05:00
jeromecoutant 8b0ee27819 STM32L432KC: increase RAM size from 48k to 64k
WARNING: you have to update ST-Link FW to V2J29M18
http://www.st.com/en/development-tools/stsw-link007.html
2017-09-19 15:11:23 +02:00
bcostm 9f86a32baf Add freeze timer on debug for all STM32 devices
This is a continuation of the work done on the STM32F401xE devices only.
2017-09-18 13:31:46 +02:00
Jimmy Brisson 15a9a0382b Enable Compiling with ARMC6 across all targets
remove duplicate sys.cpp
2017-09-11 13:20:32 -05:00
Jimmy Brisson e009d9f7be Merge pull request #4975 from LMESTM/STM32_SPI3W
Stm32 spi 3 wires mode support
2017-09-05 11:16:53 -05:00
Laurent MEUNIER f5aa7c7c82 STM32: Lock / Unlock flash for each operation
Rather than Unlocking flash during flash object creation, and leaving
the flash possibly continuously unlocked a(s object might bever be freed),
we decide to Unlock then Lock again at each erase or program call.
2017-09-05 17:49:07 +02:00
Laurent MEUNIER 04ac65a4e6 STM32: CAN: restore registers after can_reset
After reset the MCR register content needs to be restored so we're
introducing the can_registers_init function to be called at the first
init stage, but also after reset. We also store the can frequency to
go through the initialisation phase again.
2017-09-05 10:27:21 +02:00
Laurent MEUNIER 759642af8e STM32: Define CAN handle as part of can object
Instead of a static object, this will make driver
instantiation more robust and allow to re-use init
configuration on a need basis.

The CANName struct member is actually the CAN registers base address,
which is now available in the CanHandle.Instance field, so we don't need
CANName anymore.
2017-09-05 10:27:21 +02:00
Laurent MEUNIER 66162c6b1d STM32: move can_s definition to common_objects.h
This will ease up further changes to the structure.
2017-09-05 10:27:21 +02:00
Laurent MEUNIER e6631c02a4 STM32: adjust flash.get_page_size() to minimum programable size
Users of FlashIAP usually get the minimum programable size
by calling flash.get_page_size(), so let's return the minimum
to allows a most efficient usage of flash.

For F4 devices, this is 1 byte.
For L0 and L1 devices, this is a word (4 bytes).
For L4 devices, this is a double word (8 bytes).
2017-08-25 17:21:30 +02:00
Laurent MEUNIER 8c99bf3b62 SPI: HAL: disable IP at the end of transmit
in case of 1LINE direction
2017-08-17 11:02:43 +02:00
Jimmy Brisson f08d5a496c Merge pull request #4623 from LMESTM/analogin_handle
Improve management handling of multiple instances of analogin ojects
2017-07-31 15:23:31 +00:00
Jimmy Brisson 732f7328f8 Merge pull request #4762 from jeromecoutant/PR_L4_ADC
DISCO_L475VG_IOT : pin update
2017-07-24 10:57:18 -05:00
Jimmy Brisson 9e443e9d14 Merge pull request #4734 from LMESTM/stm32_uart_irq
Avoid data loss with serial interrupt used at high baudrates
2017-07-24 10:55:07 -05:00
Laurent MEUNIER 7414b1266b STM32: ADC: Fix PinMap_ADC_Internal
The instance needs to be searched in PinMap_ADC_Internal, not PinMap_ADC.
This was a copy paste error...
2017-07-20 14:15:37 +02:00
jeromecoutant b654af2d80 STM32L4 : json clock source configuration
- default value is the same as before patch
- system_stm32l4xx.c file is copied to family level with all other ST cube files
- specific clock configuration is now in a new file: system_clock.c (target level)
- nvic_addr.h file is now in TARGET_STM level
2017-07-19 16:39:26 +02:00
jeromecoutant a98594d132 DISCO_L475VG_IOT: remove unavailable pins 2017-07-17 14:09:01 +02:00
jeromecoutant e0e332f5d9 STM32L4 AnalogIn init issue with _ALT pins 2017-07-17 13:33:50 +02:00
Laurent MEUNIER efbeb0d057 STM32: analogin: adc struct member not needed anymore
The adc in analogin_t has the same value as the Instance member of
ADC_HandleTypeDef. So we can only rely on the later one.
2017-07-17 13:27:22 +02:00
Laurent MEUNIER 8540e8a1dd STM32: Analogin - define handle in object not as a global
In this commit, the analogin_s structure is moved to commonn_objects.h file
to limit the duplicaion.

The ADC handle is moved from a global variable to a struct member of the
analogin object. This allows multiple ADC instances to work correctly.

Note that State needs to be explicitely set to HAL_ADC_STATE_RESET
because the object is not zero initialized.
2017-07-17 13:23:45 +02:00
Laurent MEUNIER b5cbaaa0d0 STM32: Serial - use TXE as tx_irq instead of TC
TXE indicates that a byte can be written to UART register for sending,
while TC indicates that last byte was completely sent. So the TXE flag
can be used in case of interrupt based Serial communication, to allow
faster and efficient application buffer emptying.

Also TXE flag will be erased from the interrupt when writing to register.
In case there is nothing to write in the register, the application is
expected to disable the interrupt.
2017-07-17 08:46:00 +02:00
Laurent MEUNIER 85711eb09e STM32: Serial - do no clear RXNE flag
The RXNE flag is getting cleared when reading Data Register so it should
not be cleared here. Especially in case of high data rate, another byte of
data could have received during irq_handler call and clearing the flag
would read and discard this data which would be lost for application.
2017-07-17 08:46:00 +02:00
Martin Kojtal 58d0aa5ce8 Merge pull request #4694 from bcostm/typo_pins_disco_l475vg
DISCO_L475VG_IOT01A: typo corrections in PeripheralPins.c
2017-07-13 16:42:00 +02:00
Laurent MEUNIER be8024de28 STM32: serial: use proper GET_IT macro
Depending on families, different HAL macros are defined to check the
state of serial interrupts. In several cases, we can find only 1 macro:
__HAL_UART_GET_IT_SOURCE
Checks whether the specified UART interrupt has occurred or not

But in F0, F3, F7, L0, L4 there are 2 different macros
__HAL_UART_GET_IT
Checks whether the specified UART interrupt has occurred or not
__HAL_UART_GET_IT_SOURCE
Checks whether the specified UART interrupt source is enabled.

In the later case, __HAL_UART_GET_IT_SOURCE was being used so far,
but actually needs to be replaced by __HAL_UART_GET_IT. Using the right
macro, we also check the proper flags accordingly.
2017-07-11 17:22:33 +02:00
bcostm d58070b658 DISCO_L475VG_IOT01A: typo corrections in PeripheralPins.c 2017-07-03 16:12:14 +02:00
Jimmy Brisson d382d44f06 Merge pull request #4529 from LMESTM/issue_1083
Manage multiple instances of analog out
2017-06-30 13:53:46 -05:00
Jimmy Brisson bb3bedad79 Merge pull request #4638 from bcostm/fix_cmsis5_disco_l475vg
DISCO_L475VG_IOT01A: Fix startup files for cmsis5
2017-06-28 09:20:05 -05:00
Jimmy Brisson e907079456 Merge pull request #4603 from jeromecoutant/PR_OVERRIDE
STM32 : mbed_overrides.c is common for all families
2017-06-27 14:59:24 -05:00
Laurent MEUNIER 07575b33f0 STM32: STM32L475xG dac_s common definition
Fixing conflict as STM32L475xG target has been merged after the first
version of moving dac_s structure definition to common_ojects.h.
2017-06-27 09:27:46 +02:00
Laurent MEUNIER 024b3da5f1 STM32: analog_out: generalize code for multiple instance handling
Moving some code in common to be able to manage several ADC instances,
or several channels of an instance.

The change involves:
- moving dac_s structure definition to common_object.h
- create TARGET_STM/analogout_api.c and move fully common analog_out
functions in there
- rename analogout_api.c of each target family into analogout_device.c
to keep platform specific code
- update analogout_device.c to rely on obj->handle and obj->channel
- align analogout_init function as much as possible between families in
analogout_device.c files
2017-06-27 09:27:46 +02:00
bcostm 03930b88f6 DISCO_L475VG_IOT01A: Add missing nvic_addr.h file 2017-06-26 20:14:08 +02:00
bcostm 72be051088 DISCO_L475VG_IOT01A: Update system init for cmsis5 2017-06-26 19:04:44 +02:00
bcostm bd6d7382a3 DISCO_L475VG_IOT01A: Update toolchain files for cmsis5 2017-06-26 19:02:52 +02:00
Anna Bridge 55355d7374 Merge pull request #4401 from jeromecoutant/PR_USB_PIN
STM32 : Add USB used pins in PinNames.h files
2017-06-23 11:37:19 +01:00
Anna Bridge 4f5d4f040e Merge pull request #4375 from LMESTM/STM32_SPI_LL
Stm32 spi : use LL API to improve performances
2017-06-23 11:33:55 +01:00
jeromecoutant 18572cc65b STM32 : mbed_overrides.c is common for all families 2017-06-21 16:03:05 +02:00
Anna Bridge c5e1fa70d9 Merge pull request #4242 from bcostm/dev_disco-l475-iot
DISCO_L475VG_IOT01A : Add new target
2017-06-20 11:41:42 +01:00
Jimmy Brisson 3f464217f1 Merge pull request #4554 from LMESTM/L476RG_ld_file
Fix NUCLEO_L476RG linker scripts
2017-06-19 11:04:10 -05:00
Jimmy Brisson 737a64c988 Merge pull request #4502 from LMESTM/issue_899
STM32: serial: clear Overrun flag if it is set when checking if readable
2017-06-19 11:00:23 -05:00
Laurent MEUNIER 20bd774a6c STM32 SPI specific mode for higher performance
This commit implements a SPI mode which will offer better performance
thanks to usage of Lower Layer API which use fewer registers access,
at the cost of lower robustness (no error management).
2017-06-16 10:23:48 +02:00
Laurent MEUNIER 73eebaad19 NUCLEO_L476RG: FLASH size of 1MB, not 2MB
MBED_APP_SIZE was erroneously defined to 2MB for this target,
while it's only 1MB.
2017-06-14 16:52:08 +02:00
Laurent MEUNIER 1d802028cf NUCLEO_L476RG: GCC_ARM ld file fix
Following
Merge pull request #4063 from LMESTM/17q2_L4_bootloader
the NUCLEO_L476RG binairies could not boot anymore.

The change done in #4063 was derived from work on NUCLEO_L429ZI target
which supports uvisor. The VECTORS defintiion is introduced as part of
uvisor support and requires further changes in ld file which were missing.
As uvisor is not considered yet, we remove VECTORS for now and will
introduce only when needed.
2017-06-14 16:48:29 +02:00
Russ Butler 47b78a2d17 Fix STM32 crashes on boot due to unset VTOR
Remove HAL_Init and related code from SystemInit and move it to
mbed_sdk_init. The function SystemInit is called early in the boot
sequence before RAM is initialized or the VTOR is setup, so it should
not be used to perform the HAL initialization.

This fixes crashes due the vector table being used before it has been
relocated.
2017-06-13 12:12:20 -05:00
jeromecoutant 8301ee04ca STM32 Add USB pins name in PinNames.h files 2017-06-13 17:15:27 +02:00
bcostm 8ede14dac1 DISCO_L475VG_IOT01A: Add include of LL timer file 2017-06-12 17:12:57 +02:00
bcostm 66cbc8b452 DISCO_L475VG_IOT01A: Update device files after CubeL4 update 2017-06-12 17:03:12 +02:00
bcostm af2078f38d DISCO_L475VG_IOT01A: Update cmsis_nvic files 2017-06-12 17:03:12 +02:00
bcostm f6a48838ad DISCO_L475VG_IOT01A: Move USB device config files 2017-06-12 17:03:12 +02:00
bcostm 3519d535a0 DISCO_L475VG_IOT01A: Add generic buttons declaration 2017-06-12 17:03:12 +02:00
bcostm 2ed207efd4 DISCO_L475VG_IOT01A: change comment for 8-byte aligned adress for IAR .icf file 2017-06-12 17:03:12 +02:00
bcostm 7a2d1bd74a DISCO_L475VG_IOT01A: Move ADC internal channels in dedicated table. 2017-06-12 17:03:12 +02:00
bcostm 05c023bcad DISCO_L475VG_IOT01A: Add all pins even those not available on connectors. 2017-06-12 17:03:12 +02:00
bcostm a8ab839e2c DISCO_L475VG_IOT: Re-organize folder
- Move TARGET_DISCO_L475VG_IOT01A/ in TARGET_STM32L475xG/
- Add STM32L475xG extra label in targets.json
2017-06-12 17:03:12 +02:00
bcostm b40591f1e1 DISCO_L475VG_IOT: Add USB Device files 2017-06-12 17:03:12 +02:00
bcostm 2871545bd7 Assign LED4 definition same as LED3 2017-06-12 17:03:12 +02:00
bcostm b9cf7dbe69 Set ADC pins to MODE_ANALOG_ADC_CONTROL 2017-06-12 17:03:12 +02:00
bcostm ac27f8288d Add back PB_6/PB_7 pins definition used by STDIO_UART_TX/RX 2017-06-12 17:03:12 +02:00
bcostm 23140da035 Update PeripheralPins: add _ALTx pins and remove pins not available on connectors 2017-06-12 17:03:12 +02:00
bcostm 8c7000cce4 Add "01A" suffix in target name 2017-06-12 17:03:12 +02:00
bcostm 116d35ad9b Update PinNames.h and remove PortNames.h after rebase with master 2017-06-12 17:03:12 +02:00
bcostm 074e11dcc1 Add DISCO_L475VG_IOT specific files 2017-06-12 17:03:12 +02:00
Martin Kojtal ecc737e14f Merge pull request #4484 from c1728p9/workshop_rebase_4058
STM32L4 Flash support
2017-06-09 15:05:46 +01:00
Laurent MEUNIER f77ecf4e12 STM32: Put some serial code in common between families 2017-06-09 13:30:54 +02:00
Sam Grove 1607c83d77 Merge pull request #4469 from kegilbert/17q2-l4-bootloader-rebase
17q2 l4 bootloader - Rebase
2017-06-08 11:38:25 -05:00
Laurent MEUNIER c5c33f1d0f STM32: serial: clear Overrun flag if it is set when checking if readable
Note that this could have side effects on the application as it would
not be aware that data has been missed. This may be later solved by
adding an error management parameter to the Serial API in mbed.

The advantage is that the serial link can work again.
2017-06-08 17:01:30 +02:00
Sam Grove 8232afa53e Merge pull request #4216 from fmanno/issue-4189
STM32s Serial: Correct handling of parity bits
2017-06-06 20:00:19 -05:00
Sam Grove 72de85c62f Merge pull request #4417 from monkiineko/master
STM32: Fix 32-bit us ticker interrupt scheduling
2017-06-06 19:59:52 -05:00
Laurent MEUNIER 1c57df37d4 STM32 L4: Flash API typo 2017-06-06 18:10:38 -05:00
Laurent MEUNIER a9d237012c Removing duplicate defines
Those defines are already available in STM32 L4 SDK and don't need to
be (re)defined here.
2017-06-06 18:10:18 -05:00
Laurent MEUNIER ec89ea8ac9 Fix L432KC compilation error 2017-06-06 18:09:53 -05:00
Laurent MEUNIER b1ae8a9f9d STM32L4 : add Flash API support 2017-06-06 18:09:12 -05:00
Laurent MEUNIER 7ec9fe23c1 Update stm32l476rg linker scripts for bootloader
Add MBED_APP_START and MBED_APP_SIZE to the linker scripts
so the start and size of an image can be specified. This allows the
ROM to be split into a bootloader region and an application region.
2017-06-06 15:43:54 -05:00
Laurent MEUNIER 5fbe3299d7 Rebase of: e51c40c061
Fix vector table

The address of the vector table is hardcoded to the start of flash.
This patch updates make it properly handle updating the VTOR with
a bootloader.
2017-06-06 15:43:17 -05:00
Sam Grove 5f138810a9 Merge pull request #4294 from ARMmbed/feature_cmsis5
Update CMSIS-Core and RTX to version 5
2017-06-02 23:44:32 -05:00
Bradley Scott 260378e774 STM32: Fix 32-bit us ticker interrupt scheduling
For STM32 targets using a 32-bit timer for the microsecond ticker, the
driver did not properly handle timestamps that are in the past.  It
would just blindly set the compare register to the requested timestamp,
resulting in the interrupt being serviced up to 4295 seconds late
(i.e. after the 32-bit timer counts all the way around to hit the
timestamp again).

This problem can easily be reproduced by creating a Timeout object
then calling the timeout's attach_us() member function to attach a
callback with a timeout of 0 us.  The callback will not get called for
over 2147 seconds, and possibly up to 4295 seconds late if no other
microsecond ticker events are getting scheduled in the meantime.

Now, after the compare register has been set, the timestamp is checked
against the current time to see if the timestamp is in the past, and
if so, the compare event is manually set.

NOTE: By checking if the timestamp is in the past after configuring the
capture register, we ensure proper handling in the case where the timer
updates past the timestamp while setting the capture register.
2017-06-01 12:52:03 -04:00
Jimmy Brisson 944a17fe3c Merge pull request #4402 from LMESTM/STM32_F2_CUBE_v160
Stm32 f2 cube sdk update to v1.6.0
2017-05-31 11:28:36 -05:00
Bartek Szatkowski b97ffe8fdc CMSIS5: Replace target defined NVIC_Set/GetVector with CMSIS implementation 2017-05-30 18:55:51 +01:00
Francisco J. Manno 5e98da14d3 STM32s Serial does not properly handle parity bits
Reworked the serial_format() function for STM32F0x
devices to take the format in the form:
data_bits - parity - stop_bits

E.g. 8 - N - 1

where data_bits exclude the parity bit.
Added a case for 7 bits data as at least the chips
STM32F0x1/STM32F0x2/STM32F0x8 support 7 bits data.

Consolidated serial_format() and uart_init()
functions into a general TARGET_STM serial_api.c
file since the functions are common to all STM targets.

Fixes #4189
2017-05-30 17:17:20 +01:00
Laurent MEUNIER 8576993a1a Introduce stm32_assert.h for MBED port
When we want to activate USE_FULL_ASSERT macro in STM32 CUBE, there is a
need to have the assert map to MBED.

The easiest way to have this definition in a single place for all STM32
HAL and LL files using it, is to add a specific header file where the
porting to MBED is done.
2017-05-29 13:48:29 +02:00
adustm 897625cc96 Give access to HAL_GetTick function 2017-05-29 10:24:03 +02:00
Sam Grove 2500ab03f2 Merge pull request #4351 from jeromecoutant/PULL_REQUEST_CUBE_UPDATE_L4_V1.8.0
STM32L4 cube update from v1.5.0 to v1.8.0
2017-05-26 16:58:37 -05:00
Sam Grove d11289b576 Merge pull request #4165 from adustm/can_init
fix #3863 Add an mbed API that allows the init of the CAN at the bus frequency
2017-05-26 10:45:19 -05:00
jeromecoutant 5dc49b7d6c STM32L4 replace deprecated macro name 2017-05-19 11:59:38 +02:00
jeromecoutant 0178969e90 STM32Cube_FW_L4_V1.8.0
CMSIS v1.1.1 => v1.3.1
    STM32L4 HAL v1.5.1 => v1.7.1
2017-05-18 14:36:32 +02:00
adustm a769d2b6a5 add comment in peripheral pin of DISCO_L476VG so that
the user is aware of conflicts
2017-05-15 15:06:29 +02:00
Michel Jaouen c581230cd3 USBHOST: TARGET_STM fix in hal for hub support 2017-05-09 16:18:33 +02:00
Anna Bridge a85873c863 Merge pull request #4248 from screamerbg/fix/stm32-usb-support
Fixed STM32 USB Device support for mbed Classic
2017-05-05 13:51:38 +01:00
Jimmy Brisson 0c2af26523 Merge pull request #4249 from kegilbert/button-mapping-kg
Add consistent button names across targets
2017-05-03 11:26:36 -05:00
Kevin Gilbert 0268c85101 Fixed typos 2017-05-02 13:16:14 -05:00
Kevin Gilbert 418d83b6c2 Addressed review comments: fixed unmapped switches and added Hexiware buttons 2017-05-02 12:20:05 -05:00
Kevin Gilbert 28d1ac5a44 Added mapping to USER_BUTTON-labelled switches
Revert HRM1017 file source deletion

Added in small comment next to additions

Added mapping to BTN-labelled switches

Added mapping to USER_BUTTON-labelled switches

Undo incorrect mapping to SWIO pin in NORDIC target
2017-04-28 11:37:23 -05:00
Mihail Stoyanov 301ce550c9 Fixed STM32 USB Device support by migrating all specific target headers to unsupported features where they belong until USB support is officially introduced in mbed OS 5 2017-04-28 17:23:07 +01:00
Laurent MEUNIER 4eea8fa863 STM32 Fixed warning related to __packed redefinition
Before this patch, many warnings like below were generated
during compilation with ArmCC
[Warning] lwip_ethernet.h@57,0:  #3135-D: attribute does not apply to any entity

This happens here as ``--gnu`` option of ArmCC is being used, which
enables the GNU compiler extensions that the ARM compiler supports.

This is solve by adding a extra check on __CCARM .
2017-04-27 10:32:00 +02:00
jeromecoutant 03972ebb0c STM32L4 Internal ADC channels rework
Internal ADC pins are now out of PinMap_ADC array
2017-04-12 13:14:58 +02:00
Sam Grove bfb86a7f51 Merge pull request #4125 from jeromecoutant/PR_F4_USB_CONFIG_FILE
STM32 USB configuration file move
2017-04-10 11:07:59 -05:00
jeromecoutant 3bbbabf202 STM32L4 USB configuration file move 2017-04-06 11:51:26 +02:00
jeromecoutant 0c2720bc19 NUCLEO_L476RG : minor serial pin update
SERIAL_TX and SERIAL_RX pins used for debug printf cannot be set as available
2017-04-04 14:38:17 +02:00
Michel Jaouen fc972f0a98 fix STM USB config after L4 ,F4, F7 file tree changes 2017-03-14 15:57:40 +01:00
Michel Jaouen 873cacfc73 Revert "Revert "Target stm usb config""
This reverts commit ec329be6f2.
2017-03-14 15:57:28 +01:00
Martin Kojtal 68dc25331a Merge pull request #3843 from bcostm/fix_stm32l4_apb2_80MHz
STM32L476xG: set APB2 clock to 80MHz (instead of 40MHz)
2017-03-09 15:44:08 +00:00
Martin Kojtal fd6fdd5f8c Merge pull request #3795 from LMESTM/fix_pwm_period_calc
Fix pwm period calc
2017-03-09 15:39:00 +00:00
bcostm ae6899b448 STM32L4xx: set APB2 clock to 80MHz (instead of 40MHz) 2017-03-06 13:34:01 +01:00
Laurent MEUNIER 747e8e1ea1 STM32: move pwmout device tables to C file
In order to avoid possible multiple definitions errors, move the table
initialization to the C file instead of header file
2017-02-27 17:07:01 +01:00
Christopher Haster aff49d8d1e Renamed files in platform to match source names
critical.h     -> mbed_critical.h
sleep.h        -> mbed_sleep.h
toolchain.h    -> mbed_toolchain.h
rtc_time.h     -> mbed_rtc_time.h
semihost_api.h -> mbed_semihost_api.h
wait_api.h     -> mbed_wait_api.h
2017-02-22 18:17:54 -06:00
Sam Grove a8a31da2e8 Merge pull request #3737 from bcostm/dev_can_factorization
STM32: can_api.c files factorization
2017-02-22 13:36:59 -06:00
Sam Grove b7dce71510 Merge pull request #3665 from LMESTM/dev_stm32_gpio_pins_rework
Dev stm32 gpio pins rework
2017-02-21 10:41:16 -06:00
bcostm f527ff95ab Add support to L4 targets. 2017-02-20 11:19:53 +01:00
Sam Grove 99dda9a60b Merge pull request #3740 from jeromecoutant/PR_L4_RTC
STM32L4 HAL update for RTC Wake Up Timer
2017-02-17 09:12:01 -06:00
Laurent MEUNIER 1cbb3e18ac STM32: make PWM driver into a common file
The pwmout driver is very similar for each STM32 family.

The only family specific part is defined in pwmout_device.h file.
It mainly contains few specific information:
- The mapping of PWM/TIMERS to APB1 or APB2 so that we can get the clock
- The clock calculation uses the right APB clock, which was sometimes
not the case before and could have lead to errors in case dividers were
enabled on APB clock settings. This case is now covered.
- Inactivation of inverted support on feaw families
2017-02-17 14:11:56 +01:00
Laurent MEUNIER 32ecd00c3a STM32: move pin_lines_desc to c file
Move the const table initialization from the header file
to a new C file to avoid any multiple defined errors.
2017-02-16 19:34:11 +01:00
Laurent MEUNIER 73955b678e STM32: pins: move pin_lines_desc table to const 2017-02-16 19:34:05 +01:00
Laurent MEUNIER 273ac81680 stm32: use default in switch case
As commented during PR review, better use default case.
2017-02-16 19:34:01 +01:00
Laurent MEUNIER 21bc5af3c2 STM32: common pinmap using LL layer to access registers
this first makes pinmap.c a common file

then rework it with several goals:
- avoid gpio / irq / pin management extra dependencies
- improve performances when switching between pin modes

This change is based on LL layer to access to registers level
instead of using HAL higher level API.

The family specific functions are implemented in pin_device.h
of each family. Mostly this is F1 family that is differnt
from other ones.
2017-02-16 18:57:18 +01:00
Laurent MEUNIER 6bd488db4d STM32: gpio irq: Use LL registers access
Instead of using HAL_GPIO_Init / Deinit which makes a lot of registers
being written and re-written, and which creates extra gpio / pin / irq
dependencies, we directly set the IRQ related registers thanks for the
STM32 LL layers which provides APIs to modify registers.
2017-02-16 18:55:36 +01:00
Laurent MEUNIER 74774f9424 STM32 Make gpio_irq_api.c a common files
This requires the creation of gpio_irq_device.h file, where
family specific EXTI IRQ mapping is defined
2017-02-16 18:55:28 +01:00
Laurent MEUNIER 0e2cc3824b STM32 : Make port_api.c a common file 2017-02-16 18:55:20 +01:00
jeromecoutant 2433b1ad95 STM32L4 HAL update for RTC Wake Up Timer 2017-02-10 16:26:10 +01:00
Sam Grove ec329be6f2 Revert "Target stm usb config" 2017-02-09 15:37:19 -06:00