Skip to content

Add ARMC6 feature to EV_COG_AD4050LZ and EV_COG_AD3029LZ #5541

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 195 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
195 commits
Select commit Hold shift + click to select a range
1cfaed1
Disable Arm Compiler 5 and Use Arm Compiler 6 by default
theotherjimmy Oct 30, 2017
3f9330c
Add ARMC6 support to REALTEK post-binary hook
theotherjimmy Nov 7, 2017
9c68057
Explicitly instantiate vector base class
theotherjimmy Nov 7, 2017
2c653ad
Remove superfluous tests
theotherjimmy Nov 7, 2017
727aada
Workaround for NCS36510 deepsleep bug
theotherjimmy Nov 9, 2017
146d0d9
Correct fpu passing for Armlink 6
theotherjimmy Nov 10, 2017
5839c1b
Correct Arm Compiler 6 FPU present check
theotherjimmy Nov 10, 2017
5157b86
[Silicon Labs] cryptographic acceleration support
stevew817 Jul 28, 2017
0d4dfe8
Apply feedback from @RonEld
stevew817 Aug 2, 2017
9bef5cb
CircularBuffer(): get available transactions
0x6d61726b Sep 8, 2017
7afa319
Added support for ADI EV-COG-AD4050LZ platform.
dave-wu Sep 20, 2017
d922b45
Fixed issues raised in the feedback from ARM for the ADuCM4050 platform.
dave-wu Oct 2, 2017
ad7d2b4
Fixed a merge error for LPC11U34_421.
dave-wu Oct 2, 2017
f292a9e
- Added definiton for i2c_reset;
dave-wu Oct 2, 2017
8d7fd4f
- Fixed an issue where the TRNG device is read even when it is not re…
dave-wu Oct 3, 2017
7a3b461
Removed undefined spi slave related functions.
dave-wu Oct 3, 2017
5cb502e
Removed the custom app thread stack size.
dave-wu Oct 3, 2017
c8bf2fa
updates according to comments in pull request
0x6d61726b Oct 5, 2017
65f03df
- Added error checking for trng_get_bytes function;
dave-wu Oct 9, 2017
4d194df
Added curly brackets for the single line if else statement.
dave-wu Oct 9, 2017
299b61d
Add multicast implementation for UDPSocket. IPv4 and IPv6 both suppor…
kegilbert Jul 21, 2017
0073292
- Cleaned up some formatting issues; - Fixed a build error in spi_mas…
dave-wu Oct 11, 2017
8d79314
Added default delay and sample times for the ADC during initialization.
dave-wu Oct 12, 2017
8ca3654
BLE: Add safe Enum abstraction.
pan- Oct 9, 2017
2b0767c
equeue: added config option which tells equeue_mbed.cpp if it shall u…
MikeDK Oct 17, 2017
e5d294c
equeue: added help text for new config option use-lowpower-timer-ticker
MikeDK Oct 18, 2017
17076d2
add new target L-Tek FF-LPC546XX
Oct 18, 2017
d360fcd
Applied @yanesca and @andresag01 comments (#4825)
stevew817 Oct 19, 2017
fbaebcb
Extends test set for Ticker class (round 2)
maciejbocianski Oct 5, 2017
f47f4f7
Code style updated
0x6d61726b Oct 20, 2017
0998fb7
Extends test set for signals
maciejbocianski Sep 15, 2017
f182624
Fix ETHMEM_SECTION placement for ARM on LPC1768
chrissnow Oct 15, 2017
7c95971
Doxygen comment updates and fixes
SenRamakri Oct 24, 2017
5453b1c
ncs36510: fire interrupt correct timer fix
0xc0170 Oct 27, 2017
c3ddd11
BLE: Improve ArrayView documentation.
pan- Oct 17, 2017
ccab817
BLE: Improve BLE.h documentation.
pan- Oct 18, 2017
a9dc2e0
BLE: Update blecommon documentation.
pan- Oct 19, 2017
292a9f1
BLE: Update BLEInstanceBase documentation.
pan- Oct 19, 2017
b4f1eb2
BLE: Update BLEProtocol documentation
pan- Oct 19, 2017
cdcae72
BLE: Update BLETypes.h documentation.
pan- Oct 23, 2017
045d5fa
BLE: Improve CallChainOfFunctionPointersWithContext.h documentation.
pan- Oct 23, 2017
7b057ca
BLE: Improce DiscoveredCharacteristic.h documentation.
pan- Oct 23, 2017
cb33ef5
BLE: Improve CharacteristicDescriptorDiscovery.h documentation.
pan- Oct 23, 2017
58933ee
BLE: Improve DiscoveredCharacteristicDescriptor.h documentation.
pan- Oct 23, 2017
84deac1
BLE: Improve DiscoveredService.h documentation.
pan- Oct 23, 2017
0e7de4e
BLE: Improve FunctionPointerWithContext.h documentation.
pan- Oct 23, 2017
312c833
Update GapAdvertisingData.h
pan- Oct 24, 2017
a4430c7
BLE: Improve GapAdvertisingParams.h documentation.
pan- Oct 24, 2017
aaca387
BLE: Improve GapScanningParams.h documentation.
pan- Oct 24, 2017
4aee8c0
BLE: Improve SafeBool.h documentation.
pan- Oct 24, 2017
e48f3ea
BLE: Improve UUID.h documentation.
pan- Oct 24, 2017
f1299e7
BLE: Improve ServiceDiscovery.h documentation.
pan- Oct 24, 2017
337b337
BLE: Improve GattCallbackParamTypes.h documentation.
pan- Oct 24, 2017
e096e1a
BLE: Improve GattServerEvents.h documentation.
pan- Oct 24, 2017
b65fac5
BLE: Imrpove deprecated.h documentation.
pan- Oct 24, 2017
56f452f
BLE: Improve Gap.h documentation.
pan- Oct 27, 2017
0fde05e
BLE: Improve GattClient.h documentation.
pan- Oct 27, 2017
bdfb4e5
BLE: Group GattServer documented elements
pan- Oct 27, 2017
d561f16
Fix comments on mbed_assert.h
SenRamakri Oct 27, 2017
b9a83aa
- Added code to clear temporary variable on the stack before exiting the
dave-wu Oct 30, 2017
1e0e35e
equeue: some refactoring to meet coding rules
MikeDK Oct 30, 2017
111d4e1
BLE: Update documentation.
pan- Oct 30, 2017
b0ff836
Copy edit ArrayView.h
Oct 30, 2017
a881bc3
Copy edit BLE.h
Oct 30, 2017
67e7390
Copy edit BLEInstanceBase.h
Oct 30, 2017
c508edb
Threaded wrapper for rail driver on EFR32 platforms
ryankurte Oct 6, 2017
8b06237
Added critical section around rf_start_cca
ryankurte Oct 11, 2017
2dd59ac
introduced mbed Connect Cloud board based on ODIN-W2 Module rety comm…
Oct 12, 2017
1d4e98a
code style adopted
0x6d61726b Oct 31, 2017
3661d05
Tests: RTOS: RtosTimer: Fix tests for NRF51_DK board
fkjagodzinski Oct 31, 2017
d14bd64
BLE: Adaptation interface of the GAP layer.
pan- Oct 11, 2017
4c35515
BLE: Generic Access Service Adaptation layer
pan- Oct 11, 2017
baa96d5
Cosmetic fix
stevew817 Oct 31, 2017
fd7a7e7
Fixed doxygen_options.json
SenRamakri Oct 31, 2017
2676c65
Swapped to macro definition for debug prints
ryankurte Oct 31, 2017
b730195
CMSIS/RTX: Update CMSIS and RTX to 22b68c
bulislaw Oct 12, 2017
17a93af
CMSIS/RTX: Patch RTX4 to preserve osThreadDef compatibility
bulislaw Jul 4, 2017
d5bb715
CMSIS/RTX: Patch RTX includes to match mbed OS scheme
bulislaw Jul 4, 2017
43d9916
CMSIS/RTX: Patch RTX so irq_cm4f.s files work with no FPU targets
bulislaw Jul 4, 2017
85afebb
CMSIS/RTX: Remove os_tick_gtim.c
bulislaw Oct 12, 2017
0a43b08
CSMIS/RTX: cmain IAR: add mbed main
0xc0170 Jun 21, 2017
ae771d5
CMSIS/RTX: Reintroduce core_cmSecureAccess.h lost during CMSIS update
bulislaw Oct 12, 2017
debc648
CMSIS/RTX: Allow overwriting _mutex_initialize symbol for ARMC
bulislaw Oct 18, 2017
1188db9
CMSIS/RTX: Rename asm files to upper case .S
bulislaw Oct 25, 2017
188d85b
RTX5: uVisor: Defer to uVisor for SVCall priority
Patater Jan 30, 2017
a799ae5
RTX5: uVisor: Add OsEventObserver
Patater Jan 19, 2017
16d80b6
RTX5: uVisor: Extend thread control block with context
Patater Jan 25, 2017
d5fdaca
RTX5: uVisor: Use OsEventObserver
Patater Jan 19, 2017
b92bfa0
RTX5: uVisor: Switch threads very carefully
Patater May 25, 2017
f65d8ea
Remove build warnings in LWIP
kegilbert Oct 13, 2017
c2db65f
Python script to add cmsis/rtx changes in mbed-os
Oct 30, 2017
7b46572
Renamed importer script file
Oct 31, 2017
3f49f66
Added arguments to importer script
Oct 31, 2017
3e6c25c
Added a check for the STUCK bit before reading the RNG data register …
dave-wu Nov 2, 2017
31cf1d2
Add mbed-cloud-client support on DISCO_L475VG_IOT01A with
soramame21 Nov 2, 2017
f66e328
Add support for RedBear's BLE Nano 2
Oct 1, 2017
5e3ab1e
Add ConditionVariable to mbed rtos
c1728p9 Jan 26, 2017
7700caf
Add test cases for ConditionVariable
c1728p9 Oct 28, 2017
9d81c58
NUCLEO_L496ZG minor update
jeromecoutant Oct 6, 2017
d5306f7
Tests: RTOS: RtosTimer: Refactor for readability
fkjagodzinski Nov 3, 2017
89ca782
NUCLEO_L496ZG_P support
jeromecoutant Nov 3, 2017
b6ac78d
BLE: Fix initialization of GattHVXCallbackParams in Nordic port.
pan- Nov 3, 2017
44d89bc
Shrink RTOS classes
kjbracey Nov 3, 2017
fca8e2f
event queue test: fix out of memory problem for NUCLEO_F070RB
maciejbocianski Oct 24, 2017
dddb971
small supplement for PR #5338
maciejbocianski Nov 3, 2017
65d43eb
HEXIWEAR: define HEXIWEAR target to support bootloader.
Nov 3, 2017
9657f91
STM32: Extend Ethernet RMII workaround
LMESTM Nov 2, 2017
7534e00
BLE: Update BLE.h comments.
pan- Nov 6, 2017
8da7234
rtl8195am - fix us_ticker interrupt handling
tung7970 Oct 25, 2017
9ebb333
Update HAL code to resolve ticker lockup issue
Archcady Nov 7, 2017
41748c6
Checking in the fixes related to I2C issues.
danclement Oct 27, 2017
c4bc8a4
Increase flash size on Realtek RTL8195AM
Nov 7, 2017
d011cf6
Updated the script to be generic for any repo
Nov 1, 2017
75d8f9c
Copy edit CallChainOfFunctionPointersWithContext.h
Nov 7, 2017
8cfdd57
Copy edit CharacteristicDescriptorDiscovery.h
Nov 7, 2017
7f09bba
Copy edit DiscoveredCharacteristic.h
Nov 7, 2017
77b4ea8
Copy edit DiscoveredCharacteristicDescriptor.h
Nov 7, 2017
208c717
Copy edit DiscoveredService.h
Nov 7, 2017
d3a0ac7
Copy edit FunctionPointerWithContext.h
Nov 7, 2017
fd5a517
Copy edit GattServerEvents.h
Nov 7, 2017
1f5c052
Copy edit GattService.h
Nov 7, 2017
da22d38
Copy edit SafeBool.h
Nov 7, 2017
1f557e8
Copy edit GapAdvertisingParams.h
Nov 7, 2017
3bc1fc0
Copy edit blecommon.h
Nov 7, 2017
b49660b
Copy edit UUID.h
Nov 7, 2017
ebf21fe
Copy edit ServiceDiscovery.h
Nov 7, 2017
9f27cc0
Copy edit GattAttribute.h
Nov 7, 2017
d577b25
Copy edit GapScanningParams.h
Nov 7, 2017
e10d8f9
Copy edit GattCallbackParamTypes.h
Nov 7, 2017
073de1b
Copy edit GattServer.h
Nov 7, 2017
459c5d8
STM32F4: Flash: fix 2MB GetSector computation
LMESTM Nov 8, 2017
86bbe3d
STM32: remove trailing white spaces
LMESTM Nov 8, 2017
0914ff5
Copy edit Gap.h
Nov 8, 2017
a953fe2
Copy edit GattClient.h
Nov 8, 2017
37644f1
Copy edit GapAdvertisingData.h
Nov 8, 2017
a7e4c49
Copy edit GattCharacteristic.h
Nov 8, 2017
4d4488b
- Removed .mbedignore due to an issue with the eclipse exporter not p…
dave-wu Nov 9, 2017
ad2a0fe
STM32F412 IAR linker file issue
jeromecoutant Nov 9, 2017
05607c0
Update HAL library to fix lockup issue
Archcady Nov 9, 2017
b794af2
Remove lines to improve readability
Archcady Nov 9, 2017
a2dc8eb
Increase flash program granularity on Realtek RTL8195AM
Nov 9, 2017
a82e5d3
BLE: Update BatteryService documentation.
pan- Nov 9, 2017
9881111
Reorganize defines for firmware updates on Realtek RTL8195AM
Nov 9, 2017
a6f18e6
Copy edit BatteryService.h
Nov 9, 2017
3ac72f4
Limit size of equeue for sigio net test
sarahmarshy Nov 9, 2017
2448dde
RZ_A1H: Fix cmsis header name
bulislaw Jul 4, 2017
509e22b
Update CThunk to support new CMSIS Cortex A ops
bulislaw Jul 25, 2017
82efe73
Renesas: Add empty mbed_rtx.h
Jul 25, 2017
3c27f06
Update definitions of CPSR modes
Jul 25, 2017
be4a108
Disable heap and stack tests for Cortex A
bulislaw Sep 5, 2017
d246025
Update include paths to match updated CMSIS
bulislaw Oct 12, 2017
b6c0a31
Enabled restrict keyword for IAR
bulislaw Oct 18, 2017
483c928
Update SysTick API usage for tickless mode
bulislaw Oct 18, 2017
62df339
Add arm_math.h
bulislaw Oct 19, 2017
06d6cf5
Update params in calls to LD/STREXW to be uint32_t
bulislaw Oct 19, 2017
798cc9a
Modification to arm_math.h
bulislaw Oct 20, 2017
16cf782
rtl8195am - remove redundant header file inclusion
tung7970 Oct 24, 2017
50e8d51
BLE: Fix assertion in Battery service.
pan- Nov 10, 2017
cf38bff
BLE: update heart rate service definition.
pan- Nov 10, 2017
14c8c53
Apply feedback by @Patater
stevew817 Nov 11, 2017
c48e211
Provide fix for Timer and LowPowerTimer tests (time accumulation).
mprse Nov 13, 2017
10f5424
Move Timer test, modify ASERT macros, fix comments.
mprse Nov 13, 2017
a94a598
Provide fix for Issue #5468.
mprse Nov 13, 2017
3395005
Copy edit HeartRateService.h
Nov 13, 2017
73edbbb
DISCO_L072CZ: align SetSysClock_PLL_HSE() with SetSysClock_PLL_HSI()
bcostm Nov 13, 2017
788d523
DISCO_L072CZ: add comment in clock_source config
bcostm Nov 13, 2017
c2be847
Fix bug for issue 5462, initial pin value not retained
nvlsianpu Nov 13, 2017
4436610
Use ethernet as default config if target has LWIP feature
Oct 17, 2017
ec38924
Updated get_test_config function returns comment
Oct 17, 2017
7500bb5
Updated if statements for conciseness
Oct 17, 2017
59bac87
Removed special config for K64F
Oct 17, 2017
85812bd
STM32: Add support of CAN3 on STM32F413/F767
bcostm Nov 13, 2017
4da5db1
STM32: Use CAN3_BASE + typos
bcostm Nov 14, 2017
76bdf3d
Platform: fix end of line whitespace
pan- Nov 14, 2017
7ebc4f0
Platform: Add MBED_PRETTY_FUNCTION macro.
pan- Nov 14, 2017
44a8b8f
Platform: Turn NonCopyable compile time error into warnings.
pan- Nov 14, 2017
7b41bc6
Remove mbed-cloud-client-example-internal.
adbridge Nov 14, 2017
0ff527d
Added support for ADI EV-COG-AD3029LZ platform.
dave-wu Sep 19, 2017
5db6222
DISCO_L072CZ: remove dead code
bcostm Nov 15, 2017
9126c5b
STM32: fix compilation error with STM32F1
bcostm Nov 15, 2017
bb10914
STM32: fix error with CAN_3 not defined
bcostm Nov 15, 2017
17348bf
STM32: HAL smartcard, fix memory corruption in Receive
LMESTM Nov 15, 2017
f6251ed
Cleaned up some formatting issues.
dave-wu Nov 15, 2017
6b40734
Updated code as per Python style guide
Nov 13, 2017
f0183f1
Corrected the input to remove command
Nov 15, 2017
835f4f2
Fix and add test for ConditionVariable
c1728p9 Nov 15, 2017
d9302f7
[M487/NUC472/NANO130] fix TRUE/FALSE redefinition
cyliangtw Nov 8, 2017
3898746
FATFileSystem: provide working dir_rewind and dir_seek
Nov 14, 2017
366b6d2
Added SystemCoreClock as an extern.
dave-wu Nov 16, 2017
564315c
STM32L072CZ error in ARM sct file name
jeromecoutant Nov 16, 2017
b5dabc2
DISCO_L072CZ_LRWAN1 can use LSE from LORA module (more precise than LSI)
jeromecoutant Nov 16, 2017
4588352
STM32F407VG: Fix RTC
fbmrk Nov 17, 2017
68c5c81
Add ARMC6 feature to EV_COG_AD4050LZ and EV_COG_AD3029LZ
Nov 21, 2017
ca88898
Update trng_api.c
li-ho Nov 21, 2017
12d434d
Update trng_api.c
li-ho Nov 22, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion TESTS/events/queue/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@

using namespace utest::v1;

#define TEST_EQUEUE_SIZE 1024
// TEST_EQUEUE_SIZE was reduced below 1024B to fit this test to devices with small RAM (RAM <= 16kB)
// additionally TEST_EQUEUE_SIZE was expressed in EVENTS_EVENT_SIZE to increase readability
// (for more details about EVENTS_EVENT_SIZE see EventQueue constructor)
#define TEST_EQUEUE_SIZE (18*EVENTS_EVENT_SIZE)

// flag for called
volatile bool touched = false;
Expand Down
97 changes: 50 additions & 47 deletions TESTS/mbed_drivers/lp_timer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,22 @@ extern uint32_t SystemCoreClock;
* DELTA = TOLERANCE_FACTOR / SystemCoreClock * US_FACTOR
*
* e.g.
* For K64F DELTA = (40000 / 120000000) * 1000000 = 333[us]
* For NUCLEO_F070RB DELTA = (40000 / 48000000) * 1000000 = 833[us]
* For NRF51_DK DELTA = (40000 / 16000000) * 1000000 = 2500[us]
* For K64F DELTA = (80000 / 120000000) * 1000000 = 666[us]
* For NUCLEO_F070RB DELTA = (80000 / 48000000) * 1000000 = 1666[us]
* For NRF51_DK DELTA = (80000 / 16000000) * 1000000 = 5000[us]
*/
#define US_PER_SEC 1000000
#define TOLERANCE_FACTOR 40000.0f
#define US_PER_MSEC 1000
#define TOLERANCE_FACTOR 80000.0f
#define US_FACTOR 1000000.0f

static const int delta_sys_clk_us = ((int) (TOLERANCE_FACTOR / (float) SystemCoreClock * US_FACTOR));

#define DELTA_US delta_sys_clk_us
#define DELTA_S ((float)delta_sys_clk_us/US_PER_SEC)
#define DELTA_MS 1
/* When test performs time measurement using Timer in sequence, then measurement error accumulates
* in the successive attempts. */
#define DELTA_US(i) (delta_sys_clk_us * i)
#define DELTA_S(i) ((float)delta_sys_clk_us * i / US_PER_SEC)
#define DELTA_MS(i) (1 + ( (i * delta_sys_clk_us) / US_PER_MSEC))

/* This test verifies if low power timer is stopped after
* creation.
Expand All @@ -75,19 +78,19 @@ void test_lptimer_creation()

/* Check results. */
TEST_ASSERT_EQUAL_FLOAT(0, lp_timer.read());
TEST_ASSERT_EQUAL(0, lp_timer.read_ms());
TEST_ASSERT_EQUAL(0, lp_timer.read_us());
TEST_ASSERT_EQUAL(0, lp_timer.read_high_resolution_us());
TEST_ASSERT_EQUAL_INT32(0, lp_timer.read_ms());
TEST_ASSERT_EQUAL_INT32(0, lp_timer.read_us());
TEST_ASSERT_EQUAL_UINT64(0, lp_timer.read_high_resolution_us());

/* Wait 10 ms.
* After that operation timer read routines should still return 0. */
wait_ms(10);

/* Check results. */
TEST_ASSERT_EQUAL_FLOAT(0, lp_timer.read());
TEST_ASSERT_EQUAL(0, lp_timer.read_ms());
TEST_ASSERT_EQUAL(0, lp_timer.read_us());
TEST_ASSERT_EQUAL(0, lp_timer.read_high_resolution_us());
TEST_ASSERT_EQUAL_INT32(0, lp_timer.read_ms());
TEST_ASSERT_EQUAL_INT32(0, lp_timer.read_us());
TEST_ASSERT_EQUAL_UINT64(0, lp_timer.read_high_resolution_us());
}

/* This test verifies if read(), read_us(), read_ms(),
Expand Down Expand Up @@ -115,10 +118,10 @@ void test_lptimer_time_accumulation()
lp_timer.stop();

/* Check results - totally 10 ms have elapsed. */
TEST_ASSERT_FLOAT_WITHIN(DELTA_S, 0.010f, lp_timer.read());
TEST_ASSERT_INT32_WITHIN(DELTA_MS, 10, lp_timer.read_ms());
TEST_ASSERT_INT32_WITHIN(DELTA_US, 10000, lp_timer.read_us());
TEST_ASSERT_UINT64_WITHIN(DELTA_US, 10000, lp_timer.read_high_resolution_us());
TEST_ASSERT_FLOAT_WITHIN(DELTA_S(1), 0.010f, lp_timer.read());
TEST_ASSERT_INT32_WITHIN(DELTA_MS(1), 10, lp_timer.read_ms());
TEST_ASSERT_INT32_WITHIN(DELTA_US(1), 10000, lp_timer.read_us());
TEST_ASSERT_UINT64_WITHIN(DELTA_US(1), 10000, lp_timer.read_high_resolution_us());

/* Wait 50 ms - this is done to show that time elapsed when
* the timer is stopped does not have influence on the
Expand All @@ -137,10 +140,10 @@ void test_lptimer_time_accumulation()
lp_timer.stop();

/* Check results - totally 30 ms have elapsed. */
TEST_ASSERT_FLOAT_WITHIN(2 * DELTA_S, 0.030f, lp_timer.read());
TEST_ASSERT_INT32_WITHIN(DELTA_MS, 30, lp_timer.read_ms());
TEST_ASSERT_INT32_WITHIN(2 * DELTA_US, 30000, lp_timer.read_us());
TEST_ASSERT_UINT64_WITHIN(2 * DELTA_US, 30000, lp_timer.read_high_resolution_us());
TEST_ASSERT_FLOAT_WITHIN(DELTA_S(2), 0.030f, lp_timer.read());
TEST_ASSERT_INT32_WITHIN(DELTA_MS(2), 30, lp_timer.read_ms());
TEST_ASSERT_INT32_WITHIN(DELTA_US(2), 30000, lp_timer.read_us());
TEST_ASSERT_UINT64_WITHIN(DELTA_US(2), 30000, lp_timer.read_high_resolution_us());

/* Wait 50 ms - this is done to show that time elapsed when
* the timer is stopped does not have influence on the
Expand All @@ -158,10 +161,10 @@ void test_lptimer_time_accumulation()
lp_timer.stop();

/* Check results - totally 60 ms have elapsed. */
TEST_ASSERT_FLOAT_WITHIN(3 * DELTA_S, 0.060f, lp_timer.read());
TEST_ASSERT_INT32_WITHIN(DELTA_MS, 60, lp_timer.read_ms());
TEST_ASSERT_INT32_WITHIN(3 * DELTA_US, 60000, lp_timer.read_us());
TEST_ASSERT_UINT64_WITHIN(3 * DELTA_US, 60000, lp_timer.read_high_resolution_us());
TEST_ASSERT_FLOAT_WITHIN(DELTA_S(3), 0.060f, lp_timer.read());
TEST_ASSERT_INT32_WITHIN(DELTA_MS(3), 60, lp_timer.read_ms());
TEST_ASSERT_INT32_WITHIN(DELTA_US(3), 60000, lp_timer.read_us());
TEST_ASSERT_UINT64_WITHIN(DELTA_US(3), 60000, lp_timer.read_high_resolution_us());

/* Wait 50 ms - this is done to show that time elapsed when
* the timer is stopped does not have influence on the
Expand All @@ -179,11 +182,11 @@ void test_lptimer_time_accumulation()
/* Stop the timer. */
lp_timer.stop();

/* Check results - totally 5060 ms have elapsed. */
TEST_ASSERT_FLOAT_WITHIN(4 * DELTA_S, 1.060f, lp_timer.read());
TEST_ASSERT_INT32_WITHIN(DELTA_MS, 1060, lp_timer.read_ms());
TEST_ASSERT_INT32_WITHIN(4 * DELTA_US, 1060000, lp_timer.read_us());
TEST_ASSERT_UINT64_WITHIN(4 * DELTA_US, 1060000, lp_timer.read_high_resolution_us());
/* Check results - totally 1060 ms have elapsed. */
TEST_ASSERT_FLOAT_WITHIN(DELTA_S(4), 1.060f, lp_timer.read());
TEST_ASSERT_INT32_WITHIN(DELTA_MS(4), 1060, lp_timer.read_ms());
TEST_ASSERT_INT32_WITHIN(DELTA_US(4), 1060000, lp_timer.read_us());
TEST_ASSERT_UINT64_WITHIN(DELTA_US(4), 1060000, lp_timer.read_high_resolution_us());
}

/* This test verifies if reset() function resets the
Expand All @@ -209,10 +212,10 @@ void test_lptimer_reset()
lp_timer.stop();

/* Check results - totally 10 ms elapsed. */
TEST_ASSERT_FLOAT_WITHIN(DELTA_S, 0.010f, lp_timer.read());
TEST_ASSERT_INT32_WITHIN(DELTA_MS, 10, lp_timer.read_ms());
TEST_ASSERT_INT32_WITHIN(DELTA_US, 10000, lp_timer.read_us());
TEST_ASSERT_UINT64_WITHIN(DELTA_US, 10000, lp_timer.read_high_resolution_us());
TEST_ASSERT_FLOAT_WITHIN(DELTA_S(1), 0.010f, lp_timer.read());
TEST_ASSERT_INT32_WITHIN(DELTA_MS(1), 10, lp_timer.read_ms());
TEST_ASSERT_INT32_WITHIN(DELTA_US(1), 10000, lp_timer.read_us());
TEST_ASSERT_UINT64_WITHIN(DELTA_US(1), 10000, lp_timer.read_high_resolution_us());

/* Reset the timer - previous measured time should be lost now. */
lp_timer.reset();
Expand All @@ -227,10 +230,10 @@ void test_lptimer_reset()
lp_timer.stop();

/* Check results - 20 ms elapsed since the reset. */
TEST_ASSERT_FLOAT_WITHIN(DELTA_S, 0.020f, lp_timer.read());
TEST_ASSERT_INT32_WITHIN(DELTA_MS, 20, lp_timer.read_ms());
TEST_ASSERT_INT32_WITHIN(DELTA_US, 20000, lp_timer.read_us());
TEST_ASSERT_UINT64_WITHIN(DELTA_US, 20000, lp_timer.read_high_resolution_us());
TEST_ASSERT_FLOAT_WITHIN(DELTA_S(1), 0.020f, lp_timer.read());
TEST_ASSERT_INT32_WITHIN(DELTA_MS(1), 20, lp_timer.read_ms());
TEST_ASSERT_INT32_WITHIN(DELTA_US(1), 20000, lp_timer.read_us());
TEST_ASSERT_UINT64_WITHIN(DELTA_US(1), 20000, lp_timer.read_high_resolution_us());
}

/* This test verifies if calling start() for already
Expand Down Expand Up @@ -260,10 +263,10 @@ void test_lptimer_start_started_timer()
lp_timer.stop();

/* Check results - 30 ms have elapsed since the first start. */
TEST_ASSERT_FLOAT_WITHIN(2 * DELTA_S, 0.030f, lp_timer.read());
TEST_ASSERT_INT32_WITHIN(DELTA_MS, 30, lp_timer.read_ms());
TEST_ASSERT_INT32_WITHIN(2 * DELTA_US, 30000, lp_timer.read_us());
TEST_ASSERT_UINT64_WITHIN(2 * DELTA_US, 30000, lp_timer.read_high_resolution_us());
TEST_ASSERT_FLOAT_WITHIN(DELTA_S(2), 0.030f, lp_timer.read());
TEST_ASSERT_INT32_WITHIN(DELTA_MS(2), 30, lp_timer.read_ms());
TEST_ASSERT_INT32_WITHIN(DELTA_US(2), 30000, lp_timer.read_us());
TEST_ASSERT_UINT64_WITHIN(DELTA_US(2), 30000, lp_timer.read_high_resolution_us());
}

/* This test verifies low power timer float operator.
Expand All @@ -287,7 +290,7 @@ void test_lptimer_float_operator()
lp_timer.stop();

/* Check result - 10 ms elapsed. */
TEST_ASSERT_FLOAT_WITHIN(DELTA_S, 0.010f, (float )(lp_timer));
TEST_ASSERT_FLOAT_WITHIN(DELTA_S(1), 0.010f, (float )(lp_timer));
}

/* This test verifies if time counted by the low power timer is
Expand All @@ -313,10 +316,10 @@ void test_lptimer_time_measurement()
lp_timer.stop();

/* Check results - wait_val_us us have elapsed. */
TEST_ASSERT_FLOAT_WITHIN(DELTA_S, (float )wait_val_us / 1000000, lp_timer.read());
TEST_ASSERT_INT32_WITHIN(DELTA_MS, wait_val_us / 1000, lp_timer.read_ms());
TEST_ASSERT_INT32_WITHIN(DELTA_US, wait_val_us, lp_timer.read_us());
TEST_ASSERT_UINT64_WITHIN(DELTA_US, wait_val_us, lp_timer.read_high_resolution_us());
TEST_ASSERT_FLOAT_WITHIN(DELTA_S(1), (float )wait_val_us / 1000000, lp_timer.read());
TEST_ASSERT_INT32_WITHIN(DELTA_MS(1), wait_val_us / 1000, lp_timer.read_ms());
TEST_ASSERT_INT32_WITHIN(DELTA_US(1), wait_val_us, lp_timer.read_us());
TEST_ASSERT_UINT64_WITHIN(DELTA_US(1), wait_val_us, lp_timer.read_high_resolution_us());
}

utest::v1::status_t test_setup(const size_t number_of_cases)
Expand Down
Loading