LWM2M Client - Power Management/callback functions

Good day

I have noticed that when using a callback functions certain limitations exist.  For example, adding functions to the callback function will run into an error or a timeout.  Firstly, I wanted to ask what the limitations when using a callback function(specifically lwm2m ).  Secondly, I am using 

pm_device_action_run(uart_dev, PM_DEVICE_ACTION_SUSPEND);  and 
pm_device_action_run(uart_dev, PM_DEVICE_ACTION_RESUME);
to dynamically turn the UART on and off during the callback function.  I was able to switch the UART on but when I use pm_device_action_run(uart_dev, PM_DEVICE_ACTION_SUSPEND at the end of the function, the UART does not switch off despite the function returning a 0.  What could be the cause of this?  I am aware that these issues are rather specific and any advice would be worthwhile.
Kind regards,
Hassan
  • Hi,

    Could you specify your NCS and modem firmware version?

    Could you describe in more detail what was expected to happen in the first ("working") and second ("not working") case? What actually happened? Could you elaborate on "modem is used again"? When the function was not working, what actually happened? Do you have any log or modem trace?

    I have noticed that you have 4 open and 5 closed curly braces in non-working part of the code.

    Best regards,
    Dejan

Related