Commit Graph

17 Commits (e4b03a157739050f626073a925882677cb2a07aa)

Author SHA1 Message Date
jeromecoutant c8737c593d STM32WB RNG: enable use from both M4 and M0+ core 2020-07-02 10:17:08 +02:00
jeromecoutant c1386cf52d STM32L5 : update generic STM files for L5 2020-01-23 17:54:55 +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
jeromecoutant 7db11e0b20 STM32 TRNG clock configuration 2019-10-17 13:51:33 +02: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
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