Commit Graph

5832 Commits (mbed-os-5.14)

Author SHA1 Message Date
Jammu Kekkonen 14ac203a3a Add option to use CCMRAM on F303xE. 2019-11-18 15:42:08 +00:00
Ryan Morse c4ac78b7aa Added CYW9P62S1_43012EVB_01 board Notes: - CRC and TRNG are disabled on this board since the MCU on this board does not have the required hardware. - QSPI and QSPIF are temporarily removed due to issues related to supporting the new S25FS512S flash chip we have on this board. These will be enabled as soon as we can get the issues resolved. https://github.com/ARMmbed/mbed-os/issues/11722 2019-11-18 15:42:08 +00:00
Maciej Bocianski 7ae3510adf NRF52: fix i2c byte read/write implementation
i2c_byte_write implementation was broken.
Data sending was inside addressing block

Changed from:
i2c_byte_write
{
   if (start) {
      if (read_address)
         start read;
      esle
         start write;
      write byte;
   }
}

to:
i2c_byte_write
{
   if (start) {
      // if first call after start
      // address for reading or writing
      if (read_address)
         start read;
      esle
         start write;
      } else {
         // send data byte
         write byte;
   }
}
2019-11-18 15:42:08 +00:00
Maciej Bocianski bda1074f70 NRF52: fix i2c timeouts
add tick to us conversion
2019-11-18 15:42:08 +00:00
Chun-Chieh Li 47cec095b1 M2351: Change base target name 'NU_PFM_M2351_CM' to 'NU_PFM_M2351'
This is to meet platform name 'NU_PFM_M2351' registered in mbed-os-tools. This tool
uses the platform name as a key to search platform related properties in targets.json.
For example, the property 'forced_reset_timeout' is critical for Greentea test.
2019-11-18 15:42:08 +00:00
Kevin Bracey f50e7b1da3 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-11-18 15:42:08 +00:00
Maciej Bocianski 4075d417a2 nxp LPC55S69: fix i2c pin mapping 2019-11-18 15:42:08 +00:00
Chun-Chieh Li 83c354432d M2351: Update default secure image/gateway library
Update for change of TRNG security attribute
2019-11-18 15:42:08 +00:00
Chun-Chieh Li cd89efc604 NUVOTON: Re-implement TRNG HAL with TRNG H/W
Targets supporting TRNG H/W:

-   NU_PFM_M2351_*
-   NUMAKER_IOT_M263A
2019-11-18 15:42:08 +00:00
Chun-Chieh Li d7f630108c NUVOTON: Re-implement __PC() with toolchain built-in
Re-implement __PC() by replacing BSP assembly with toolchain built-in.
2019-11-18 15:42:08 +00:00
Chun-Chieh Li df8b41617a NUVOTON: Fix BSP/MKROM header
Related targets:
-   NU_PFM_M2351_*
-   NUMAKER_IOT_M263A
2019-11-18 15:42:08 +00:00
Chun-Chieh Li 68448a9bb1 M2351: Update BSP/crypto driver 2019-11-18 15:42:08 +00:00
Chun-Chieh Li de2678d7f8 M2351: Change TRNG security attribute to secure 2019-11-18 15:42:08 +00:00
jeromecoutant 43910e6188 STM32: remove unused TARGET_STM_EMAC additional directory 2019-11-18 15:42:08 +00:00
Veijo Pesonen b0498dc3db MCU_NRF52840: Switches to correct Product Anomaly Notification macro 2019-11-18 15:42:08 +00:00
Giampaolo Mancini 401c6927c9 Add SPDX identifier 2019-11-18 15:42:08 +00:00
Giampaolo Mancini a42ff3212c Fix overflow calculation for reload_value.
Please,  note that this patch fixes upstream bug. See:

https://devzone.nordicsemi.com/f/nordic-q-a/51674/maximum-reload-time-for-wdt
2019-11-18 15:42:08 +00:00
Giampaolo Mancini 688e436bd9 Remove default conf macro because typo in nRF SDK 2019-11-18 15:42:08 +00:00
Giampaolo Mancini df95fb0f0b Fix timeout limits 2019-11-18 15:42:08 +00:00
Giampaolo Mancini 23784cbd0b Add support for nRF52 Watchdog 2019-11-18 15:42:08 +00:00
Alexandre Bourdiol 2da2322a08 STM32F767ZI - I2C FastModePlus not properly enabled 2/2
Warning: sometimes I2C_FASTMODEPLUS_I2Cx is defined,
even if not supported by some chip within the family
2019-11-18 15:42:08 +00:00
Alexandre Bourdiol 096847bbb1 STM32F767ZI - I2C FastModePlus not properly enabled
Fixes #11659
2019-11-18 15:42:08 +00:00
Martin Kojtal d1fe414b42 cy port api: fix styling 2019-11-18 15:42:08 +00:00
Shuopeng Deng db38d48573 Changed mbed gpio-port api to match gpio api
The port configuration api was not correctly setting the port-pins'
direction. Changed the port driver to call the gpio driver for
configuration (read and write still are optimized for port-level
operations) so that the behavior is consistent.
2019-11-18 15:42:08 +00:00
Alexandre Bourdiol 4d9c888057 TARGET_STM: remove warning and fix typo on SPI 2019-11-18 15:42:08 +00:00
jeromecoutant 4ab3fb2596 STM32 TRNG clock configuration 2019-11-18 15:42:08 +00:00
Kyle Kearney 6b1a21b7f0 Update STM driver changes for clarity
- Use a switch statement rather than shifting and masking to compute
  the AlternateBytes value.
- Rename rounded_size to alt_bytes to clarify its purpose.
2019-11-18 15:42:08 +00:00
Roman Okhrimenko a9eea6cdef Added specific policy file for 2M device to expand slot sizes 2019-11-18 15:42:08 +00:00
Roman Okhrimenko ba39ce30c0 Initial addition of files to support CY8CKIT_064S2_4343W target 2019-11-18 15:42:08 +00:00
Leszek Rusinowicz 060e8cfb8b FUTURE_SEQUANA: SPI HAL API fixes.
- Fixed miscalculation in SPI frequency setup (divider value).
- Added possibility to set up SCK line as NC (usable when SPI peripheral
   is used to handle non-SPI protocols.
- Fixed handlingh of 16-bit (and other >8 bit) transfers.

(cherry picked from commit 7d391f257b4ff6cdd7b43eeaa4894f8ce6d2cf8e)
2019-11-18 15:42:08 +00:00
toyowata 9ab22274a6 Add bootloader support for Seeed Arch-MAX 2019-11-18 15:42:08 +00:00
Laurent Meunier d92adcd28c 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-11-18 15:42:08 +00:00
Veijo Pesonen 2ea642a45f NRF52840_DK: enables FLASHIAP for the device 2019-11-18 15:42:08 +00:00
d-kato 1a27863701 Fix multiple definitions of GR-LYCHEE 2019-11-18 15:42:08 +00:00
d-kato 7425838ab7 Add FLASHIAP to GR-PEACH component 2019-11-18 15:42:08 +00:00
Kyle Kearney 87e138fe3c Fix swapped pins for CYW943012P6EVB-01 in cybsp_types
Fix the issue as 09f715c96e in
cybsp_types.h as well.
2019-11-18 15:42:08 +00:00
Kyle Kearney 0bc3d7ca33 Fix swapped BT pins on CYW943012P6EVB-01
The BT_DEVICE_WAKE and BT_HOST_WAKE pins were swapped relative to
how the chips are wired up on the board.
2019-11-18 15:42:08 +00:00
Alexandre Bourdiol 1e351720a7 Mbed patch of STM32cube for bootloader: use NVIC_FLASH_VECTOR_ADDRESS 2019-11-18 15:42:08 +00:00
Alexandre Bourdiol bdb0082bc9 Update HAL/LL EXTI to have default API applied on current core and nott CPU1 2019-11-18 15:42:08 +00:00
Alexandre Bourdiol 7846c9fe91 SystemCoreClock should correspond to current core clock and not D1 clock. 2019-11-18 15:42:08 +00:00
Alexandre Bourdiol 5418d70813 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-11-18 15:42:08 +00:00
Chris Trowbridge d8b3b5a453 Increase NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS from a default of 1 to 4 2019-11-18 15:42:08 +00:00
Maciej Bocianski 1a2a3515ff nrf52 - fix i2c/twi driver
Sync TWI driver to sdk version 15.3.0 to get rid of data length limitation
2019-11-18 15:42:08 +00:00
Maciej Bocianski 13092277d4 nrf5x - add missing gpio_set implementation 2019-11-18 15:42:08 +00:00
Janne Kiiskila 67fbe49819 stm32f4xx_hal_pcd.c@346,22: unused variable 'ep'
Compiler warning fix, trivial. One function has an unused
variable, delete that line.
2019-11-18 15:42:08 +00:00
Kyle Kearney e28a6c5723 Enable tickless for PSoC6 targets 2019-11-18 15:42:08 +00:00
Ryan Morse 5dc2f981a3 Update WHD to v1.40 2019-11-18 15:42:08 +00:00
Ryan Morse 2d757fc321 Fixed issue with integer overflow when converting time units 2019-11-18 15:42:08 +00:00
Shuopeng Deng 154d51b040 fixed spi_master_write to support transfer of 8+ bits
remove an unnecessary cast
2019-11-18 15:42:08 +00:00
Shuopeng Deng 61218d00ea Fix dropped bytes on spi write
The cyhal_spi_send api was changed to read and discard a byte on every
send operation (at the protocol level all SPI transfers are bidirectional).
This means that to achieve a truly bidirectional transfer, the
cyhal_spi_transfer API must be called (as opposed to a write followed
by a read).
2019-11-18 15:42:08 +00:00
Graham Hammond ea448f5144 IOTBTOOL-407 Fix microbit to use Arm C5
Earlier changes introduced a change to default Arm C6, which does not compile the micro library which is based on Mbed 2. This change fixes the compiler version for NRF51_MICROBIT devices.
2019-11-18 15:42:08 +00:00
adbridge a4715aab32 "Update secure binaries for ARM_MUSCA_A1_S (ARMC6)" 2019-10-16 13:00:44 +01:00
adbridge 455bb9ec68 "Update secure binaries for LPC55S69_S (ARMC6)" 2019-10-16 12:31:35 +01:00
adbridge 070269295f Add OKDO platform
Manually ported from PR11407
2019-10-16 12:10:38 +01:00
jeromecoutant 19b641bb66 STM32L151: update calibration memory address 2019-10-16 11:58:32 +01:00
jeromecoutant 82f2b72777 DISCO_L4R9I: update default STMOD+ pin 2019-10-16 11:58:32 +01:00
Kyle Kearney 1dc74090a7 Add target for CY8CPROTO-063-BLE 2019-10-16 11:58:32 +01:00
Kyle Kearney 65e726eb9e Fix possible negative QSPI alt count on STM
Remove an extraneous decrement operation in cases where the alt
bits size is a multiple of 8.
2019-10-16 11:58:32 +01:00
Matthew Macovsky 08a2709993 Allow for arbitrary QSPI alt sizes
The QSPI spec allows alt to be any size that is a multiple of the
number of data lines. For example, Micron's N25Q128A uses only a
single alt cycle for all read modes (1, 2, or 4 bits depending on
how many data lines are in use).
2019-10-16 11:58:32 +01:00
Chun-Chieh Li 03affe94d8 Remove TRNG support
Reasons to remove TRNG support:
1.  M252 just has 32KiB SRAM and cannot afford mbedtls application.
2.  Implementing TRNG HAL with PRNG H/W has security concern.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li 14e9683d4d Add BSD-3-Clause license for BSP files 2019-10-16 11:58:32 +01:00
Chun-Chieh Li 2136567b7a Free up peripheral pins in peripheral free-up HAL API
Without free-up of peripheral pins, peripheral pins of the same peripheral may
share by multiple ports after port iteration, and this peripheral may fail with
pin interference.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li f761fe7eb1 Support GPIO input pull-high/pull-low
In Nuvoton, only new-design chips support GPIO input pull-high/pull-low modes.
Targets not supporting this feature are listed below:

- NUMAKER_PFM_NANO130
- NUMAKER_PFM_NUC472
- NUMAKER_PFM_M453
2019-10-16 11:58:32 +01:00
Chun-Chieh Li 07eb503cf1 Fix redundant call to UART IRQ handler
Honor RxIrq/TxIrq to avoid redundant call to UART IRQ handler.

This is also to fix FPGA CI test mbed_hal_fpga_ci_test_shield-uart.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li a3197f3ec9 Fix redundant SPI clock generation
Fix SPI clocks are generated redundantly at the end of transfer.

This is also to fix FPGA CI test mbed_hal_fpga_ci_test_shield-spi/
SPI - async mode.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li 7f29545a57 Fix I2C NACK error
Fix logic error on replying NACK at the end of transfer.

This is also to fix FPGA CI test mbed_hal_fpga_ci_test_shield-i2c/
i2c - test single byte read i2c API.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li a5b7048668 Fix IP initialization sequence
Better IP initialization sequence:
1. Configure IP pins
2. Select IP clock source and then enable it
3. Reset the IP (SYS_ResetModule)

NOTE1: IP reset takes effect regardless of IP clock. So it doesn't matter if
       IP clock enable is before IP reset.
NOTE2: Non-configured pins may disturb IP's state, so IP pinout first and then
       IP reset.
NOTE3: IP reset at the end of IP initialization sequence can cover unexpected
       situation.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li 3cdf84d943 Exclude USB UART from testing
USB UART is dedicated to USB COM and so must exclude from FPGA CI testing.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li a56db3697d Force enum PinName to 32-bit
NU_PINNAME_BIND(...) requires enum PinName to be 32-bit to encode module
binding information in it.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li 7245474e40 Add 'sectors' target configuration parameter 2019-10-16 11:58:32 +01:00
Chun-Chieh Li b6a29934e8 Enlarge LPTICKER_DELAY_TICKS for safe
On Nuvoton targets, lp_ticker_set_interrupt(...) needs around 3 lp-ticker
ticks to take effect. It may miss when current tick and match tick are very
close (see hal/LowPowerTickerWrapper.cpp). Enlarge LPTICKER_DELAY_TICKS to
4 from 3 to address this boundary case.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li 7c48b44488 Enlarge required deep sleep latency
This configuration is to pass wake-up from deep-sleep test such as mbedmicro-rtos-mbed-systimer.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li 9b6edba26c Override mpu-rom-end to 0x1fffffff
Without this override, mpu hal will require 5 mpu regions which exceed 4 mpu
regions supported by M252 (see hal/mpu/mbed_mpu_v8m.c). In this scenario,
we will hit assert error but we actually meet stack overrun first due to just
0x400 bytes for emitting error message. The issue doesn’t occur on other
targets such as M487 because it has 8 mpu regions.
2019-10-16 11:58:32 +01:00
Chun-Chieh Li d111aff98b Support Nuvoton's NUMAKER_M252KG target 2019-10-16 11:58:32 +01:00
Ben Cooke 9145b72433 Add MTS_DRAGONFLY_F413RH platform to mbed-os 2019-10-16 11:58:32 +01:00
Kyle Kearney 7dd86e8f48 Clean up BSP hardware configuration
- Improve block naming
- Remove unneeded items
2019-10-16 11:58:32 +01:00
Kyle Kearney 45b674623f Update CY8CPROTO-064-SB linker scripts
Update linker scripts for the latest PDL to be consistent with other Cypress targets
2019-10-16 11:58:32 +01:00
Kyle Kearney 222443ea63 Refactor serial flash support 2019-10-16 11:58:32 +01:00
Kyle Kearney 85ba6ea4f3 Simplify BSP contents
Remove some (Cypress-proprietary) BSP interfaces and hardware initialization
from the BSPs which is better implemented by a library or application firmware.
Move some remaining functionality from common to the individual targets.
2019-10-16 11:53:52 +01:00
Kyle Kearney 91131a03f7 Consolidate/clean up wifi initialization 2019-10-16 11:53:52 +01:00
Kyle Kearney 8e6c6d1d8e Avoid doubly allocating whd thread stack
Don't malloc during wifi initialization, as that could cause double allocation in some cases.
The thread stack will be allocated by cy_rtos_thread_start if necessary.
2019-10-16 11:53:52 +01:00
Qinghao Shi ce73f8ecdd FASTMODEL: add a comment for TRNG simulation 2019-10-16 11:53:52 +01:00
Qinghao Shi 4e3d31540a FASTMODEL: update trng based on comments 2019-10-16 11:53:52 +01:00
Qinghao Shi 828b2f132e FASTMODEL: enable PSA tests for fastmodel 2019-10-16 11:53:52 +01:00
Qinghao Shi c81995cf56 FASTMODEL: add simulated TRNG implementation to fastmodel 2019-10-16 11:53:52 +01:00
Chris Trowbridge 89ce27b3fc EP_AGORA: Add config logic to enable BLE, cell, and LoRa by default 2019-10-16 11:53:52 +01:00
Marc Emmers b82becb323 Add newline at end of file 2019-10-16 11:53:52 +01:00
Marc Emmers 0876991561 Fixed missing #if in port_api.c 2019-10-16 11:53:52 +01:00
jeromecoutant b2e0a13730 STM32H7 ST CUBE V1.5.0 update 2019-10-16 11:53:52 +01:00
Ryan Morse c62c7135f9 Moved TriggerMux initialization out of the HAL and into the BSP since that is what dictates what trigger muxes actually need to be used 2019-10-16 11:53:52 +01:00
Vincent Veron 85757ce198 STM32H7 : use RAM instead of DTCMRAM (GCC_ARM toolchain) 2019-10-16 11:53:52 +01:00
Vincent Veron 7561e770a3 STM32H7 : use RAM instead of DTCMRAM (ARM toolchain) 2019-10-16 11:53:52 +01:00
Vincent Veron dd9f9e1cb5 STM32H7 : use RAM instead of DTCMRAM (IAR toolchain)
Keep vector table and crash data ram in 0x20000000 for
tests-mbed_platform-crash_reporting test.
Move the rest in RAM (0x24000000). This is needed for ethernet and allows
user to use more RAM (512k).

Signed-off-by: Vincent Veron <vincent.veron@st.com>
2019-10-16 11:53:52 +01:00
Volodymyr Medvid 0cb250ca04 PSOC6: update to PDL 1.3.1.1499 2019-10-16 11:53:52 +01:00
Volodymyr Medvid 8bed19a9d2 PSOC6: update to PDL 1.3.1.1474 2019-10-16 11:53:52 +01:00
Leszek Rusinowicz f5f6caa3b0 FUTURE_SEQUANA: InterruptIn implementation bug fix
Fixed HAL API implementation for InterruptIn:
 - Interrupt was not enabled by default after configuration as it should be.
 - Interrupt-to-object linking was not handled properly.
2019-10-16 11:53:52 +01:00
jeromecoutant b3a14b5ead STM32WB : LSI clock selection when LSE is not available 2019-10-16 11:53:52 +01:00
jeromecoutant 7272fe0613 STM32H7: LSI clock selection when LSE is not available 2019-10-16 11:53:52 +01:00
Kyle Kearney 2b277e8827 Improve psoc6csp doxygen comments 2019-10-16 11:53:52 +01:00
Kyle Kearney 3acb1e49f8 Reorganize resource and rtos abstraction files
- Move resource and rtos abstractions into their own folders
- Remove files for abstractions that are not implemented
2019-10-16 11:53:52 +01:00