Commit Graph

210 Commits (ab5eb07e3c84fa7153284a40f434415f9745ff3d)

Author SHA1 Message Date
jeromecoutant ba7deb4660 STM32L1 baremetal support 2020-06-08 11:46:56 +02:00
jeromecoutant c96eb2cd0e STM32 rename TOOLCHAIN_ARM_STD into TOOLCHAIN_ARM 2020-05-15 10:41:28 +02:00
jeromecoutant 303752ad84 STM32 remove all TOOLCHAIN_ARM_MICRO 2020-05-15 09:37:40 +02:00
MarceloSalazar 93db82f591 Remove NZ32_SC151 target 2020-04-20 16:55:34 +01:00
MarceloSalazar 7839bbbe39 Remove IM880B target 2020-04-20 16:55:34 +01:00
MarceloSalazar bf590310db Remove MTB_RAK811 target 2020-04-20 16:55:34 +01:00
MarceloSalazar e78ba7065b Remove MTB_MTS_XDOT target 2020-04-20 16:55:33 +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
Alexandre Bourdiol 41b038a028 TARGET_STM: rework hal_sleep management to be compatible with all STM32 families 2019-11-27 14:25:30 +01:00
Laurent Meunier f20529f9e6 STM32: Update and align serial_clear implementations
Clear RXNE flag by reading the RX register and align this implementation
on all families.
2019-11-25 14:55:32 +01:00
Martin Kojtal df79609cc5
Merge pull request #11675 from jeromecoutant/PR_USB_STEP1
STM32 USB update step 1
2019-10-28 14:06:15 +01:00
Kevin Bracey fb6aa3ef4f Clean up ARM toolchain heap+stack setup in targets
ARM Compiler 6.13 testing revealed linker errors pointing out
conflicting use of `__user_setup_stackheap` and
`__user_initial_stackheap` in some targets. Remove the unwanted
`__user_initial_stackheap` from the targets - the setup is
centralised in the common platform code.

Looking into this, a number of other issues were highlighted

* Almost all targets had `__initial_sp` hardcoded in assembler,
  rather than getting it from the scatter file. This was behind
  issue #11313. Fix this generally.
* A few targets' `__initial_sp` values did not match the scatter
  file layout, in some cases meaning they were overlapping heap
  space. They now all use the area reserved in the scatter file.
  If any problems are seen, then there is an error in the
  scatter file.
* A number of targets were reserving unneeded space for heap and
  stack in their startup assembler, on top of the space reserved in
  the scatter file, so wasting a few K. A couple were using that
  space for the stack, rather than the space in the scatter file.

To clarify expected behaviour:

* Each scatter file contains empty regions `ARM_LIB_HEAP` and
  `ARM_LIB_STACK` to reserve space. `ARM_LIB_STACK` is sized
  by the macro `MBED_BOOT_STACK_SIZE`, which is set by the tools.
  `ARM_LIB_HEAP` is generally the space left over after static
  RAM and stack.
* The address of the end of `ARM_LIB_STACK` is written into the
  vector table and on reset the CPU sets MSP to that address.
* The common platform code in Mbed OS provides `__user_setup_stackheap`
  for the ARM library. The ARM library calls this during startup, and
  it calls `__mbed_user_setup_stackheap`.
* The default weak definition of `__mbed_user_setup_stackheap` does not
  modify SP, so we remain on the boot stack, and the heap is set to
  the region described by `ARM_LIB_HEAP`. If `ARM_LIB_HEAP` doesn't
  exist, then the heap is the space from the end of the used data in
  `RW_IRAM1` to the start of `ARM_LIB_STACK`.
* Targets can override `__mbed_user_setup_stackheap` if they want.
  Currently only Renesas (ARMv7-A class) devices do.
* If microlib is in use, then it doesn't call `__user_setup_stackheap`.
  Instead it just finds and uses `ARM_LIB_STACK` and `ARM_LIB_HEAP`
  itself.
2019-10-23 14:53:49 +03:00
jeromecoutant 2c03f3a61e STM32L1 USB pins addition 2019-10-21 17:11:53 +02:00
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 1673e8aa1b STM32L151: update calibration memory address 2019-10-03 14:17:04 +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
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
Seppo Takalo 8efd123776
Merge pull request #11042 from caoyuan96421/bugfix
Fixed serial_device IRQ infinite loop bug due to uint8_t overflowing in STM devices
2019-07-17 14:33:21 +03:00
Seppo Takalo b22641ca18 Normalize line endings for IM880B startup files. 2019-07-15 14:56:22 +03:00
Yuan Cao 6ed21ee1c0 Fixed serial_device IRQ infinite loop bug due to uint8_t overflowing 2019-07-13 00:05:25 -04:00
itziar c327f4f070 add new target IM880B 2019-07-05 09:19:51 +01: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
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 43a304351a STM32L1 warning compilation
[-Wparentheses-equality]
2019-06-07 18:10:17 +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
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
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
Cruz Monrreal 2454b25eba
Merge pull request #9092 from mprse/stack_unification_sec_try
Interrupt stack size unification + test
2019-01-10 16:08:44 -06:00
Martin Kojtal c27dabe765
Merge pull request #9256 from jeromecoutant/PR_FLASHEEPROM
STM32L0 & STM32L1: FLASH is EEPROM
2019-01-08 15:06:50 +00:00
Przemyslaw Stekiel 58f6bf7292 [STM] Support boot stack size configuration option 2019-01-08 15:32:06 +01:00
jeromecoutant ef2fcebf57 STM32 L0 & L1: FLASH is EEPROM 2019-01-04 15:37:16 +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
jeromecoutant f41c72ded8 STM32L1 ADC update for internal channels 2018-09-14 13:23:50 +02:00
jeromecoutant ac06d5574b STM32L1 assert in SetSysClock replaced 2018-08-13 15:56:20 +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