Platform/ECM3532/DSP/hw/csp/ecm3532/src/eta_csp_dsp.c
/***************************************************************************/
/**
 *
 *  EtaCspDspSetupForSleep - Sets up local logic to allow for sleep operations
 *                           where the DSP clock stops and will be restarted
 *                           when a peripheral indicates it has work to do
 *                           for either DSP core or DMA.
 *
 *  Note: This enables all peripherals to wake the system. Generally, all
 *        peripherals  must be enabled to trigger the wake signal in the
 *        peripheral logic (e.g. enable interrupts or source ready, etc), so
 *        enabling all peripherals is reasonably safe barring misconfiguration.
 *
 ******************************************************************************/
Sets up local logic to allow for sleep operations
where the DSP clock stops and will be restarted
when a peripheral indicates it has work to do
for either DSP core or DMA.

This enables all peripherals to wake the system. Generally, all
peripherals  must be enabled to trigger the wake signal in the
peripheral logic , so
enabling all peripherals is reasonably safe barring misconfiguration.
Sets up local logic to allow for sleep operations where the DSP clock stops and will be restarted when a peripheral indicates it has work to do for either DSP core or DMA . This enables all peripherals to wake the system . Generally all peripherals must be enabled to trigger the wake signal in the peripheral logic so enabling all peripherals is reasonably safe barring misconfiguration .
void
EtaCspDspSetupForSleep(void)
{
    REG_DSPCTRL_DSP_CLK_CTRL = (0 << BP_DSPCTRL_DSP_CLK_CTRL_HYST_COUNT)     |
                               BM_DSPCTRL_DSP_CLK_CTRL_ALLOW_INT_TO_WAKE     |
                               BM_DSPCTRL_DSP_CLK_CTRL_ALLOW_DMA_TO_WAKE     |
                               BM_DSPCTRL_DSP_CLK_CTRL_ALLOW_ADC_TO_WAKE     |
                               BM_DSPCTRL_DSP_CLK_CTRL_ALLOW_I2S_TO_WAKE     |
                               BM_DSPCTRL_DSP_CLK_CTRL_ALLOW_PDM1_TO_WAKE    |
                               BM_DSPCTRL_DSP_CLK_CTRL_ALLOW_PDM0_TO_WAKE    |
                               BM_DSPCTRL_DSP_CLK_CTRL_ALLOW_I2C_TO_WAKE     |
                               BM_DSPCTRL_DSP_CLK_CTRL_ALLOW_SPI_TO_WAKE     |
                               BM_DSPCTRL_DSP_CLK_CTRL_ALLOW_AHB2DSP_TO_WAKE |
                               BM_DSPCTRL_DSP_CLK_CTRL_KEEP_CLK_RUNNING;
}
void EtaCspDspSetupForSleep ( void ) { REG_DSPCTRL_DSP_CLK_CTRL = ( 0 << BP_DSPCTRL_DSP_CLK_CTRL_HYST_COUNT ) | BM_DSPCTRL_DSP_CLK_CTRL_ALLOW_INT_TO_WAKE | BM_DSPCTRL_DSP_CLK_CTRL_ALLOW_DMA_TO_WAKE | BM_DSPCTRL_DSP_CLK_CTRL_ALLOW_ADC_TO_WAKE | BM_DSPCTRL_DSP_CLK_CTRL_ALLOW_I2S_TO_WAKE | BM_DSPCTRL_DSP_CLK_CTRL_ALLOW_PDM1_TO_WAKE | BM_DSPCTRL_DSP_CLK_CTRL_ALLOW_PDM0_TO_WAKE | BM_DSPCTRL_DSP_CLK_CTRL_ALLOW_I2C_TO_WAKE | BM_DSPCTRL_DSP_CLK_CTRL_ALLOW_SPI_TO_WAKE | BM_DSPCTRL_DSP_CLK_CTRL_ALLOW_AHB2DSP_TO_WAKE | BM_DSPCTRL_DSP_CLK_CTRL_KEEP_CLK_RUNNING ; }
EtaCspDspSetupForSleep - Sets up local logic to allow for sleep operations
                           where the DSP clock stops and will be restarted
                           when a peripheral indicates it has work to do
                           for either DSP core or DMA.
EtaCspDspSetupForSleep - Sets up local logic to allow for sleep operations where the DSP clock stops and will be restarted when a peripheral indicates it has work to do for either DSP core or DMA .