Commit Graph

5295 Commits (mbed-os-5.13.1)

Author SHA1 Message Date
Ganesh Ramachandran 22de156802 Added reset_reason feature for TMPM066 & TMPM46B 2019-07-11 11:55:08 +01:00
ccli8 68aa1b22c3 [Nuvoton] Support watchdog timer 2019-07-11 11:55:08 +01:00
ccli8 5cf581cc9b [Nuvoton] Support reset reason 2019-07-11 11:55:07 +01:00
ccli8 73b12e5e70 [NUC472] Fix WDT driver in BSP 2019-07-11 11:55:07 +01:00
Qinghao Shi f3927862a5 fix bugs introduced on rebase 2019-07-11 11:55:07 +01:00
jeromecoutant db89bdf890 STM32 WATCHDOG : increase timeout value 2019-07-11 11:55:07 +01:00
jeromecoutant 43fa151efd STM32 WATCHDOG : use ST HAL in order to make code commun for all STM32 2019-07-11 11:55:07 +01:00
jeromecoutant 3a958c7f86 STM32 WATCHDOG : update STM32L0 HAL_IWDG_Init to a newest version 2019-07-11 11:55:07 +01:00
jeromecoutant 32a314d465 STM32 WATCHDOG : compilation issue with typed define 2019-07-11 11:55:07 +01:00
jeromecoutant 0071502e0b STM32 Watchdog : move API file to STM family level 2019-07-11 11:55:07 +01:00
Lukas Mandak d39d4b092d NCS36510: Added watchdog implementation. 2019-07-11 11:55:06 +01:00
Steven Cooreman a3927ad624 Add implementation of reset reason on Silicon Labs parts 2019-07-11 11:55:06 +01:00
Steven Cooreman b82d9397a4 Add support for watchdog on Silicon Labs devices 2019-07-11 11:55:06 +01:00
Filip Jagodzinski ba1a79d569 STM: HAL: Reset_reason: Correct return values 2019-07-11 11:55:06 +01:00
Bartek Szatkowski 779abf91c9 Disable Watchdog on Odin as it fails intermittently 2019-07-11 11:55:05 +01:00
Filip Jagodzinski 073320b23f K64F: watchdog HAL: Fix init() and stop()
Added a missing wait for the WCT window end. Without it, consecutive
init() or stop() calls were ignored.
2019-07-11 11:55:05 +01:00
Filip Jagodzinski 749bc03c9a STM32F4: watchdog HAL: Fix issues found with tests
Fix WATCHDOG_STATUS_INVALID_ARGUMENT for timeout values from 1 ms to
407 ms (fix inability to set prescaler bits to zero).
Fix timeout <-> IWDG registers conversions.
Fix read & write access to IWDG_PR and IWDG_RLR registers.
Fix LSI RC frequency setting.
Limit MAX_TIMEOUT_MS to UINT32_MAX.
2019-07-11 11:55:05 +01:00
Steven Cartmell be157898c1 Rename watchdog.c -> watchdog_api.c to prevent name collision with Platform API 2019-07-11 11:55:04 +01:00
Steven Cartmell 41e1d600a6 Add RESET_REASON and WATCHDOG definitions to hexiwear build target 2019-07-11 11:55:04 +01:00
Filip Jagodzinski 8158247aef K64F: watchdog HAL: Fix max_timeout.
Limit MAX_TIMEOUT_MS to UINT32_MAX.
Improve MAX_TIMEOUT_MS handling.
Fix hal_watchdog_get_platform_features() returning
.max_timeout = 0xfffffff8 instead of 0xffffffff.
2019-07-11 11:55:04 +01:00
Steven Cartmell 1f4c5b118f Fix Watchdog::stop on K64F target
WDOG_Disable will suspend the watchdog until a reset is triggered instead of stopping it altogether. Deinit will disable it until it is reinitialized.
2019-07-11 11:55:04 +01:00
Steven Cartmell a56da4f3fd Move watchdog parameter validation into the driver layer 2019-07-11 11:55:04 +01:00
Steven Cartmell c01db25544 Add missing license headers 2019-07-11 11:55:04 +01:00
Steven Cartmell 0128edd996 Remove window and sleep mode options for watchdog API 2019-07-11 11:55:04 +01:00
Steven Cartmell 0a140b97d8 Add Watchdog driver API 2019-07-11 11:55:03 +01:00
Steven Cartmell c67016eca6 Add independent watchdog reference implementation for STM32 2019-07-11 11:55:03 +01:00
Steven Cartmell c16c5184d8 Add function to fetch platform specific reset reason register values 2019-07-11 11:55:03 +01:00
Steven Cartmell 337676716c Add reset reason reference implementation STM32 2019-07-11 11:55:03 +01:00
Steven Cartmell 2d137a3c07 Fix watchdog API issues
- Fix typo in module comment
- Redefine the default system behaviour in sleep mode
- Guard K64F enableWait flag
- Remove bit shifts from reset reason enum
2019-07-11 11:55:03 +01:00
Steven Cartmell c43eec9880 Add simple watchdog reference implementation for K64F
- Add preprocessor guard to watchdog api that errors if the reset reason api is not also implemented
- Add RESET_REASON and WATCHDOG to K64F targets.json
- Add watchdog reference implementation
2019-07-11 11:55:03 +01:00
Steven Cartmell 6a22f58e5b Add K64F reset reason reference implementation 2019-07-11 11:55:03 +01:00
Hugues Kamba a2aaca4bcc Fix: Allow target size restriction for LPC55S69
The build tool uses the sector size found in the CMSIS Pack to determine if
the size that can be specified by `target.restrict_size` is enough to fit
all the parts of a given binary. See `target.restrict_size` documentation
in the Mbed OS manual for more information.

The sector size found in the CMSIS Pack is overriden to allow the build
tool to accurately make the decision.

The target's sectors in the CMSIS Pack are defined in 32KB pages.
However, you can erase pages at the 512 byte level.

This commit changes defined sector erase size to 512 bytes instead of
32 Kilobytes.
2019-07-11 11:55:02 +01:00
Mahesh Mahadevan c0f2bab022 LPC546XX: Add pins to LPCXpresso restricted list
FPGA GPIO tests cannot be run on certain pins

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-11 11:41:30 +01:00
Steven Cooreman 918f70c3f7 Allow re-initializing an I2C peripheral
Allows the FPGA based test to pass, but requires #11004 before it will
2019-07-11 11:41:30 +01:00
jeromecoutant 854ebf4e7a STM32 LPUART update 2019-07-11 11:41:30 +01:00
Przemyslaw Stekiel 0b009a4029 K64F SPI driver: Add the delay between CS assertion and first sclk edge
FPGA test shield requires at lease half slck period delay between CS assertion and first sclk edge.
2019-07-11 11:41:30 +01:00
itziar 1348db5af7 add new target IM880B 2019-07-11 11:41:30 +01:00
Arto Kinnunen abe6fbdc40 Adjust K66F GCC_ARM linker file
Move heap_0 after .data as it is also placed to m_data.
2019-07-11 11:41:30 +01:00
Kevin Bracey ddd6c9a623 Enable split heap in K64F/K66F devices
-Enable MBED_SPLIT_HEAP for K64F and K66F
-Allow GCC_ARM toolchain to utilize remaining 64K memory area
-Make ARM toolchain to start memory filling from 64K region to leave
 more space to bigger 192K region.
2019-07-11 11:41:30 +01:00
Ganesh Ramachandran 5b70b677a4 Changes for RTC peripheral status 2019-07-11 11:41:30 +01:00
Ganesh Ramachandran 92c4acee7f Added new features to TMPM3HQ 2019-07-11 11:41:30 +01:00
Ganesh Ramachandran 254c69ad90 Changes for RTC peripheral status 2019-07-11 11:40:55 +01:00
Ganesh Ramachandran 2d1da6cfa3 Added new features to TMPM3H6 2019-07-11 11:40:55 +01:00
Teemu Takaluoma a39a849ee1 Add FLASHIAP for MTB_STM_S2LP
Fix device management client compilation on MTB_STM_S2LP

Fixes:

./mbed-cloud-client/mbed-client-pal/Source/Port/Reference-Impl/OS_Specific/mbedOS/ROT/pal_plat_rot.cpp:67:5: error: 'DeviceKey' was not declared in this scope
    DeviceKey &devkey = DeviceKey::get_instance();
2019-07-11 11:40:55 +01:00
Tymoteusz Bloch 8213d94744 Nordic NRF52832 onboard instruction cache is turned ON to increase MCU performance 2019-07-11 11:40:55 +01:00
ThunderSoft_mbed_os 8e9cfca7ad Update gpio_irq_api.c 2019-07-11 11:40:55 +01:00
ThunderSoft_mbed_os 6d5ff0bb64 Update gpio_irq_api.c 2019-07-11 11:40:55 +01:00
panyz0725@thundersoft.com 81edde1f13 Add GPIO INT pin with PT1 2019-07-11 11:40:55 +01:00
Ganesh Ramachandran e74f84fddb Changes for RTC peripheral status 2019-07-11 11:40:55 +01:00
Ganesh Ramachandran 764f9ffbcf Removed dead code in TMPM4G9 - rtc_api.c 2019-07-11 11:40:55 +01:00
Ganesh Ramachandran a43e157d8d ARMC5 updated to ARM for TMPM4G9 2019-07-11 11:40:55 +01:00
Ganesh Ramachandran 1b010a3fee Added SPDX identifier 2019-07-11 11:40:55 +01:00
Ganesh Ramachandran 7a9145f8e9 Added new features to TMPM4G9 2019-07-11 11:40:55 +01:00
Tymoteusz Bloch f7fced62a6 IAR icf linker scripts modified to use dynamic heap allocation of all available memory. 2019-07-11 11:40:54 +01:00
George Beckstein a2e382124a Apply same resolution fix to nRF52832 targets 2019-07-11 11:40:54 +01:00
George Beckstein 634b10b864 Fix SAADC resolution set in sdk_config. analogin_read_u16 assumes 12-bit range but config was set to 10 bit range causing incorrect readings to be returned. 2019-07-11 11:40:54 +01:00
Qinghao Shi 50077fb38a FastModel: change Fastmodel memory layout regions from 3 to 2
- change memoryzones.h
 - change linker scripts for each toolchains
2019-07-11 11:40:54 +01:00
Qinghao Shi 1d98d2adc2 FastModel: enable FLASHIAP componment 2019-07-11 11:40:54 +01:00
Laurent Meunier a424c4c7b2 STM32 with low level ticker wrapper require Extra Idle stack 2019-07-11 11:40:54 +01:00
Laurent Meunier 06e23fbde3 STM32: lp_ticker optim: initialize handle once only 2019-07-11 11:40:54 +01:00
Laurent Meunier 95fc693c9d STM32: lp_ticker optim: remove irq_handler variable 2019-07-11 11:40:54 +01:00
Laurent Meunier c279c97404 Update comments and fix typo 2019-07-11 11:40:54 +01:00
Laurent Meunier 16f2f0b1d3 Update warning now that C++ wrapper is not needed anymore
Now we'd rather not use this wrapper and use instead the low level
wrapper implemented in this driver.
2019-07-11 11:40:54 +01:00
Laurent Meunier f3f3ac47a0 STM32 targets: remove tickless from us ticker and delay ticker
For L0/L4/H7/F7/WB targets that have tickless enabled, remove the tickless from
us ticker and the delay ticks as the C++ wrapper layer is being removed
and replaced by the low layer handling.

For now, the few F4 targets with LPTIM are left with previous configuration
as test results are showing a few instabilities not yet understood.
2019-07-11 11:40:54 +01:00
Laurent Meunier deab60901c Manage lp_ticker delay at low level
LP TICKER mbed-os wrapper needs to be disabled as it introduces too much latencies.

LP TICKER wrapper has been disabled and we need to managed the HW constraints at low level:
- main HW constraint is that once the comparator has been programmed once,
driver cannot program it again before CMPOK HW flag is set, which takes about 3 30us cycles.

To make it even more complex, the driver also needs to cope with "LP ticker workaround"

See commit:

LP ticker workaround

    There is an errata in LPTIM specification that explains that CMP Flag
    condition is not an exact match (COUNTER = MATCH) but rather a
    comparison (COUNTER >= MATCH).

Also the disable interrupt is more complete now:
- always check sleep manager status and restore it
- remove irq_handler as comparator is always programed and might get called
eventually when LP TICK is restarted
- reset delayed_prog

Also in set_interrupt, make sure interrupt does not fire early.
If needed, we decide to slightly delay the tick to cope with the HW limitation to
make sure it will fire as soon as HW is capable.

Functions are called under critical section as they may be called from
the IRQ handler now, not only from driver layer.
2019-07-11 11:40:54 +01:00
Laurent Meunier c4073fccd5 LP ticker workaround
There is an errata in LPTIM specification that explains that CMP Flag
condition is not an exact match (COUNTER = MATCH) but rather a
comparison (COUNTER >= MATCH).

As a consequence the interrupt is firing early than expected when
programing a timestamp after the 0xFFFF wrap-around.

In order to
work-around this issue, we implement the below work-around.
In case timestamp is after the work-around, let's decide to program the
CMP value to 0xFFFF, which is the wrap-around value. There would anyway be
a wake-up at the time of wrap-around to let the OS update the system time.
When the wrap-around interrupt happen, OS will check the current time and
program again the timestamp to the proper value.
2019-07-11 11:40:54 +01:00
Mahesh Mahadevan 24efeb84fe Kinetis MCUXpresso: Update the clock drivers
Updated driver includes
1. Bug fixes
2. Formatting updates.
3. Fix for warnings
4. Better code commenting

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-11 11:40:54 +01:00
Kevin Bracey d65a7d36dc STM: Correct macro test in us_ticker_defines.h
Avoids build warning caused by #10609
2019-07-11 11:40:54 +01:00
Mathias Brossard 19babe2178 LPC55S69: fix cosFactor data size in header file
The file 'fsl_powerquad_data.h' declares several dctXXX_cosFactor
arrays with sizes twice larger compared to the actual definitions in
'fsl_powerquad_data.c'.
2019-07-11 11:40:54 +01:00
jeromecoutant dc6441bfc8 NUCLEO_H743ZI2 new target support 2019-07-11 11:40:54 +01:00
Malavika Sajikumar 4251b8cf5e Removing I2C and SPI pin names in SDP-K1 PinNames.h file. This is to ensure the use of Arduino pin names Dxx for I2C and SPI pins in programs written for SDP-K1 board. 2019-07-11 11:40:54 +01:00
George Beckstein f160dd5e90 Fix alignment 2019-07-11 11:40:54 +01:00
George Beckstein 6b539e99bc Fixed bug causing Nordic drivers to use a different critical section API from Mbed. This caused conflicts when Nordic's critical section API would globally reenable interrupts while Mbed still expected to be in a critical section. 2019-07-11 11:40:54 +01:00
Kevin Bracey 77877614b8 STM: optimize us_ticker
Provide new optimizations for us_ticker and wait_us.
2019-07-11 11:40:54 +01:00
Kevin Bracey 49b98a5b2a Freescale MCUXpresso: optimize us_ticker
Provide new optimizations for us_ticker and wait_us.
2019-07-11 11:40:54 +01:00
Kevin Bracey 0d12800b9f wait_us optimization
As the timer code became more generic, coping with initialization on
demand, and variable width and speed us_ticker_api implementations,
wait_us has gradually gotten slower and slower.

Some platforms have reportedly seen overhead of wait_us() increase from
10µs to 30µs. These changes should fully reverse that drop, and even
make it better than ever.

Add fast paths for platforms that provide compile-time information about
us_ticker. Speed and code size is improved further if:

* Timer has >= 2^32 microsecond range, or better still is 32-bit 1MHz.
* Platform implements us_ticker_read() as a macro
* Timer is initialised at boot, rather than first use

The latter initialisation option is the default for STM, as this has
always been the case.
2019-07-11 11:40:54 +01:00
Alexandre Bourdiol 22a8e19ebe STM32: pwmout_write: configure channel only when not already enabled
Fix PWM glitch on write(), TARGET_STM/pwmout_api.c, #10734
2019-07-11 11:40:53 +01:00
Hugues Kamba 6576bbba93 bootloader: Fix LPC55S69 bootloader segmentation
As the build tool in mbed-os 5.13 cannot appropriately deal with a segmented
bootloader when combining it with an application, this commit adjusts the
size reserved for interrupts (via the linker file) to avoid a bootloader
segmentation due to an unpopulated ROM area.

The microcontroller has a total of 60 vector interrupts + 16 exception
handlers. The allocated ROM flash for interrupts should be (60 + 16) x word
size in bytes = 76 x 4 = 304 = 0x130.

This commit changes the interrupt reserved space from 0x140 to 0x130.
2019-07-11 11:40:53 +01:00
Devaraj Ranganna c802042952 Remove MBEDTLS_PSA_CRYPTO_C from PSA NS targets
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2019-07-11 11:40:53 +01:00
Devaraj Ranganna 9bd8925042 1. Include MBEDTLS_CONFIG_FILE before evaluating MBEDTLS_PSA_CRYPTO_C 2. Remove macro MBEDTLS_PSA_CRYPTO_C from PSA targets
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 742fff4f5b K82F: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 206cc999e6 KL27Z: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 4799f3de6b K66F: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski ad48edbda0 KL43Z: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 73f4e0306e KL82Z: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 66cf982b2c KW24D: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 0ab31ca416 KW41Z: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski cde58d2a65 K24F: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski d184baf6e9 K22F: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 9a4db66bf5 STM32WB: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 9c1664f21e STM32L4: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 69582c3eed STM32H7: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 3bc4f9599f 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-07-11 11:40:53 +01:00
Filip Jagodzinski b006fe2a31 STM32L0: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 92b43947c8 STM32F0: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski a6dd6f0bde STM32F7: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski f158ac0077 K64F: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling
a registered handler with RxIrq or TxIrq arg.
2019-07-11 11:40:53 +01:00
jeromecoutant ad3b345aa4 STM32: enable CRC for all L0/L4/F7 2019-07-11 11:40:53 +01:00
Maciej Bocianski 121f28da0f HAL I2C: adds missing DEVICE_I2C guards 2019-07-11 11:40:53 +01:00
Qinghao Shi bb726b3be6 modify targets.json to trun off MPU 2019-07-11 11:40:52 +01:00