I recently enabled power management in my code base by adding these two oiptions to my prj.conf:
CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_RUNTIME=y
<err> qspi_nor: pm_device_runtime_put failed: -16
I recently enabled power management in my code base by adding these two oiptions to my prj.conf:
CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_RUNTIME=y
<err> qspi_nor: pm_device_runtime_put failed: -16
Hi
Error message -16 points to the device or resource you're calling being busy, so it seems the QSPI is doing something when the pm_device_runtime_put() function is being called in your project. If you don't intend to suspend the device, like this function does, you should find out where and why it's being called, as something in your application is trying to put the device in a suspended state.
Best regards,
Simon
Hi SImon,
Thabks for your reply. I agree with the first part of your answer: indeed, it seems like the QSPI NOR device is busy when pm_device_runtime_put is being called. However, I disagree with "something in your application is trying to put the device in a suspended state", because I don't do any explicit power management on the QSPI NOR in my application. And I don't think I should, because I believe that the QSPI NOR driver (and maybe some lower level drivers) should do this automatically. If my applcation should actually be involved in this process, please let me know how.
Thanks,
Bogdan
EDIT: also, remember what I said earlier: in my application, I don't actually want the QSPI NOR to go to sleep, which is why I set CONFIG_NORDIC_QSPI_NOR_XIP=y. It is my understanding that this configuration option should prevent the QSPI NOR from sleeping. If this is correct, then the driver shouldn't attempt to put it to sleep at all.
Hi SImon,
Thabks for your reply. I agree with the first part of your answer: indeed, it seems like the QSPI NOR device is busy when pm_device_runtime_put is being called. However, I disagree with "something in your application is trying to put the device in a suspended state", because I don't do any explicit power management on the QSPI NOR in my application. And I don't think I should, because I believe that the QSPI NOR driver (and maybe some lower level drivers) should do this automatically. If my applcation should actually be involved in this process, please let me know how.
Thanks,
Bogdan
EDIT: also, remember what I said earlier: in my application, I don't actually want the QSPI NOR to go to sleep, which is why I set CONFIG_NORDIC_QSPI_NOR_XIP=y. It is my understanding that this configuration option should prevent the QSPI NOR from sleeping. If this is correct, then the driver shouldn't attempt to put it to sleep at all.