Pulse Code Modulation (PCM) Low-Power Instance#

The Ultra-Low-Power (ULP) PCM peripheral is designed for energy-efficient audio operation on the SiWx917 system-on-chip (SoC). It runs in the ULP subsystem and can remain active in Power State 2 (PS2), enabling always-on audio scenarios while the rest of the system remains in sleep mode.

The Power Manager coordinates:

  • Power-state transitions (PS4, PS3, PS2, PS1)

  • Peripheral enable/disable

  • RAM retention

  • Wakeup source configuration

This section explains how to use ULP PCM for low-power audio streaming and how to manage GPIO and power transitions correctly.

Pin Selection: ULP GPIO vs HP GPIO#

Selecting the correct general-purpose input/output (GPIO) pins is essential for reliable PCM communication in low-power modes. Using incompatible GPIO types can disrupt data flow or increase power consumption.

ULP GPIO#

  • Use ULP GPIO pins for ULP PCM signals in PS2:

    • DIN (Data In)

    • DOUT (Data Out)

    • SCLK (Serial Clock / Bit Clock)

    • FSYNC (Frame Synchronization)

  • ULP GPIO pins remain active in PS2 and are optimized for low leakage.

  • This is the recommended configuration for always-on audio designs.

High-Performance (HP) GPIO#

  • HP GPIOs are not active in PS2 and can increase current consumption.

  • If HP GPIOs are used:

    • Reconfigure them before entering PS2 if they must be retained.

    • Restore their configuration on wake-up.

  • Prefer ULP GPIO whenever PS2 audio is required.

Achieving Low-Power Operation (PS2 and PS1)#

To run PCM in low-power mode, you must configure the Power Manager and related system resources. Proper configuration ensures that the ULP PCM operates efficiently in PS2 while maintaining reliable audio performance.

Steps to Enable ULP PCM in PS2#

  1. Configure Power Manager in Simplicity Studio to allow PS2 entry.

  2. Add and enable the ULP PCM component in your project.

  3. Use sl_si91x_power_manager_add_ps_requirement() to request PS2.

  4. Power down unused HP peripherals and enable RAM retention as needed.

  5. Allocate ULP memory for DMA buffers to preserve audio data.

  6. Configure wakeup sources such as ULP GPIO, timers, or wireless events.

// Deinitialize PCM before entering low power
sl_si91x_pcm_deinit(PCM_INSTANCE_USED); // Disables PCM peripheral
// Add PS2 requirement to enter low-power mode
sl_si91x_power_manager_add_ps_requirement(SL_SI91X_POWER_MANAGER_PS2);
// ... MCU enters PS2 sleep state ...

Note: In PS2, only ULP peripherals such as ULP PCM and ULP GPIO remain active.

Reconfiguring Peripherals After Wakeup#

When the SiWx917 device wakes from PS2, reinitialize and reconfigure both the PCM and GPIO peripherals. This ensures consistent audio operation and prevents data loss after power transitions.

Procedure#

  1. Reinitialize the PCM peripheral using sl_si91x_pcm_init().

  2. Reinitialize ULP GPIOs for PCM and wakeup sources (DEBUGINIT() for debug output).

  3. Restore configuration settings lost during sleep, including FIFO thresholds and callback or event registrations.

  4. Resume audio transfers or streaming operations.

sl_si91x_pcm_init(PCM_INSTANCE_USED, &sl_pcm_config); // Reinitialize PCM
DEBUGINIT(); // Reinitialize GPIOs for debug output
sl_si91x_pcm_configure_power_mode(PCM_INSTANCE_USED, PCM_POWER_MODE);
// Restore configuration and resume audio streaming

Tip: Store configuration data in retained RAM to shorten wake-up time and restore settings quickly.

Practical Example Flow#

This example demonstrates how to transition the PCM subsystem between high-power (PS4) and low-power (PS2) modes, then resume continuous audio streaming.

Step 1. Start in PS4 (High Power)#

Initialize PCM and perform standard audio streaming or recording operations.

sl_pcm_config = sl_pcm_ulp_config;
sl_si91x_pcm_init(PCM_INSTANCE_USED, &sl_pcm_config);
DEBUGINIT(); // Initialize GPIOs for debug output
sl_si91x_pcm_configure_power_mode(PCM_INSTANCE_USED, PCM_POWER_MODE);
// Perform audio playback or recording

Tip: Use PS4 mode for setup and testing to verify system operation before transitioning to low-power states.

Step 2. Switch to PS2 (Low Power)#

Before entering PS2, disable unused peripherals, configure RAM retention, and prepare PCM for low-power operation. Use ULP memory for DMA buffers when required.

sl_si91x_pcm_deinit(PCM_INSTANCE_USED); // Disable PCM peripheral and clear buffers
sl_si91x_power_manager_add_ps_requirement(SL_SI91X_POWER_MANAGER_PS2); // Enter PS2
// MCU enters PS2 low-power state

Note: In PS2, only ULP PCM and ULP GPIO peripherals remain operational.

Step 3. Wake Up and Resume Operation#

After waking from PS2, reinitialize peripherals and restore settings to continue seamless audio streaming.

sl_si91x_pcm_init(PCM_INSTANCE_USED, &sl_pcm_config); // Reinitialize PCM
DEBUGINIT(); // Reinitialize GPIOs for debug output
sl_si91x_pcm_configure_power_mode(PCM_INSTANCE_USED, PCM_POWER_MODE);
// Resume playback or capture operation

This flow ensures continuous and reliable PCM communication while maintaining optimal energy efficiency during power transitions.

Additional Recommendations#

  • Verify that ULP GPIOs are mapped correctly for PCM signals (DIN, DOUT, SCLK, FSYNC).

  • Use logic analyzers to confirm signal activity and alignment during low-power transitions.

  • Keep debug logging enabled during development to validate power-state behavior.

  • Review the Power Manager API documentation for detailed control over power states and wake-up sources.

  • Ensure proper frame synchronization and clock configuration when transitioning between power states.

References#

For more information and detailed implementation examples, see: