2023-06-30 05:00 AM
Hi,
I have a bit of a problem.
Currently I´m using the M7 to do all the work, it initializes all the peripherals it needs.
The M4 waits for M7 to configure stuff and then goto standby mode.
The problem is related to sleep/stop/standby mode of the different processors.
I use a UWB radio, using an interrupt pin and SPI2 (using DMA) as interface.
After M7 waking up from stop mode, it re-enables all clocks and all interrupts (it turns most stuff off, keep CSI alive for a timer)
However, depending on the sleep state of the M4, I cannot communicate with the UWB radio. I only get a single interrupt and then something is not working (either SPI, DMA or the interrupt line).
Also, debugging seems to affect stuff as well (which is not that surprising, since it probably forces some clocks to be alive).
M4 State | M7 State | Debugging | Works |
Standby | Sleep | Yes | Yes |
Standby | Stop | Yes | Yes |
Stop | Sleep | Yes | No |
Stop | Stop | Yes | No |
Sleep | Sleep | Yes | Yes |
Sleep | Stop | Yes | Yes |
Standby | Sleep | No | No |
Standby | Stop | No | No |
Stop | Sleep | No | No |
Stop | Stop | No | No |
Sleep | Sleep | No | Yes |
Sleep | Stop | No | Yes |
Where should I start digging...?