When I compile the LTO project with JN-AN-1246-Zigbee-3-0-Sensors, download it to the JN5189-DK006 development board and add the coordinator. For the first 3 minutes of the program running, it can hold
Wake up after 1 second of sleep and cycle to 180 seconds. When printing the log PIR_OC: vHandlePIROpenCollectorOccupiedToUnoccupiedTimerExpired (), after the Occ = 0, it's sleep time is not accurate, very frequent awakenings. Call this sleep function PWR_eScheduleActivity(&sWake, u32PwrmTicks, vWakeCallBack) return value 3(PWR_E_TIMER_RUNNING), why not return 0(PWR_E_OK).
Attached is the log. Could you please help me find out the reason?
thank you
Hello @Tome-mbedded
Hope you are doing well.
Just to confirm, what SDK version are you using? Have you modified the base source code of JN-AN-1246?
Regards,
Eduardo.
hi @EduardoZamora , Do you have time to help me analyze this problem? thankyou very much
hi @EduardoZamora Attached is the original log of JN-AN-1246, which shows that the time of sleep and wake is inconsistent after line 1461: [11:38:26.671]
Hi,
Could you please test the pre-built binary file (before building your own binary by changing the device and IDE version)?
According to the JN-AN-1246 Zigbee 3 Sensors Document (inside JN-AN-1246 folder > Doc), when in Normal Mode, The LTO Sensor should send out an attribute report after 1 second if the light level / temperature level changes by at least a (defined) min reportable change. If there is no change, it will send a report after every 61 seconds by default.
The Occupancy Sensor is simulated by the USER INTERFACE button. If no event is simulated by pressing this button within a certain timeout period (180 seconds, by default), the sensor will move to the unoccupied state.
Regards,
Eduardo.
hi, @EduardoZamora , thank you replay to me!
I tested the same phenomenon with pre-built binaries, waking up multiple times within 1s after 3 minutes.I think it's normal to wake up once for 1s, just like the first 3 minutes.See the screenshot below.Looking forward to your reply!
Hi,
PreSleep callback should set the conditions before the controller is put into sleep mode. The main_task should validate if the device is able to sleep or not by calling vAttemptToSleep() and tries to put it into sleep mode if possible.
Regards,
Eduardo.
@EduardoZamora hello,
Now I run this 1246 project again, compile the LTOSensor routine, I set 5s to wake up once, the property u16PIROccupiedToUnoccupiedDelay is set to 180s. It is not set to wake up 1 time in 5s sleep. Until the "userinterface" is pressed again, it will wake up once in 5s sleep, but after 180s, it wakes up frequently until the "userinterface" button is pressed, and the cycle is repeated. Why doesn't it sleep?
Logs show frequent awakenings,Why is this?
@EduardoZamora hello, I have been puzzled by this question for more than a week, please help me look at it sometime。 Thank you very much.
@EduardoZamora hello, Do you have time to look at this problem