Sorry to revive an old post but on the CYW43907 I see the same issue with sleep mode with SDK 6.2.1.
I am running the FreeRTOS build and there is definitely a major accuracy issue while using the tickless mode while sleeping the processor. The time functions in wiced are based on the host os tick value. I am seeing timing off by as much as 12 seconds over a minute period.
Attached is the example that I am using to test this issue. Please check the log mentioned below. I am not seeing any drift. Please let me know if I need to do anything different to reproduce the issue.
Starting WICED vWiced_006.002.001.0002
Platform CYW943907AEVAL1F initialised
Started FreeRTOS v9.0.0
Initialising LwIP v2.0.3
DHCP CLIENT hostname WICED IP
WWD SoC.43909 interface initializing with US/0
WLAN MAC Address : A4:08:EA:D9:D4:E6
WLAN Firmware : wl0: May 15 2018 19:39:17 version 22.214.171.124 (r689934) FWID 01-d6f88905
WLAN CLM : API: 12.2 Data: 9.10.74 Compiler: 1.31.3 ClmImport: 1.36.3 Creation: 2018-05-15 19:33:15
Init took ~172 ms
Joining : CY-IOT-HOTSPOT
Successfully joined : CY-IOT-HOTSPOT
Setting IPv6 link-local address
Obtaining IPv4 address via DHCP
IPv6 Network ready IP: FE80::A608:EAFF:FED9:D4E6
IPv4 Network ready IP: 10.40.2.106
Enable MCU powersave
Create thread and timed event
I will look at your example when i am back at work in a couple of weeks.
Here are the steps that i used to see the issue
1. Run Realterm with direct capture enabled and timestamp option set to YMDHS.
2. Run a periodic task in WICED that prints to the screen, like every 60 seconds.
3. Let run for an hour
4. Stop the Realterm capture and look at the output, compare the Realterm YMDS timestamp intervals to see if they differ from the 60s interval.
What i have found is that the rtos tick accumulates a lot of error over time. Specifically, when I wrap the sleep function in FreeRTOS task idle with a GPIO toggle i saw that sometimes the processor slept for around 300uS but the steptick will always increment by a minimum of 1.
I have attached what notes i have on the issue