Commit Graph

12 Commits (4300e5d6c44561992e566fac99311d822ff3f7f0)

Author SHA1 Message Date
Martin Kojtal a2cde2e24e
Merge pull request #10570 from jeromecoutant/PR_ASTYLE
STM32 astyle updates
2019-05-14 09:22:18 +01:00
jeromecoutant 0352bbbd5b STM32 astyle updates 2019-05-10 15:32:05 +02:00
Kevin Bracey 87396e0bf6 Assembler atomics
Reimplement atomic code in inline assembly. This can improve
optimisation, and avoids potential architectural problems with using
LDREX/STREX intrinsics.

API further extended:
* Bitwise operations (fetch_and/fetch_or/fetch_xor)
* fetch_add and fetch_sub (like incr/decr, but returning old value -
  aligning with C++11)
* compare_exchange_weak
* Explicit memory order specification
* Basic freestanding template overloads for C++

This gives our existing C implementation essentially all the functionality
needed by C++11.

An actual Atomic<T> template based upon these C functions could follow.
2019-04-26 13:12:35 +03:00
Laurent Meunier 14ee4a1c7b STM32WB: Add TRNG HW Semaphore
Because TRNG is a shared resource between the 2 STM32WB cores, SW needs
to acquire HW Semaphore before using the resource.
2019-03-29 16:21:45 +01: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
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 503777d850 STM32L4: correct RNG clock source 2018-12-10 14:04:25 +01:00
bcostm 08f9e80770 STM32L4 TRNG:Remove trng clock setting for L4 devices
This will be done in the system_clock.c file instead.
2018-11-26 17:36:20 +01:00
jeromecoutant 433ba46132 TARGET_STM astyle 2018-06-27 14:21:07 +02:00
Laurent MEUNIER 849749f86f STM32: RNG: Ensure that no more than 1 instance is used
There is only 1 RNG HW IP and we do not support more than one driver
user at a time, so let's ensure this is the case and raise an error if
needed.
2017-10-13 16:59:33 +02:00
Laurent MEUNIER 14343c49c4 STM32: TRNG: remove call to deprecated HAL_RNG_GetRandomNumber
HAL_RNG_GetRandomNumber is a deprecated API and replaced here with
a call to HAL_RNG_GenerateRandomNumber.

Doing so, we also rework the driver to use the 4 bytes returned by a call
to HAL_RNG_GenerateRandomNumber instead of 1 byte out of 4.

HAL_RNG_GenerateRandomNumber was not returning any error code, so now
we can also check the return code.
2017-10-13 16:59:29 +02:00
adustm bda200e814 rework after directory moves 2016-10-10 10:12:39 +02:00