Commit Graph

5375 Commits (mbed-os-5.13.4)

Author SHA1 Message Date
Szymon Szantula 5f4825c5bf __cplusplus guard fixed
This error prevented using this header in cpp code directly.
2019-08-12 12:54:46 +01:00
Maciej Bocianski b2bd371aa8 Xpresso: qspi_write fix
Due to the data buffer is loaded in two steps the whole block needs protection from being interrupted
2019-08-12 12:54:45 +01:00
Kyle Kearney 0bde671c86 Fix inout pins not functioning correctly
Update the drive mode when setting the GPIO direction.
2019-08-12 08:35:16 +01:00
desmond.chen edfdc946c3 NRF52 need to call TIMER_TASK_SHUTDOWN for current consumption 2019-08-12 08:35:16 +01:00
maclobdell a83dc21e97 fix rom start & size for psoc6 targets for 5.13 2019-08-12 08:35:15 +01:00
Maciej Bocianski 29aa19379b freescale: fix i2c_byte_read function 2019-08-12 08:32:07 +01:00
Chun-Chieh Li d8dff83fcb Nuvoton: Remove dead code nu_delay_cycle_x4(...)
Originally, nu_delay_cycle_x4(...) is borrowed from mbed test code for delay
cycle. Currently, it is not used on Nuvoton targets. If delay cycle is needed,
use wait_ns(...) instead which has strict implementation and has passed tests.
2019-08-12 08:32:07 +01:00
Leszek Rusinowicz 0fabceea00 FUTURE_SEQUANA: Add missing serial_free() implementation 2019-08-12 08:32:07 +01:00
Neil Tuttle 22238f8187 PSOC6: Remove USBDEVICE from FUTURE_SEQUANA targets 2019-08-12 08:32:05 +01:00
Neil Tuttle 227b6ce027 PSOC6: USB device implementation 2019-08-12 08:32:05 +01:00
Kyle Kearney 217a1da362 Bug fixes to I2C and SPI drivers
- Fix assert when spi_master_block_write called with 0 size
- Fix assert when spi_format called before spi_frequency
- Simplify implementation of spi_master_write
- Simplify pointer arithmetic expressions in cyhal_spi_transfer and
  cyhal_spi_transfer_async
- Fix I2C driver not honoring the frequency specified during init.
2019-08-12 08:32:05 +01:00
Kyle Kearney b9e9ff94a7 Add target for CY8CKIT_062S2_43012 2019-08-12 08:32:05 +01:00
Evelyne Donnaes 337c5b424f "Update secure binaries for LPC55S69_S (ARMC6)" 2019-07-26 15:58:04 +01:00
Ben Cooke 6e1dc84263 nrf52840: remove align instructions from gcc linker for ARM.extab exidx sections 2019-07-25 15:18:28 +01:00
George Beckstein fa620d55ce Fix SAADC resolution for nRF52-based targets... again 2019-07-25 15:18:28 +01:00
Ben Cooke 30e747760a NRF52840: enable TRNG in Nordic SDK config 2019-07-25 15:18:28 +01:00
Mahesh Mahadevan ecb444b989 MCUXpresso: Fix the LPC GPIO IRQ driver
The IRQ disable was always disabling both rising
and falling edges of the interrupt thereby causing
failures in cases when one of the two should stay enabled.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-25 15:18:28 +01:00
Mahesh Mahadevan f23bb080d6 LPC54114: Fix compile warnings
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-25 15:18:27 +01:00
Mahesh Mahadevan e019d7a64f MCUXpresso: Update LPC SPI HAL driver
Add support for different slave selects

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-25 15:18:27 +01:00
Mahesh Mahadevan df8cf28084 MCUXpresso: Update the Analogin driver for LPC devices
1. Update the clock divider setting
2. ADC resolution is 12-bits, update the API return value
   to return 16-bit result
3. Update IOMUX setup

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-25 15:18:27 +01:00
Mahesh Mahadevan dc5ff9ecd6 LPC54114: Update the ADC SDK driver
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-25 15:18:27 +01:00
Mahesh Mahadevan 1ad10d72c7 LPC546XX: Update the ADC SDK driver
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-25 15:18:27 +01:00
Yuan Cao 06193b6601 Fixed serial_device IRQ infinite loop bug due to uint8_t overflowing 2019-07-25 15:18:27 +01:00
Filip Jagodzinski e5abb9f770 RDA5981X: Add SERIAL_FC
According to comment in the implementation this target supports the
hardware flow control on UART1 peripheral.
This patch fixes build errors after adding DEVICE_SERIAL_FC guards to
hal/serial_api.h.
2019-07-25 15:18:27 +01:00
Filip Jagodzinski 81fd20a07f MPS2: Fix serial_init when FC is not used
After adding DEVICE_SERIAL_FC guards to serial_api.h
serial_set_flow_control is not available. In case of this
implementation, this function is a no-op and may be safely removed.
2019-07-25 15:18:27 +01:00
Filip Jagodzinski 26343e960e FVP_MPS2: Fix serial_init when FC is not used
After adding DEVICE_SERIAL_FC guards to serial_api.h
serial_set_flow_control is not available. In case of this
implementation, this function is a no-op and may be safely removed.
2019-07-25 15:18:27 +01:00
Steven Cooreman da1a749ab6 Fix for PWM output found by testing against FPGA shield
Two issues:
* Downcasting too early
* Potential for a uint32_t overflow in an intermediate calculation

Passing test requires #11005 to be merged.
2019-07-25 15:18:27 +01:00
Steven Cooreman ace88aa880 Avoid the FPGA tester using hardware CS which is not supported
Also implement rudimentary spi_free...
2019-07-25 15:18:27 +01:00
Steven Cooreman a5cb9d47ac Fix wrongly declared ADC pinout for EFM32GG11 STK3701A 2019-07-25 15:18:27 +01:00
Mahesh Mahadevan 1bbc2d770a LPC MCUXpresso: Remove extra I2C transaction on byte write
An extra start signal was observed on the bus which was
discovered by the FPGA test shield.
This is because the hardware sends out a transaction as soon
as a write to the START bit. Hence the write to the START
bit is delayed by using a flag.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-07-25 15:18:27 +01:00
Evelyne Donnaes 4bf9e23aff "Update secure binaries for ARM_MUSCA_A1_S (ARMC6)" 2019-07-14 21:46:25 +01:00
Evelyne Donnaes 7db70d8452 "Update secure binaries for LPC55S69_S (ARMC6)" 2019-07-14 21:46:06 +01:00
Evelyne Donnaes 18f8433d3c Revert "Override wait_ns to provide more accurate implementation"
This reverts commit f62010d026.
2019-07-14 18:07:03 +01:00
Evelyne Donnaes c781b51644 Corrected patch. Removed QSPIF for CY8CMOD_062_4343W. 2019-07-12 17:37:09 +01:00
Volodymyr Medvid 1080d3e1ff PSOC6: TARGET_PSOC6_FUTURE doesn't implement DEVICE_I2CSLAVE 2019-07-12 12:55:48 +03:00
Volodymyr Medvid 2fa57a51f3 PSOC6: do not remove QSPI from FUTURE_SEQUANA targets
Since QSPi is not yet supported by base TARGET_PSOC6,
there is no need to remove the device label from
FUTURE targets that inherit from TARGET_PSOC6.

This will need to be reverted back once the QSPI support
is implemented for Cypress PSOC6 targets.
2019-07-12 12:55:38 +03:00
Volodymyr Medvid fe0f21abd9 PSOC6: cleanup DEVICE_QSPI mappings
Note: device_has: "QSPI" is still disabled for TARGET_PSOC6
(QSPI HAL implementation is incomplete).
2019-07-12 12:55:29 +03:00
Volodymyr Medvid d542c3d66b PSOC6: fix license headers per review feedback 2019-07-12 12:55:19 +03:00
Volodymyr Medvid 6bde6efa0a PSOC6: remove CY8CKIT-062S2-4343W (not ready for release)
Also removed _M0 targets that are no longer used.
2019-07-12 12:54:49 +03:00
Volodymyr Medvid 9c202ae03c PSOC6: remove PSA targets 2019-07-12 12:54:22 +03:00
Volodymyr Medvid 1a5485ad76 PSOC6: remove libwiced_drivers for targets ported to WHD 2019-07-12 12:51:42 +03:00
Volodymyr Medvid 1bd5a6ec1d PSOC6: update Cypress boards to use TARGET_WHD 2019-07-12 12:51:31 +03:00
Volodymyr Medvid 7a7873c444 PSOC6: add WHD sources 2019-07-12 12:50:59 +03:00
Volodymyr Medvid 5c027db543 PSOC6: update BSP sources 2019-07-12 12:50:51 +03:00
Volodymyr Medvid b09e7cd9eb PSOC6: update BSP GeneratedSource, add design.modus 2019-07-12 12:50:33 +03:00
Volodymyr Medvid a72472f70a PSOC6: update to latest psoc6pdl 2019-07-12 12:50:24 +03:00
Volodymyr Medvid 1c48a6cc94 PSOC6: update Cypress targets to use psoc6csp 2019-07-12 12:50:03 +03:00
Volodymyr Medvid 33ca061e6a PSOC6: add psoc6csp asset with Cypress HAL implementation
PSoC 6 Chip Support Package provides hardware abstraction layer
for Cypress PSoC 6 device peripherals.
2019-07-12 12:30:05 +03:00
Volodymyr Medvid 471f0ab2a8 PSOC6: use prebuilt CM0+ C arrays instead of HEX images
Replace the prebuilt CM0+ HEX images with C files that provide the
variable cy_m0p_image placed to the combined ELF image with linker
script. This simplifies build flow of PSoC 6 application and improves
compatibility with IDE export targets. It is still possible to use
the custom prebuilt HEX images for PSA targets that remove CM0P_SLEEP
label and specify the `hex_filename` in targets.json.
Linker scripts are compatible with both scenarios.
2019-07-12 12:29:58 +03:00
Volodymyr Medvid 4a5e732c88 PSOC6: add psoc6cm0p asset with prebuilt CM0+ C arrays 2019-07-12 12:29:51 +03:00
Volodymyr Medvid 66efef22e3 PSOC6: format extra labels for Cypress kits 2019-07-12 12:29:43 +03:00
Evelyne Donnaes 075921b003
Update targets/targets.json
Removed RESET_REASON for NCS36510

Co-Authored-By: Filip Jagodziński <filip.jagodzinski@arm.com>
2019-07-11 13:21:10 +01:00
Tymoteusz Bloch fb6bfb6098 Reverted "K64F, STM32F429: IAR linker scripts dynamic heap fix"
due to side effect with K64F bootloader application jump after three consecutive HW resets.
2019-07-11 12:20:26 +01:00
jeromecoutant d27574a3c8 NUCLEO_H743ZI: enable WATCHDOG back 2019-07-11 12:14:39 +01:00
jeromecoutant dc6cdab128 STM32H7: Reset Reason update 2019-07-11 12:14:28 +01:00
jeromecoutant 485bc1103e STM32H7 watchdog patch 2019-07-11 12:14:18 +01:00
jeromecoutant 390928685c STM32H7: Increase watchdog timeout value 2019-07-11 12:14:06 +01:00
jeromecoutant 6d2a128698 STM32H7 : add LSI 2019-07-11 12:13:55 +01:00
Martin Kojtal b04f7b46c9 Revert "Fix: Allow target size restriction for LPC55S69"
This reverts commit 4451d64ea8.
We postpone this fix to 5.13.2 due to its breakages for client for this target. It
needs more work.
2019-07-11 11:55:30 +01:00
Martin Kojtal a05b29d050 SDT51822B does not support RESET_REASON.
Incorrect rebase from master

Co-Authored-By: Filip Jagodziński <filip.jagodzinski@arm.com>
2019-07-11 11:55:30 +01:00
Martin Kojtal 07fc47933e Fix: MCU_NRF52832 does not support RESET_REASON.
Incorrect rebase from master

Co-Authored-By: Filip Jagodziński <filip.jagodzinski@arm.com>
2019-07-11 11:55:30 +01:00
Martin Kojtal 8024e405f8 Watchdog: remove config value for timeout, set it dynamically
Use start method to set timeout
2019-07-11 11:55:29 +01:00
Martin Kojtal cd8ac1e132 Watchdog: refactor driver
Watchdog is hardware driver. It interacts with HAL - provides wrapper to interact with the peripheral.

Provides basic functionality: start/stop, get timeout/max timeout.
It is automatically kicked by a timer, according to the timeout set in ctor.
2019-07-11 11:55:20 +01:00
Rajkumar Kanagaraj 1ab851bacf Add HwWatchdog
- mbed_watchdog_mgr has interface name mbed_wdog_manager_start(),mbed_wdog_manager_stop(),mbed_wdog_manager_kick()
    - HwWatchdog is going to attach with LowPowerTIcker for periodic callback functionality
    - mbed_wdog_manager_start() will either get start either by BL/RTOS Aps,it reads the timeout value specified via macro and macro gets defined in target.json file.
    - mbed_wdog_manager_start() internally configure below HAL hw watchdog with timeout specified via target.json
    - mbed_wdog_manager_start() internally divide the timeout(specified in target.json) by the 2 and attach LowPowerTicker with periodic callback of hw_kick()
    - mbed_wdog_manager_start() internally create one instance of sw watchdog class,to access the static list data structure of sw watchdog class
    - mbed_wdog_manager_kick() function periodically get called and refresh the hw watchdog to avoid watchdog reset
    - converted C++ code into C based APIs
    - added boolean to control watchdog start and stop
    - Added detach from ticker on stop API
2019-07-11 11:55:13 +01:00
Filip Jagodzinski b850d70d75 Remove RESET_REASON from MCU_NRF52840 2019-07-11 11:55:13 +01:00
Rajkumar Kanagaraj fc5de6f128 Removed RESET_REASON for NRF51_DK board 2019-07-11 11:55:13 +01:00
Rajkumar Kanagaraj b2f03b2155 Added the SPDX identifier 2019-07-11 11:55:12 +01:00
Rajkumar Kanagaraj 361c787abc Trailing space issue fix 2019-07-11 11:55:12 +01:00
Rajkumar Kanagaraj 3f20350b04 fix for Jenkin build issue 2019-07-11 11:55:12 +01:00
Rajkumar Kanagaraj 7d941950d3 Removed RESET_REASON for NRF52832,NRF52840 family and Removed WATCHDOG for H743ZI board 2019-07-11 11:55:12 +01:00
Rajkumar Kanagaraj 6d501401f3 Revert "fix for build failure issues"
This reverts commit 3ce1d4940cb7fd9d74ca2be75ed08b76854ff534.
2019-07-11 11:55:12 +01:00
Rajkumar Kanagaraj ea26d27c84 fix for build failure issues 2019-07-11 11:55:12 +01:00
Rajkumar Kanagaraj 070537f2e9 update:Remove DEVICE_WATCHDOG and added RESET_RESON in stm32 family 2019-07-11 11:55:11 +01:00
Steve Cartmell 5b0259dbd1 fix(hal-watchdog): Guard TMPM 'ResetReason' code behind feature flag 2019-07-11 11:55:11 +01:00
Steve Cartmell da7bf6e8e7 fix(hal-watchdog): Add 'RESET_REASON' flags to supported devices 2019-07-11 11:55:11 +01:00
Steve Cartmell dcf11f01f0 fix(hal-watchdog): Remove 'RESET_REASON' flags from unsupported devices 2019-07-11 11:55:10 +01:00
Steve Cartmell b8f0815959 fix: Remove excess comma from device_has key in targets.json 2019-07-11 11:55:10 +01:00
Ganesh Ramachandran 83f16190b5 Added reset_reason feature for TMPM3HQ 2019-07-11 11:55:10 +01:00
Steve Cartmell e2538d931d fix(hal-watchdog): Add feature guards to K64F watchdog implementation 2019-07-11 11:55:09 +01:00
Ganesh Ramachandran a2db1f1989 Added reset_reason feature for TMPM3H6 & TMPM4G9 2019-07-11 11:55:09 +01:00
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