There is no problem with this test during the morph, but some issue has been noticed while testing new Jenkins CI in Oulu on NRF52_DK.
I was able to reproduce the issue locally. The difference between morph and local run is that CPU statistics are enabled on morph. This makes the difference and test passes.
The sleep test case perform sleep for 100 us, 200 us, ... ,1000 us in loop (us ticker wakes the board) and verifies if sleep time matches the assumption.
I got the following results:
sleep wake-up after
100 us ~100 us ok
200 us ~200 us ok
300 us ~300 us ok
400 us ~400 us ok
500 us ~14 us (??)
When requested sleep time is equal to 500 us some unexpected interrupt occurs which wakeup the board and force the test to fail.
Register state just after exit from sleep:
Control and State Register: 0x00400000 (ISRPENDING - Interrupt pending flag is set).
NVIC Interrupt Set-pending Register[0]: 0x00000004 (UARTE0_UART0_IRQn) or 0x00000200 (TIMER1_IRQn - timer used by us ticker).
UART interrupt is generated because of green-tea transmission. We know that it is performed while test is executed since we need to wait before going into deep-sleep since otherwise the transmission will be broken. So to take care of UART interrupt we need to wait before sleep test in the same way like it is done in deep-sleep test.
While feature changes were being added to mbed-os a number of
examples were removed from this list due to incompatibility issues.
This PR adds those examples back in:
Filesystem,
Blockdevice,
Mesh-minimal,
Bootloader.
This PR also adds in the new NFC example.
Test case was assuming that secure and unsecure SSID were on different
channels.
This is not a requirement and it should be OK to run on same channel.
Fixed the testcase by using +1 on channel number to get a wrong channel.
pwmout:
Used SystemCoreClock
Serial fuart:
SERIAL_5 & SERIAL_3 have same CTS pin (PA7), only function register is different (4 & 2).
pinmap_peripheral() will always return first match from the map.
Hence changed as, if SERIAL_5 is used, then pinmap_peripheral() should return SERIAL_5 (function register 2 to be set).
2.4GHz and 5GHz channels might be using the same SSID. Wifi scan
might also fail occasionally to find secure- and unsecure channels
on same scan so lets not assume that we'll find both.