Hi,
Im using an SPI device and also the SPIM NRF driver. This device is not always on, but the overall flow is:
- Power On the device on boot and do basic info readings to check if the device is ok
- Turn off the device
- Start the delayable Zephyr work, for example 1 minute delay
- The delayable Zephyr work triggers, power on the SPI device and tries to communicate with it
- Writings to the device work, from the power profiller I can see the wave changes as I send commands to it - like a soft reset for example
- Cant read from the device, value from reaing always return 0.
However using a flow without the wrok queue, just the main thread and the same function being used inside the work:
- Power On the device on boot and do basic info readings to check if the device is ok
- Turn off the device
- Do a k_sleep(K_SECONDS(60))
- Power on the SPI device and tries to communicate with it
- Writings to the device work, from the power profiller I can see the wave changes as I send commands to it - like a soft reset for example
- Can read correctly the data coming form the device
Do you have any clue for why this is happening ? Or what things I should try in order to debug this issue ? Havent attached a logical analyzer yet but I pretend to. Also, the work queue stack size is big enough for the function Im running, so I believe the issue is not there. Im also running a BLE advertising every 10 seconds, but even with the BLE stack and advertising disable the behavior is the same.
Thank you!
