Commit Graph

49 Commits (22b2e9f800409f4eb341e7c171e91a3982a44985)

Author SHA1 Message Date
jeromecoutant c02cb71b35 STM32 common filess astyle 2021-05-25 14:45:30 +02:00
Anna Bridge b91a705e74
Merge pull request #14444 from jeromecoutant/PR_GPIO_FREE
STM32: reset GPIO value is analog mode
2021-03-29 11:23:15 +01:00
George Psimenos 61cfaa15cd Update UART pin names & add MBED_CONF_TARGET_STDIO_UART overrides 2021-03-23 11:17:17 +00:00
jeromecoutant a6c213bb10 [STD-PIN] Replace STDIO_UART_TX by USBTX 2021-03-18 17:01:50 +00:00
jeromecoutant 20e9235a26 STM32 SERIAL : correct GPIO free 2021-03-18 14:52:59 +01:00
reme 5a2835c18c STM32WL : ADDING STM32 SUPPORT
Add code concerning all STM32 platforms
2021-02-05 08:04:31 +00:00
jeromecoutant 73d1c63741 STM32 SERIAL: free RTS/CTS pins 2020-11-04 15:47:14 +01:00
Przemyslaw Stekiel 713be4fd77 STM pin_function(), pin_mode(): return immediately when given pin is NC
Additionally, remove redundant pin checks against NC when above functions are used.
2020-02-19 11:46:59 +01:00
jeromecoutant c1386cf52d STM32L5 : update generic STM files for L5 2020-01-23 17:54:55 +01:00
Przemyslaw Stekiel 8a938ea777 STM serial free: Set pin function only if pin is defined (not NC) 2020-01-10 14:59:28 +01:00
Przemyslaw Stekiel 79d16ae8f7 STM serial init: Set pin function only if pin is defined (not NC) 2020-01-03 14:14:26 +01:00
Martin Kojtal 7177d8fefe
Merge pull request #11950 from ABOSTM/DISCO_H747I_TICKLESS
DISCO_H747I: add support of MBED_TICKLESS
2019-11-29 09:48:09 +01:00
Przemyslaw Stekiel b2dad08387 Change explicit pinmap to static pinmap 2019-11-28 08:32:12 +01:00
Przemyslaw Stekiel 3d2bebde0c STM32 serial driver: Add explicit pinmap support 2019-11-28 08:32:00 +01:00
Alexandre Bourdiol affe7113ef TARGET_STM: Remove timeout on HSEM.
With tickless mechanism hsem can be used for quite a long time
(time to set up PLL clock).
Also, if hsem is held to long, then this is not the current core which is faulty,
but probably the other (the one which hold the HSEM)
2019-11-27 14:25:43 +01:00
Alexandre Bourdiol adcf0e2fa5 DISCO_H747I Dualcore support
Add 2 targets for DISCO_H747I dualcore:
* DISCO_H747I      -> for CM7 core
* DISCO_H747I_CM4  -> for CM4 core

Current restrictions:
* TICKLESS deactivated
* DeepSleep not supported (DeepSleep wrapped to sleep)

Warning: use of the same IP (example I2C1) by both core at the same time is not prevented,
but is strongly not recommended.
Some Hardware Semaphore are use for common IP, to manage concurrent access by both cores: Flash, GPIO, RCC.

Warning: Drag and drop of binary to DISCO_H747I will flash CM7.
         In order to flash CM4, one can use STM32 CubeProgrammer tool.
2019-10-14 18:02:57 +02:00
jeromecoutant 8a3fd6a040 STM32 LPUART update 2019-07-05 17:52:41 +02:00
bcostm beab69704a NUCLEO_WB55RG: update STM common files
- Include RTC ll file from hal as in other families
- STM32WB: update Flash API driver
2019-03-29 16:21:38 +01:00
Russ Butler 34c176654d Add HAL API for serial pinmap
Add the functions serial_tx_pinmap, serial_rx_pinmap, serial_cts_pinmap
and serial_rts_pinmap to all targets.
2019-02-08 09:10:28 -06:00
jeromecoutant b1a284a876 STM32: astyle check 2019-01-10 10:22:21 +01:00
jeromecoutant 4b67820f8a NUCLEO_H743ZI: add initial SDK 2019-01-04 10:03:36 +01:00
Cruz Monrreal 5c136cc5cc
Merge pull request #8403 from bcostm/fix_issue_8372_serial
STM32: fix issue with serial_is_tx_ongoing function
2018-10-16 10:25:37 -05:00
bcostm 4017dea77f STM32: typo corrections 2018-10-15 11:14:18 +02:00
bcostm 276d16f70d STM32: fix issue with serial_is_tx_ongoing function 2018-10-12 15:40:11 +02:00
Eman869 c68e7c61ed
Check LPUART clock source in STOP mode
Check LPUART clock source before enable it in STOP mode, only LSE could be enabled in STOP mode.
2018-09-27 19:12:42 +08:00
bcostm 4c31be2db4 STM32: fix wrong LSE config in serial_baud function 2018-09-19 16:46:54 +02:00
Cruz Monrreal e85acac175
Merge pull request #7717 from LMESTM/fix_checkfifo
STM32: check for UART ongoing transfers before entering deepsleep
2018-08-09 10:17:00 -05:00
Laurent Meunier e12d98e1c0 Use HAL coding style for function naming 2018-08-07 13:42:46 +02:00
Laurent Meunier 402f3f1c3f STM32: check for UART ongoing transfers before entering deepsleep
As suggested by Russ Butler in mbed-os issue #7328, and until there is an
implementation of mbed-os issue #4408, we are implementing a workaround
at HAL level to check if there is any ongoing serial transfer (which happens
if HW FIFO is not yet empty).

In case a transfer is ongoing, we're not entering deep sleep and
return immediately.
2018-08-07 11:30:53 +02:00
bcostm 9598dd9f12 STM32: remove uart force_reset at init 2018-07-30 14:52:31 +02:00
bcostm 665de33cc6 stm32 lpuart: enable lse and hsi if not done 2018-07-12 15:58:02 +02:00
bcostm 0c417ab8b7 astyle 2018-06-29 10:12:40 +02:00
bcostm 9be8541a30 STM32: add lpuart_clock_source config
Keep same clock configuration as done before this PR (LSE and PCLK1).
Use a JSON file to change it.
2018-06-29 10:10:29 +02:00
jeromecoutant 433ba46132 TARGET_STM astyle 2018-06-27 14:21:07 +02:00
Marc Emmers 7881e68efe STM32L0: Enable stop mode operation for the LPUART 2018-02-06 15:42:39 +01:00
Marc Emmers 01660ff5ae STM32L0/4: Always try to select LSE if LPUART and baudrate <= 9600 2018-02-06 15:42:39 +01:00
bcostm eb4b339c37 STM32 serial: add missing function declaration 2018-01-30 09:48:53 +01:00
bcostm b6efdd58c8 STM32 serial: improve index assignment in serial_init 2018-01-29 17:23:21 +01:00
bcostm a908d28f26 STM32 serial: coding style 2018-01-29 17:23:20 +01:00
bcostm 73ffc06ffd STM32 serial: fix linking error 2018-01-29 17:23:20 +01:00
bcostm e446c26584 STM32 serial: use uart_name instead of uart_base 2018-01-29 17:23:20 +01:00
bcostm 066da18e0d STM32 serial: add get_uart_index utility function 2018-01-29 17:23:20 +01:00
bcostm 0efd33f010 STM32 serial: move init_uart function at the end of file 2018-01-29 17:23:20 +01:00
bcostm 2cdc110747 STM32: fix serial 7bit data format 2018-01-22 15:43:50 +01:00
jeromecoutant e4169b7a9e STM32: update init procedure
- STDIO_UART define is no more used
- configuring a new serial with the same UART as STDIO is no more allowed
2018-01-05 15:16:38 +01:00
jeromecoutant 07e71d6ec8 STM32 LPUART : update clock source depending on expected baudrate 2017-11-23 14:52:35 +01:00
jeromecoutant 6d64c2fbf4 STM32 UART init update
- serial_init, serial_free and serial_baud function moved from serial_device.c (specific to each STM32 family) to serial_api.c (common STM32 file)
- default baudrate value was hardcoded to 9600
  - Value is set now to MBED_CONF_PLATFORM_STDIO_BAUD_RATE for STDIO
  - Value is set now to MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE for other use
- UART init will not be stopped before calling serial_baud function
2017-11-23 14:47:54 +01:00
Laurent MEUNIER f77ecf4e12 STM32: Put some serial code in common between families 2017-06-09 13:30:54 +02: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