Commit Graph

25993 Commits (59046146967ea12a2ddce0559bc97265dd965378)

Author SHA1 Message Date
Steven Cooreman f6a70b2028 Increase ADC test tolerance to 5%
During the SiP workshop, we discovered that 3% is too narrow due to a combination of:
Voltage rail differences between target and FPGA
Extension of lesser-resolution ADC's to 16-bit results
2019-07-10 14:12:46 +01:00
Tymoteusz Bloch 878c93673b 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-10 13:30:40 +02:00
Steven Cooreman 35851005ef Fix wrongly declared ADC pinout for EFM32GG11 STK3701A 2019-07-10 11:27:29 +01:00
Volodymyr Medvid 140b72d3ed Merge remote-tracking branch 'ARMmbed/master' into pr/psoc6-hal 2019-07-10 10:54:14 +01:00
Martin Kojtal 279f4cd584
Merge pull request #11011 from SiliconLabs/fix/fpga_tests/i2c
Allow re-initialising an I2C peripheral on Silicon Labs targets
2019-07-10 10:44:54 +01:00
Russ Butler 8fffb94be2 Remove FPGA analog out test
Remove the analog out test temporarily due to limitations of the
FPGA rev 2 hardware.
2019-07-10 07:39:30 +01:00
Chun-Chieh Li 81dd2aa787 Fix mbed_hal-watchdog failing with OOM
This is to fix OOM error on targets with just 16KiB RAM.
2019-07-10 14:32:03 +08:00
Chun-Chieh Li debc38fd27 Fix mbed_drivers-watchdog failing with OOM
This is to fix OOM error on targets with just 16KiB RAM.
2019-07-10 14:31:33 +08:00
Steven Cooreman fb4d898f2e Allow re-initializing an I2C peripheral
Allows the FPGA based test to pass, but requires #11004 before it will
2019-07-09 23:37:11 +01:00
jeromecoutant d14d934f8d FPGA SPI: ASYNC issue 2019-07-10 00:30:13 +02:00
Steven Cooreman 6094542bb1 Avoid the FPGA tester using hardware CS which is not supported
Also implement rudimentary spi_free...
2019-07-09 22:48:37 +01:00
Steven Cooreman 476dc6e46a 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-09 22:38:53 +01:00
Mahesh Mahadevan aef60d7edf 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-09 16:05:28 -05:00
jeromecoutant fc84ef874c FPGA PWM: wait 1 period before measurement 2019-07-09 22:41:27 +02:00
Mahesh Mahadevan 58ba83b6e4 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-09 15:40:55 -05:00
jeromecoutant cf75b39e04 FPFA I2C: correct init bloc number 2019-07-09 22:35:22 +02:00
Kevin Bracey c9faf244ea Test Atomic<T> with user T 2019-07-09 19:09:02 +03:00
Kevin Bracey e2f65ec4a9 Make atomic test use Atomic<T>
Make the atomic functional test use `Atomic<T>` rather than the
standalone functions - this then tests both layers simultaneously.
2019-07-09 19:09:02 +03:00
Kevin Bracey f9f073245b Add Atomic<T> template
Add a C++ `Atomic<T>` template to make atomics even easier. Basically
compatible with C++11 `std::atomic<T>`, but using the underlying
`core_util_atomic_xxx` functions from mbed_atomic.h, so appropriate for
synchronising with interrupts and optimised for uniprocessor.

One extra piece of functionality beyond the `core_util_atomic_xxx`
functions is the ability to have an arbitrary atomic type - eg a small
structure with 2 `uint16_t`s can be stored in a `uint32_t` container.
2019-07-09 19:09:02 +03:00
Kevin Bracey 5d2b37d205 mbed_atomic.h: Improve template type deduction
Avoid template ambiguities using type_identity_t.

Previously the compiler would be unable to figure out whether

     uint8_t x;
     core_util_atomic_store(&x, 0);

should invoke core_util_atomic_store<uint8_t>, matching the pointer
type, or core_util_atomic_store<int>, matching the value, leading to
an ambiguity error.

Templates now select only on the type of the atomic pointer parameter.
2019-07-09 19:09:02 +03:00
Kevin Bracey 3fd7e11595 mbed_atomic templates: add noexcept
Add noexcept for consistency with upcoming Atomic.h
2019-07-09 19:09:02 +03:00
Kevin Bracey f9f887d88e mbed_atomic_impl.h: Add pre-op (xxx_fetch) forms
Even though C/C++11 don't offer pre-op forms (that do the operation then
return the new value) of their freestanding functions, we will be making
them visible via pre-op operators on `Atomic<T>` (++, --, +=, -=, &=,
|=, ^=).

It is easier to do a pre-op than a post-op, as we can use one
fewer register in the assembler, so it's worth optimising for what will
be quite common cases. Make these forms accessible for `Atomic<T>`, but
don't document them for standalone use at this stage.
2019-07-09 19:09:02 +03:00
Kevin Bracey 607856ee9a Set unit tests to C++14
Adjust some non-C++11-compatible code that failed as a result.
2019-07-09 19:08:57 +03:00
Filip Jagodzinski 4842c87815 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-09 16:30:12 +02:00
Filip Jagodzinski 68d222b3d1 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-09 16:12:32 +02:00
Filip Jagodzinski 86149e59d6 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-09 16:05:04 +02:00
Filip Jagodzinski ed41994a3a Test: HAL: serial: Add DEVICE_SERIAL_FC guards
Fix undefined references to serial_set_flow_control.
2019-07-09 13:21:42 +02:00
Arto Kinnunen 28eb39c724
Merge pull request #10885 from kjbracey-arm/callback_variadic
Reduce Callback.h using C++11
2019-07-09 13:54:42 +03:00
Mark Edgeworth c8f33b1e45 Removing absolute paths to compiler executables
VSCode exporter was generating a launch config that contained absolute paths to the
compiler executables. It makes more sense to use the executables that are
installed into the system PATH.
2019-07-09 11:06:03 +01:00
Filip Jagodzinski 07baf079b9 HAL: Serial: Add DEVICE_SERIAL_FC guards
Functions related to serial flow control should not be exposed
if DEVICE_SERIAL_FC is not defined
* serial_set_flow_control,
* serial_cts_pinmap,
* serial_rts_pinmap.
2019-07-09 10:53:08 +02:00
Martin Kojtal f0ec856020
Merge pull request #10954 from fkjagodzinski/docs_update-watchdog_driver
Watchdog: Clean up the doxygen comments
2019-07-09 08:33:49 +01:00
Martin Kojtal ee5b6d2c74
Merge pull request #10976 from vmedcy/tests-mbed_drivers-ticker
Fix error in tests-mbed_drivers-ticker when LED2 is not connected
2019-07-09 08:33:25 +01:00
Martin Kojtal 647b5817ce
Merge pull request #10982 from jeromecoutant/PR_LPUART
STM32 LPUART minor update  for easy maintenance
2019-07-09 08:33:06 +01:00
Martin Kojtal 34dd527d4d
Merge pull request #10990 from fkjagodzinski/fix-reset_reason-doxy_json
Fix doxygen_options.json for ResetReason
2019-07-09 08:32:20 +01:00
Chun-Chieh Li 21df0e00ce [Nuvoton] 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-07-09 15:27:34 +08:00
Martin Kojtal 358046e472
Merge pull request #10989 from mprse/spi_fpga_basic_test_ext
SPI FPGA test extension + SPI driver fix (K64F)
2019-07-08 20:42:47 +01:00
Ron Eldor 6b17df7685 Make the alternative sha512 optional
Have the alternative sha512 undefined by default,
in order not to break backwards compatability.
2019-07-08 18:32:18 +03:00
Devaraj Ranganna 7ead3fedb8 Include psa/crypto.h instead of mbedtls/config.h.
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2019-07-08 16:28:58 +01:00
Ron Eldor 77d8b067bf Make the alternative cmac optional
Have the alternative cmac undefined by default,
in order not to break backwards compatability.
2019-07-08 18:27:54 +03:00
Volodymyr Medvid d77fb26e9f PSOC6: fix license headers per review feedback 2019-07-08 18:25:03 +03:00
Ron Eldor a5aac1e4b6 Fix functionality issues
FIx some functionality issues for better visibility:
1. Allocate the context only for 128 bit key
2. Change oreder of freeing the resources.
2019-07-08 18:12:47 +03:00
Ron Eldor f5956ce90b Style fixes
Fix minor style fixes and typos:
1. Change file name to correct one.
2. Change copyright year.
3. Insert whitespaces before and after paranthesis.
4. Put `*` next to pointer name.
2019-07-08 18:10:48 +03:00
Filip Jagodzinski d06e12834c Fix doxygen_options.json for ResetReason
Add a missing DEVICE_RESET_REASON macro.
2019-07-08 15:55:25 +02:00
Arto Kinnunen cd4283e5fb
Merge pull request #10977 from vmedcy/tests-mbedmicro-rtos-mbed-malloc
Fix out-of-bounds array access in tests-mbedmicro-rtos-mbed-malloc
2019-07-08 16:39:22 +03:00
Arto Kinnunen 1264660314
Merge pull request #10972 from 0xc0170/test_target
add new target IM880B
2019-07-08 16:34:36 +03:00
Przemyslaw Stekiel 6490ac75d8 FPGA SPI test: Fix typo 2019-07-08 15:23:21 +02:00
Volodymyr Medvid 85a5bc0bf9 PSOC6: apply astyle to WHD EMAC driver implementation 2019-07-08 15:58:46 +03:00
Martin Kojtal bd762ce03f
Merge pull request #10466 from jeromecoutant/PR_STM32H7_WATCHDOG
STM32H7: WATCHDOG and RESET_REASON support
2019-07-08 13:54:40 +01:00
Przemyslaw Stekiel 6112ca8c64 FPGA SPI test: Fix unsupported transfer case
Co-Authored-By: Filip Jagodziński <fkjagodzinski@gmail.com>
2019-07-08 14:54:33 +02:00
Przemyslaw Stekiel 7d7c1416af 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-08 14:54:33 +02:00