Laurent Meunier
e862438fad
Clearing UART TC Flag prevents deep sleep, so do not clear it
...
The TC flag is used in function serial_is_tx_ongoing to check if there is
an ongoing serial transmission. So this Flag must not be cleared at the
end of the transmission, otherwise, serial_is_tx_ongoing will notify that
TX is ongoing.
The impact is that it may prevent deep sleep to be entered.
Also there is no need to clear this flag at the end of the transaction
because it will be cleared automatically by HW when a new transmission
starts.
2019-10-15 15:59:51 +02:00
jeromecoutant
db7efabfd5
STM license file update
...
Some code have been copied from ST Cube deliveries.
ST copyright is then needed.
2019-09-10 14:24:48 +02:00
int_szyk
3fa878f8a8
Change LSI_VALUE in STM implementation.
...
Wrong LSI value might be causing problems witch watchdogs.
2019-08-30 13:54:39 +02:00
Alexandre Bourdiol
7647b39adc
TARGET_STM: I2C sequential communication revert PR #3324 to original cube HAL
2019-08-22 10:44:20 +02:00
Martin Kojtal
de84004be1
Merge pull request #11189 from LMESTM/pwmout_cpp_guard
...
__cplusplus guard fixed pwmout_device.h for STM32 families
2019-08-13 11:19:24 +02:00
Laurent Meunier
319223ac16
__cplusplus guard fixed pwmout_device.h for STM32 families
...
This bug prevented using this header in cpp code directly.
2019-08-09 09:51:39 +02:00
Yuan Cao
6ed21ee1c0
Fixed serial_device IRQ infinite loop bug due to uint8_t overflowing
2019-07-13 00:05:25 -04:00
Martin Kojtal
ccb63d771e
Merge pull request #10857 from ARMmbed/feature-watchdog
...
Add Watchdog and ResetReason
2019-07-03 11:43:52 +01:00
Martin Kojtal
61c4d05ce9
Merge pull request #10824 from ABOSTM/PRSTM32_PWMWRTIE_GLITCH_10734
...
STM32: pwmout_write: configure channel only when not already enabled
2019-06-28 14:24:14 +01:00
Martin Kojtal
924af9481e
Merge pull request #10841 from VVESTM/vve_10827_spi_count
...
TARGET_STM: Add DEVICE_SPI_COUNT to use SPIs without interference
2019-06-26 09:09:38 +01:00
Martin Kojtal
b0073bb70d
Merge pull request #10774 from fkjagodzinski/fix-uart_irq
...
Fix serial IRQ handling
2019-06-25 15:49:41 +01:00
Alexandre Bourdiol
a339084684
STM32: pwmout_write: configure channel only when not already enabled
...
Fix PWM glitch on write(), TARGET_STM/pwmout_api.c, #10734
2019-06-20 17:49:16 +02:00
Vincent Veron
31eb49b918
TARGET_STM: Add DEVICE_SPI_COUNT to use SPIs without interference
...
Extend to all STM targets the work done on PR10752.
Signed-off-by: Vincent Veron <vincent.veron@st.com>
2019-06-14 14:15:56 +02:00
jeromecoutant
89f554fb53
STM32F3 warning compilation
...
[-Wparentheses-equality]
2019-06-07 18:08:51 +02:00
Filip Jagodzinski
d6a48218ee
STM32F3: Fix serial IRQ handling
...
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-06-07 15:26:20 +02:00
jeromecoutant
d919498745
STM32: common cmsis.h and device.h
2019-05-27 16:27:41 +02:00
jeromecoutant
570e9b0bf4
STM32 WATCHDOG : increase timeout value
2019-05-24 11:35:42 +02:00
jeromecoutant
ec00ea5655
STM32 ADC INTERNAL CHANNEL reset after read
...
Internal channels use is enabling ADC "internal path"
which needs to be disabled after measurement
2019-03-29 14:30:49 +01:00
ecoromka
757b9e250d
Fix tempsensor cal1 constant in stm32f3xx_ll_adc.h
...
Fix TEMPSENSOR_CAL1_TEMP according to datasheet.
2019-03-26 10:42:38 -05:00
deepikabhavnani
0dc5561991
Guard RAM start and size defines
2019-02-28 19:54:38 -06:00
deepikabhavnani
b598dc1f46
Target_STM: Add ARM_LIB_STACK and ARM_LIB_HEAP section
...
Instead of user defined symbols in assembly files or C files,
use linker scripts to add heap and stack - this is inconsistent
with ARM std linker scripts
2019-02-28 19:54:28 -06:00
Deepika
e522c4691e
Target_STM:_sbrk updated to use limits from linker files no need to set defines
...
_sbrk uses the exports from linker file __end and __HeapLimit to allocate memory
in heap. Linker scripts were updated accordingly to set the limits.
2019-02-19 15:49:49 -06:00
Russ Butler
3bd3aca6db
Add HAL API for analog out pinmap
...
Add the function analogout_pinmap to all targets.
2019-02-08 09:10:05 -06:00
Russ Butler
4818f88d73
Add HAL API for analog in pinmap
...
Add the function analogin_pinmap to all targets.
2019-02-08 09:09:51 -06:00
Martin Kojtal
ed53fe1ed4
Merge pull request #9534 from jeromecoutant/PR_FLOW
...
STM32 Serial Flow Control
2019-02-04 14:35:47 +01:00
jeromecoutant
eec7126d37
STM32 Serial Flow Control
...
Crash occured when RTS=CTS=NC
Now we chek if used pins are the same UART as TX and RX
2019-01-31 17:11:23 +01:00
jeromecoutant
a5ef971402
STM32: PeripheralPins files minor update
...
Script version 1.4
CubeMX DB version DB.5.0.1
2019-01-24 10:51:30 +01:00
Przemyslaw Stekiel
58f6bf7292
[STM] Support boot stack size configuration option
2019-01-08 15:32:06 +01:00
Alastair D'Silva
aa80b7c70a
Don't use define checks on DEVICE_FOO macros (partner code)
...
The DEVICE_FOO macros are always defined (either 0 or 1).
This patch replaces any instances of a define check on a DEVICE_FOO
macro with value test instead.
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
2018-12-20 20:02:29 +11:00
jeromecoutant
6b226ffcef
STM32 RTC update for easy maintenance
2018-12-04 11:08:30 +01:00
jeromecoutant
baec3b9e90
STM32 remove html release notes files
2018-11-22 16:27:59 +01:00
David Saada
542744d03c
Support erase value in Flash HAL drivers, FlashIAP and block devices
2018-11-07 14:23:07 +02:00
Deepika
bf1a2c8485
[ST]: Fix alignment of execute region to 8-byte boundary in ARM linker files
...
--legacyalign, --no_legacyalign are deprecated from ARMC6 compiler, in order to
remove deprecated flags all linker files should strictly align to 8-byte boundary
2018-10-09 14:47:14 -05:00
Martin Kojtal
7a057d7ec8
Merge pull request #8085 from jeromecoutant/PR_RTC_LSI
...
STM32 RTC : start LSI clock (for targets without LSE)
2018-10-04 13:37:53 +02:00
jeromecoutant
52776a1e7b
SM32F3 correct analogin_read
2018-09-14 11:41:12 +02:00
jeromecoutant
827c8bd486
STM32 RTC : remove not necessary macro
...
__HAL_RCC_RTC_CLKPRESCALER is called in __HAL_RCC_RTC_CONFIG
2018-09-11 14:14:19 +02:00
Cruz Monrreal
a8f390ebec
Merge pull request #7798 from simosillankorva/NUCLEO_F303RE_bootloader_support
...
Add bootloader support for target NUCLEO_F303RE
2018-08-21 09:50:26 -05:00
Simo Sillankorva
c6acfd389b
Change NUCLEO_F303RE IAR Linker script heap size
...
* Change the heap size value to be the stated 1/4 of the RAM.
2018-08-16 01:58:43 -07:00
Simo Sillankorva
83608d59ac
Add bootloader support for target NUCLEO_F303RE
2018-08-15 07:30:05 -07:00
jeromecoutant
974141ce48
STM32F3 assert in SetSysClock replaced
2018-08-13 15:51:35 +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
7097e07b62
stm32 ticker: typo corrections
2018-07-11 14:43:36 +02:00
bcostm
d8e839a789
stm32 ticker: change license
2018-07-11 14:43:16 +02:00
bcostm
32031cbab3
stm32 ticker: rename hal_tick.h in us_ticker_data.h
2018-07-11 14:42:44 +02:00
bcostm
fbd7a97e19
stm32 ticker: rename macro and update ST HAL Tick functions
...
- rename TIM_MST_16BIT in TIM_MST_BIT_WIDTH in order to use it directly in ticker info structure
- change HAL_InitTick() and HAL_GetTick()
2018-07-11 14:39:42 +02:00
jeromecoutant
3721ac44d2
STM32 serial RX/TX active patch
...
In serial_tx_active and serial_rx_active functions,
we check the internal state value with
HAL_UART_STATE_BUSY_TX = 0x21U,
HAL_UART_STATE_BUSY_RX = 0x22U,
It seems that value can also be :
HAL_UART_STATE_BUSY_TX_RX = 0x23U,
2018-06-28 18:05:52 +02:00
jeromecoutant
6df23ee841
TARGET_STM32F3 astyle
2018-06-27 14:32:10 +02:00
bcostm
b087390a1a
Remove HAL_TICK_DELAY (no more used)
2018-06-05 16:53:40 +02:00
Cruz Monrreal
07fb7c1adc
Merge pull request #6987 from jeromecoutant/PR_ADC
...
STM32 ADC update
2018-06-02 19:52:51 -05:00
Cruz Monrreal
3bcc076c0c
Merge pull request #6931 from jeromecoutant/PR_PERIPH
...
STM32 : PeripheralPins.c and PinNames.h files alignment
2018-05-22 14:56:37 -05:00
jeromecoutant
e438bd6dc8
STM32F3 ADC internal channels update
2018-05-22 11:42:35 +02:00
jeromecoutant
b30f3abf11
STM32 PeripheralPins.c second update after review
...
genpinmap script version 1.1
2018-05-17 17:58:09 +02:00
jeromecoutant
02e8172538
STM32F3 DISCO : PeripheralPins.c and PinNames.h files alignment
2018-05-16 17:04:58 +02:00
jeromecoutant
817bdc213d
STM32F3 NUCLEO : PeripheralPins.c and PinNames.h files alignment
2018-05-16 17:04:10 +02:00
bcostm
6154fd2598
F3 ST CUBE V1.9.0: remove pcd patch
...
The Lock field is no more available in PCD structure.
2018-05-07 10:58:49 +02:00
bcostm
ccf71f0360
F3 ST CUBE V1.9.0: fix build errors with legacy macros
2018-05-07 10:58:49 +02:00
bcostm
d0f8def2d7
F3 ST CUBE V1.9.0
2018-05-07 10:58:49 +02:00
jeromecoutant
a540a21106
STM32F3 : correct compilation warnings
2018-04-12 10:51:33 +02:00
jeromecoutant
e0e6e5a9e5
DISCO_F303VC : Align clock configuration with STM32 family
2018-02-08 14:25:46 +01:00
jeromecoutant
e8e4af3c7a
DISCO_F303VC : add IAR files
2018-02-08 14:25:45 +01:00
jeromecoutant
1ab4030f20
DISCO_F303VC : wrong STDIO pins
2018-02-08 14:25:45 +01:00
Cruz Monrreal
f907012e55
Merge pull request #5962 from bcostm/fix_usart_irq_index
...
STM32: Fix usart irq index
2018-01-31 12:16:17 -06:00
bcostm
eeb4d2cd1d
STM32 serial: improve irq index management for F3 devices
2018-01-29 17:23:21 +01:00
jeromecoutant
8f647beacb
STM32 : set all PinMap structures as weak
...
This allow custom overwrites
2018-01-29 09:26:49 +01:00
jeromecoutant
a7bddff5cc
STM32F3: STDIO_UART_TX and STDIO_UART_RX can be now user defined
2018-01-08 11:12:04 +01:00
Jimmy Brisson
324e53b770
Merge pull request #5697 from bcostm/dev_flash_f3
...
STM32: Add support of Flash API for STM32F3 devices
2018-01-04 10:00:41 -06:00
Jimmy Brisson
62a7ecddd3
Merge pull request #5570 from jeromecoutant/PR_STDIO
...
STM32 UART init update
2018-01-04 09:50:18 -06:00
bcostm
8203a8ddf5
STM32F3: Remove flash functions doc + typos
2018-01-02 14:28:09 +01:00
bcostm
563338ad58
STM32F3: reset PGERR flash flag
2018-01-02 14:28:09 +01:00
bcostm
b5324cae32
STM32F3: flash_api typos
2018-01-02 14:28:09 +01:00
bcostm
0d09f6d788
STM32F3: add Flash api
2018-01-02 14:28:09 +01:00
jeromecoutant
75db24ff15
STM32F3 : compilation issue
...
Issue comes only when ST HAL macro USE_FULL_ASSERT is enabled
2017-12-13 13:56:42 +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
bcostm
c54e9079b8
STM32 ADC: replace flags type from int to bool
2017-11-17 13:50:59 +01:00
bcostm
1d3eb508bf
STM32: fix linker error with adc_read()
2017-11-17 13:50:59 +01:00
bcostm
34fdcc926b
STM32: move analogin_read functions in a common file
2017-11-17 13:50:59 +01:00
bcostm
4dbe95dded
STM32: rename analogin_api.c in analogin_device.c
2017-11-17 13:50:59 +01:00
bcostm
7005bc21d7
STM32F3 ADC: remove adc_inited flag
2017-11-17 13:50:59 +01:00
Martin Kojtal
114e019675
Merge pull request #5486 from bcostm/fix_CAN3
...
STM32: Add support of CAN3
2017-11-16 16:12:27 +00:00
bcostm
be2a6ae273
STM32: Use CAN3_BASE + typos
2017-11-14 09:48:02 +01:00
Bartek Szatkowski
c5a5438256
Update params in calls to LD/STREXW to be uint32_t
2017-11-10 09:53:42 +00:00
bcostm
ad55bc26dc
STM32: Remove GCC_ARM compilation warnings
2017-10-17 14:04:59 +02:00
Jimmy Brisson
de3784f6da
Merge pull request #5288 from bcostm/NUCLEO32_add_ALT_pins
...
STM32: Add alternate pins on NUCLEO 32pins boards
2017-10-13 09:27:53 -05:00
Jimmy Brisson
6a74cdb39c
Merge pull request #5263 from bcostm/fix_init_struct
...
STM32: Fix analogout structure/variable wrong initialization
2017-10-13 09:25:59 -05:00
bcostm
f6e30e7422
NUCLEO_F303K8: add ALT pins + cleanup
2017-10-10 10:50:48 +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
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
bcostm
fca97146cd
Add ADC calibration for STM32F1 and F3 devices
2017-09-28 12:49:11 +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
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
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
jeromecoutant
3826ad23f6
STM32F3 : internal ADC channels
2017-08-09 11:01:23 +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
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
jeromecoutant
bc40b735d4
STM32F3 : json clock source configuration
...
- default value is the same as before patch
- system_stm32f3xx.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)
2017-07-19 16:23:42 +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