Part Number Hot Search : 
CD261XQX MBR206 TDA580 HT9172 SSFP6N40 NSPB520S TC58DVM 2SC2739
Product Description
Full Text Search
 

To Download STA321 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  october 2009 doc id 15351 rev 3 1/157 1 STA321 4-channel digital audio system with ffx? driver features ? high efficiency ffx? class-d modulator ? 100-db dynamic range ? two stereo channels with i 2 s input/output data interface ? 16-bit stereo adc input with pga and microphone biasing ? analog and digital muxi ng/mixing capability ? 4-channel input sample rate converter (8 khz to 192 khz) ? four channels of 24-bit audio processing ? flexible channel mapping and routing ? output configurations: ?2.0 ?2.1 ?4.0 ?mono ? embedded cmos bridge: up to 0.5 w/channel ? pfstart? for pop-free single-ended operations ? play and record simultaneous operation ? pre and post mix stages ? individual channel and master gain/attenuation ? digital gain/attenuation -105 db to +36 db in 0.5-db steps ? soft volume update and muting ? dc-blocking selectable high-pass filter ? selectable de-emphasis filter ? up to 13 28-bit user programmable biquads (eq) per channel ? bass/treble tone control ? ternary, binary or phase shift modulation ? pwm output ? headphone output with jack detector ? i 2 c control. lqfp-64 package with exposed pad down (epd) table 1. device summary order code temperature range package packaging STA321 0 to 70 c lqfp-64 epd tray STA321tr 0 to 70 c lqfp-64 epd tape and reel www.st.com
contents STA321 2/157 doc id 15351 rev 3 contents 1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2 pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3 electrical specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.1 absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.2 recommended operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.3 electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.4 embedded crystal oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.5 embedded dc regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4 power-up and power-down sequences . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.1 device power-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.2 software power-down mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.2.1 configuration example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.3 hardware power-down mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4.3.1 mild power-down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.3.2 full power-down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5 clock management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 5.1 system clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 5.1.1 configuration example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 5.2 peripheral clock manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 5.3 fractional pll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 5.3.1 pll block description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 5.3.2 output frequency computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 6 digital processing stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 6.1 signal processing flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 6.2 sampling rate converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 6.3 pre-eq mix 1 and post-eq mix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 6.3.1 presets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 6.4 pre scaler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
STA321 contents doc id 15351 rev 3 3/157 6.4.1 presets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 6.5 equalization, tone control and effects . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 6.6 biquads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 6.6.1 presets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 6.7 high-pass filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 6.8 deemphasis filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 6.9 bass and treble control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 6.9.1 configuration example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 6.10 programmable delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 6.10.1 presets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 6.11 volume and mute control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 6.12 limiter (clamping) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 6.13 ffx channel re-mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 6.14 memory programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 6.14.1 writing one coefficient/location to ram . . . . . . . . . . . . . . . . . . . . . . . . . 44 6.14.2 writing a set of five coefficients/locations to ram . . . . . . . . . . . . . . . . . 45 6.14.3 reading a set of five coefficients/locations from ram . . . . . . . . . . . . . . 46 6.14.4 ram mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 7 ffx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 7.1 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 7.2 modulation schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 7.3 pwm shift feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 7.4 ternary mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 7.5 minimum pulse limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 7.6 headphone modulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 7.7 pfstart? operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 7.8 pwm00 output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 8 cmos power stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 9 fault detection and recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 9.1 external amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 9.2 cmos bridge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
contents STA321 4/157 doc id 15351 rev 3 10 adc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 10.1 description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 10.2 application schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 10.2.1 configuration example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 11 serial audio interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 11.1 master mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 11.2 slave mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 11.3 serial formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 11.3.1 right justified . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 11.3.2 left justified . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 11.3.3 dsp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 11.3.4 i 2 s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 11.3.5 pcm/if (non-delayed mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 11.3.6 pcm/if (delayed mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 11.4 invalid detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 12 headphone detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 12.1 applications circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 12.2 configuration example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 13 i 2 c interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 13.1 communication protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 13.1.1 data transition and change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 13.1.2 start condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 13.1.3 stop condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 13.1.4 data input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 13.1.5 device addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 13.1.6 write operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 13.1.7 read operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 14 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 15 i 2 c disabled (microless) mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 16 package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
STA321 contents doc id 15351 rev 3 5/157 17 glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 18 trademarks and other acknowledgements . . . . . . . . . . . . . . . . . . . . . 155 19 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
list of tables STA321 6/157 doc id 15351 rev 3 list of tables table 1. device summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 table 2. pin list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 table 3. power supply pin list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 table 4. absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 table 5. recommended operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 table 6. electrical specifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 table 7. oscillator specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 table 8. power-up signal description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 table 9. startup timings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 table 10. configuration example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 table 11. registers for power-down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 table 12. example configurations for power-down. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 table 13. frequently used signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 table 14. clock control registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 table 15. clock characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 table 16. register setup to provide sys_clk from mclk to pll. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 table 17. input division factor (idf) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 table 18. loop division factor (ldf). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 table 19. channel mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 table 20. eq control signals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 table 21. selecting eq curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 table 22. ram mapping for processing stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 7 table 23. modulation type with register programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 table 24. cmos bridge signal descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 table 25. power output (at 1% thd) in headphone mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 table 26. logic circuit at bridge input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 table 27. example register settings for adc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 table 28. timing parameters for master mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 7 table 29. timing parameters for slave mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 table 30. headphone 1 detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 table 31. headphone 2 detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 table 32. headphone detection configuration sequence for binary se . . . . . . . . . . . . . . . . . . . . . . . 74 table 33. headphone detection configuration sequence for binary headphone . . . . . . . . . . . . . . . . 74 table 34. register summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 table 35. bass/treble filter gains used in register addresses 0x78 - 0x7f . . . . . . . . . . . . . . . . . . . . 115 table 36. lqfp-64l epd dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 table 37. document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
STA321 list of figures doc id 15351 rev 3 7/157 list of figures figure 1. STA321 block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 figure 2. pin out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 figure 3. test circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 figure 4. oscillator configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 figure 5. equivalent circuit of crystal and external components . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 figure 6. embedded dc regulator scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 figure 7. startup sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 figure 8. hardware power-done sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 3 figure 9. hardware powerdown sequence (mild mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 figure 10. hardware power-down sequence (full mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 figure 11. clock management scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 figure 12. pll block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 figure 13. processing flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 figure 14. processing data multiplexer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 figure 15. sai_out data multiplexer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 figure 16. sample rate converter block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 figure 17. mixers block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 figure 18. eq/tone block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 figure 19. biquad coefficient selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 figure 20. biquad filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 figure 21. high-pass filter frequency response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 figure 22. deemphasis filter frequency response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 0 figure 23. frequency responses of treble control at 1-db gain steps . . . . . . . . . . . . . . . . . . . . . . . . . 41 figure 24. frequency responses of bass control at 1-db gain steps . . . . . . . . . . . . . . . . . . . . . . . . . . 41 figure 25. ffx re-mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 figure 26. writing ram location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 figure 27. writing five contiguous ram locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 figure 28. reading five contiguous ram locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 figure 29. ffx processing schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 figure 30. pwm modes for outputs a and b . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 figure 31. modulation waveforms corresponding to table 23 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 figure 32. new phase shift modulation with shift feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 figure 33. ternary modulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 figure 34. modulation for headphones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 figure 35. digital pop-free ramp implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 figure 36. cmos half bridge block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 figure 37. analog pop-free schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 figure 38. analog pop-free start-up and switch-off sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 figure 39. adc front-end block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 figure 40. typical connections for power supplies and inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 figure 41. sai typical sampling rates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 figure 42. timing diagram for master mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 figure 43. timing diagram for slave mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 figure 44. right justified serial format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 figure 45. left justified serial format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 figure 46. dsp serial format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 figure 47. i 2 s serial format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 figure 48. pcm (non-delayed) serial format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
list of figures STA321 8/157 doc id 15351 rev 3 figure 49. pcm (delayed) serial format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 figure 50. invalid input detection schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 figure 51. headphone detection circuit for single-ended configuration . . . . . . . . . . . . . . . . . . . . . . . 73 figure 52. headphone detection circuit for binary hp configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 73 figure 53. i 2 c write operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 figure 54. i 2 c read operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 figure 55. microless mode block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 figure 56. lqfp-64l epd outline drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
STA321 overview doc id 15351 rev 3 9/157 1 overview the STA321 is a single chip solution for digital audio processing applications of up to 4.0 channels. the STA321 is part of the sound terminal? family that together with the digital power stage provides full digital audio streaming to the speaker, offering cost effectiveness, low energy dissipation and sound enrichment. the STA321 input section consists of two multiplexed stereo analog inputs, a 16-bit adc and two independent digital input interfaces. the serial audio data input interface accepts all possible formats, including the popular i 2 s format. there is also a digital output interface fed by the adc or by the digitally processed signals. the device has a full assortment of digital processing features. this includes sample rate converter, pre and post mixing, up to 13 programmable 28-bit biquads (eq) per channel, bass/treble tone control and drc. the embedded headphone detector indicates when headphone jack is inserted. the STA321 provides four independent channels of ffx? output capabilities. in conjunction with a power device, it provides high-quality, high-efficiency, all digital amplification. the embedded cmos bridge supplies up to 0.5 w into an 8- ? load and 70 mw into a 16- ? load for the headphones output. figure 1. STA321 block diagram . v_bias vcm vhi vlo biclki1 lrclki1 sdatai1 inl1 inr1 hpdet sdatao1 biclko lrclko stby tm eapwm4 eapwm3 eapwm2 eapwm1 out1 out2 out3 rstn xto xti mclk clkout mute sda scl i2cdis pwm00 bias serial audio pga pga adc hp detection osc pll divider i 2 c interface interface 4-channel pre mixer pre scaler equalizer delay post mixer volume control and cmos serial audio interface ffx? modulator headphone bridge saturation 13 biquad filters src sdatao2 eaftn eatsn eapdn reg_byp biclki2 lrclki2 sdatai2 inl2 inr2 serial audio interface aclk
pin description STA321 10/157 doc id 15351 rev 3 2 pin description figure 2. pin out table 2. pin list pin pull name type description 1 - scl in (digital), schmitt tr i 2 c serial clock, sch mitt trigger input 3 - out1 out (analog) hp/line-out pwm 1 6 - out2 out (analog) hp/line-out pwm 2 9 - out3 out (analog) hp/line-out pwm 3 11 - nc - not connected 12 - pwm00 out (digital) auxiliary pwm 13 - nc - not connected 14 - hpdet in (analog) headphone detection scl vcc1 out1 gnd1 gnd2 out2 vcc2 vcc3 out3 gnd3 nc pwm00 nc hpdet gnd33 vcc33 tm vddio2 vdd_reg2 dgnd2 i2cdis aclk eapdn eatsn eaftn eapwm1 eapwm2 eapwm3 eapwm4 stby rstn inl1 biclko biclki1 biclki2 lrclko lrclki1 lrclki2 sdatao1 sdatao2 sdatai1 sdatai2 mclk xti xto nc pgnd pvdd clkout sda mute dgnd1 reg_byp vdd_reg1 vddio1 v_bias agnd vlo vhi avdd inr1 inr2 vcm inl2 STA321 17 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 64 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49
STA321 pin description doc id 15351 rev 3 11/157 17 - clkout out (digital) buffered clock output 18 - sda in/out (digital) i 2 c serial data 19 h mute in (digital) mute (active high) 21 - reg_bypass in (analog) dc regulator bypass: 0: normal operation, regulator enabled 1: regulator bypassed 24 - bias in/out (analog) adc microphone bias voltage 26 - vlo in (analog) adc low reference voltage 27 - vhi in (analog) adc high reference voltage 29 - inr1 in/out (analog) adc right channel line input1 30 - inr2 in/out (analog) adc right channel line input2 31 - vcm in/out (analog) adc common mode voltage 32 - inl2 in (analog) adc left channel line input2 or microphone input2 33 - inl1 in (analog) adc left channel line input1 or microphone input1 34 h rstn in (digital) reset: 0: reset state 1: normal operation 35 - stby in (digital) standby mode: 0: normal operation 1: power-down 36 - eapwm4 out (digital) ext ernal amplifier pwm 4b 37 - eapwm3 out (digital) ext ernal amplifier pwm 4a 38 - eapwm2 out (digital) ext ernal amplifier pwm 3b 39 - eapwm1 out (digital) ext ernal amplifier pwm 3a 40 h eaftn out (digital) external power fault signal: 0: fault 1: normal operational mode 41 - eatsn out (digital) external amplifier control: 0: active 1: 3-state 42 - eapdn out (digital) external am plifier powerdown (active low) 43 - aclk in (digital), schmitt tr reserved pin, connect to ground 44 l i2cdis in (digital) i 2 c disable: 0: i 2 c enabled 1: i 2 c disabled 48 l tm in (digital) test mode: 0: normal operation 51 - nc - not connected table 2. pin list (continued) pin pull name type description
pin description STA321 12/157 doc id 15351 rev 3 52 - xto out (digital), 1.8 v crystal output 53 - xti in (digital), 1.8 v crystal input or master clock input 54 - mclk in (digital), schmitt tr master cl ock input 3.3-v compatible, schmitt input 55 - sdatai2 in (digital) input serial audio interface data 56 - sdatai1 in (digital) input serial audio interface data 57 - sdatao2 out (digital) output serial audio interface data 58 - sdatao1 out (digital) output serial audio interface data 59 - lrclki2 in/out (digital) input serial audio interface l/r-clock 60 - lrclki1 in/out (digital) input serial audio interface l/r-clock 61 - lrclko in/out (digital) output serial audio interface l/r-clock (volume down when i2cdis=1) 62 - biclki2 in/out (digital) input serial audio interface bit clock 63 - biclki1 in/out (digital) input serial audio interface bit clock 64 - biclko in/out (digital) output serial audio interface bit clock (volume up when i2cdis=1) table 3. power supply pin list number name type description 2 vcc1 supply cmos bridge channel 1 supply 4 gnd1 ground cmos bridge channel 1 ground 5 gnd2 ground cmos bridge channel 2 ground 7 vcc2 supply cmos bridge channel 2 supply 8 vcc3 supply cmos bridge channel 3 supply 10 gnd3 ground cmos bridge channel 3 ground 15 gnd33 ground cmos bridge level shifter ground 16 vcc33 supply cmos bridge level shifter supply 20 dgnd1 ground digital ground 22 vdd_reg1 supply dc regulator unit supply 23 vddio1 supply 3.3-v io supply 25 agnd ground adc analog ground 28 avdd supply adc analog supply 45 dgnd2 ground digital ground 46 vdd_reg2 supply dc regulator unit supply 47 vddio2 supply 3.3-v io supply 49 pvdd supply pll analog supply 50 pgnd ground pll analog ground table 2. pin list (continued) pin pull name type description
STA321 electrical specifications doc id 15351 rev 3 13/157 3 electrical specifications 3.1 absolute maximum ratings note: all grounds must always be within 0.3 v of each other. 3.2 recommended operating conditions table 4. absolute maximum ratings pin name/symbol parameter negative positive unit vdd_reg1, vdd_reg2 digital supply voltage -0.3 4.0 v vddio1, vddio2 digital io supply voltage -0.3 4.0 v pvdd pll analog supply voltage -0.3 4.0 v avdd adc analog supply voltage -0.3 4.0 v vcc1, vcc2, vcc3 cmos bridge supply voltage -0.3 4.0 v vcc33 cmos bridge level shifter power supply -0.3 4.0 v t stg storage temperature -40 150 c t op operating junction temperature -20 125 c table 5. recommended operating conditions symbol parameter min typ max unit v vdd_reg1 , v vdd_reg2 digital supply voltage 2.5 3.3 3.6 v v pvdd pll analog supply voltage 2.5 3.3 3.6 v v avdd adc analog supply voltage 1.8 3.3 3.6 v v vcc1 , v vcc2 , v vcc3 cmos bridge supply voltage 1.55 - 3.3 v v vcc33 cmos bridge level shifter power supply. ensure that v vcc33 <= v vccx always 1.55 - 3.3 v v vddio1 , v vddio2 3.3-v io supply 2.7 3.3 3.6 v v ih high input voltage, 1.8-v pads 1.3 - - v high input voltage, 3.3-v pads 2.0 - - v il low input voltage, 1.8-v pads - - 0.6 v low input voltage, 3.3-v pads - - 0.8 t amb ambient temperature 0 - 70 c
electrical specifications STA321 14/157 doc id 15351 rev 3 3.3 electrical characteristics unless otherwise specif ied, the results in ta b l e 6 below are given for the operating conditions v cc =3.3 v, r l = 32 ? , f mclk = 12.288 mhz, tamb = 25 c and with the pll set to default conditions. table 6. electrical specifications symbol parameter test conditions min typ max unit general v oh high output voltage, 1.8-v pads - 1.4 - - v high output voltage, 3.3-v pads - v vddio - 0.15 -- v ol low output voltage, 1.8-v pads i ol = 2 ma --0.15 v low output voltage, 3.3-v pads i ol = 2 ma --0.15 v hys schmitt trigger hysteresis, 3.3-v io - - 0.4 - v r up pull-up resistance - - 50 - k ? r dn pull-down resistance - - 50 - k ? i stbyio standby current, pins vddio1,2 pin stby = 3.3 v clkout disabled -450-a i ddio operating current, pins vddio1,2 - - 3 - ma i stbyl0 standby current, pins vdd_reg1,2 deep power-down, v vdd_reg1,2 = 3.3 v -450-a i stbyl1 standby current, pins vdd_reg1,2 mild power-down, v vdd_reg1,2 = 3.3 v -2-ma i ddl1 operating current, pins vdd_reg1,2 f mclk = 12.288 mhz, play from sai to cmos bridge and eapwm, f adc = 48 khz on sai_out, v avdd = 3.3 v, v vdd_reg1,2 = 3.3 v -45-ma i stbypd pre-drive supply current in standby, pin vcc33 - - 4.7 - a
STA321 electrical specifications doc id 15351 rev 3 15/157 amplifier (cmos bridge) output power efficiency - - 90 - % p hpout output power in hp mode with thd = 1% 3.3-v supply r l = 32 ? -41- mw output power in hp mode with thd = 10% 3.3-v supply r l = 32 ? -53- snr signal to noise ratio 20 hz to 20 khz - 75 - db thd + n total harmonic distortion plus noise rl = 32 ? , hp mode 0 dbfs in - 0.3 - % -6 dbfs in - 0.05 - dr dynamic range a-weighted - 80 - db i stbyp current in standby, pins vccx - - 2 - a i ddp operating current, pins vccx no lc filter, no load, pwm at 50% duty-cycle -1-ma i ddpd pre-drive supply current in operation, pin vcc33 no load, pwm at 50% duty-cycle - 250 350 a t r driver rise time, pins out1-3 resistive load, see figure 3 -5-ns t f driver fall time, pins out1-3 resistive load, see figure 3 -5-ns r dson headphone output stage n/p mos on-resistance - - 500 700 m ? i och over-current limit for out1-3 to vccx short circuit - - 1.88 - a i ocl over-current limit for out1-3 to ground short circuit - - 1.72 - a pll i stdbypll pll supply current in standby - - 20 - a i ddpll pll supply current in operation - - 0.4 1.0 ma f clkin_range input clock frequency range - 2.048 - 49.152 mhz duty clkin input clock duty cycle - 40 - 60 % t clkin_rf input clock rise/fall time - - - 0.2 ns f f_int pfd input clock frequency pll_fr_ctrl = 1 2.048 - 12.288 mhz f vco_range clock out range - 65.536 - 98.304 mhz duty vco clock out duty cycle - 35 - 65 % t lock lock time - - - 200 s table 6. electrical specifications (continued) symbol parameter test conditions min typ max unit
electrical specifications STA321 16/157 doc id 15351 rev 3 adc i dda supply current in operating mode v avdd = 3.3v - 10 15 ma i stdbya avdd supply current in standby v avdd = 3.3v - 2 - a dr dynamic range 1 khz, a-weigthed v avdd = 3.3 v -90-db snr adc signal to noise ratio 1 khz, a-weighted v avdd = 3.3 v -92-db thd adc total harmonic distortion 1 khz, -1db v avdd = 3.3 v -85-db ct channel cross talk v avdd = 3.3 v - 80 - db - group delay fs mode (f s = 32 khz) - 0.4 - ms fs_by_2 mode (f s = 16 khz) - 0.7 - fs_by_4 mode (f s = 8 khz) - 1.4 - - pass band - - 0.4535 - fs - pass band ripple fs mode (f s = 44.1 khz) - 0.08 - db fs_by_2 mode (f s = 22.05 khz) -0.08- fs_by_4 mode (f s = 11.025 khz) -0.08- - stop band attenuation fs mode (f s = 44.1 khz) - 45 - db fs_by_2 mode (f s = 22.05 khz) -45- fs_by_4 mode (f s = 11.025 khz) -45- - frequency response -3 db - 7 - hz -0.08 db - 50 - hz - linear phase deviation at 20 hz - 19.35 - deg - pass-band ripple - - 0.08 - db headphone detector threshold limits e_hp1 hp low threshold - - 2.34 - v hp high threshold - - 2.52 - e_hp2 hp low threshold - - 0.7 - v hp high threshold - - 0.9 - table 6. electrical specifications (continued) symbol parameter test conditions min typ max unit
STA321 electrical specifications doc id 15351 rev 3 17/157 figure 3. test circuit 3.4 embedded crystal oscillator figure 4. oscillator configuration r = 32 ? STA321 to p l l enable from register bit misc[7] xti xto
electrical specifications STA321 18/157 doc id 15351 rev 3 the STA321 has an inte grated oscillator between pins xti and xto. the architecture is a single-stage oscillator with an invert er working as an amplifier. the oscillator stage is biased by an internal resistor (of about 500 k ? ), and requires an external pi network consisting of a crystal and two capacitors as shown in figure 4 below. an enable feature is provided in bit 7 of register misc (addre ss 0xc8) to stop the oscillator and thereby to reduce power consumption. not all crystals operate satisfactorily with the ty pe of oscillator used in the STA321. to find out if a crystal is suitable for this device the following transconductance formula must be evaluated and compared to th e critical transconductance for the embedded oscillator: gm = rm * 2 * (c + 2 * co) 2 < gm critical / 3 where is the crystal operating frequency, c = ca = cb, co and rm are shown in figure 5 and gm critical is given in ta bl e 7 . figure 5. equivalent circuit of crystal and external components table 7. oscillator specifications symbol parameter min typ max unit i osc oscillator power consumption with crystal connected (1) 1. if no crystal is connected then the power consumption could be much higher. --215a duty osc duty cycle 46.9 47.8% 48.9 % t up startup time - 15 * x- s (2) 2. x is the time constant of the crystal and ex ternal components; a typical value is 44 s. gm critical oscillator transconductance 1060 - - a/v
STA321 electrical specifications doc id 15351 rev 3 19/157 3.5 embedded dc regulator the power supply to the digital STA321 core and pll is provided via embedded linear dc regulators as shown below in figure 6 . when pin reg_bypass is ti ed to ground, the dc regulators are active so that a voltage in the range 2.5 v to 3.6 v applied to pins vdd_regx or pvdd provides a regulated internal voltage to the core and the pll. the voltages vddi and vddipll range from 1.55 v to 1.95 v depending on operating conditions. figure 6. embedded dc regulator scheme if the application allows mu ltiple supplies or the power supply requirements are a fundamental constraint, pin reg_bypass can be tied high and a 1.8 v external supply can be applied directly to pins vdd_regx and pvdd. in this case the operating range for such an external supply is 1.55 v to 1.95 v. embedded dc regulators imply also static power consumption that must be take into account when the power-down modes are active. the STA321 provides a deep powerdown mode where also the regulators are active but in a low power consumption mode (see section 4.3.2 on page 27 ). core pll dc dc dc STA321 vdd_reg1 vdd_reg2 pvdd vddi vddi vddipll reg_bypass
power-up and power-down sequences STA321 20/157 doc id 15351 rev 3 4 power-up and power-down sequences 4.1 device power-up after providing the power supply to the device, it is necessary to wait until the dc regulator pwup time has elapsed before the device can be set up and used for normal operations. (see figure 7 ). figure 7. startup sequence table 8. power-up signal description signal/pin type description vddio supply power supply of the digital pads (= vddio1,2) vdd_reg supply power supply of th e system core (= vdd_reg1,2) pvdd supply power supply of the pll stby in (digital) external standby signal provided by the user rstn in (digital) external reset signal provided by the user pwdn internal power-down of the dc regulator cell, controlled by the core a. ok internal dc regulator status, when active the 1.8 v is provided to the core i 2 c read in (i 2 c) configuration commands coming to the i 2 c interface i 2 c clock internal i 2 c peripheral clock xti/mclk in (digital) clock input source dc reg. pwup time device in reset mode vdd ramp rstn (active l) stby (active h) dc reg. pwdn (active high) (active high) dc reg. a. ok i2c writings i2c cl k xti /mclk vddio vddreg pvdd 3v3 2v2 user configuration via i 2 c vvddio vvdd_reg vpvdd stby (active h) rstn (active l) pwdn (active h) a.ok (active h) i 2 c read i 2 c clock xti / mclk
STA321 power-up and power-down sequences doc id 15351 rev 3 21/157 4.2 software power-down mode the software power-down is obtained by configuring the appropriate i 2 c registers. in order to obtain flexibility every peripheral has its indepen dent, standby signal and several gating clock cells are available. obviously, the i 2 c peripheral can not be turned off in this mode, otherwise the device can recover from the power-down state only via the reset pin. in the table below ea is embedded amplifier and cb is cmos bridge. for complete information this table must be used in conjunction with chapter 14: register description on page 77 . table 9. startup timings parameter descripti on min typ max unit dc reg. power-up time start up time of the dc regulator after connecting the power - - 300 s device in reset mode must be greater than (vdd time + dc reg. power-up time) ---s table 10. configuration example register address value description 0xc9 0x00 remove pll bypass 0xca 0x00 headphone detection polarity = 0 0xb8 0x4a configure sai output: sai _out1 = sai_in1, sai_out2 = sai_in2 0xb7 0x38 src source select: src1 = adc, src2 = adc 0xc6 0x02 adc clock on 0xb2 0xf3 i 2 s configuration 0xc8 0x21 core clock on, sai/adc audio set to 32 khz - 48 khz range 0xb2 0xd3 sai_out: output enabled 0xa0 0x00 soft volume removed 0x00 0x00 remove bridge 3-state table 11. registers for power-down description register bit address put ea in standby ffxcfg1 [7] 0x00 on page 81 put cb in standby ffxcfg1 [6] 0x00 put pll in standby pllpfe [5] 0xc4 on page 132 put adc in standby adccfg0 [3] 0xc6 on page 133 turn core clock off misc [0] 0xc8 on page 135 turn adc clock off adccfg0 [1] 0xc6
power-up and power-down sequences STA321 22/157 doc id 15351 rev 3 4.2.1 configuration example this is an example of the register setup for power-down clock. it is assumed that every peripheral is already configured and working correctly. there are other configuration examples to help you get started please refer to other chapters and also to chapter 14: register description on page 77 in order to get all the necessary and complementary details. turn off all the peripherals. note: the mclk (or xti) must be used as system clock (sys_clk) before setting the pll to standby. turn src clock off ckocfg [3] 0xc7 on page 134 turn proc clock off ckocfg [2] 0xc7 turn ffx clock off ckocfg [4] 0xc7 table 11. registers for power-down (continued) description register bit address table 12. example configurations for power-down register bit address value description ea_stby cb_stby 0x00 on page 81 0xc0 set the embedded power amplifier and cmos bridge to power-down clk_ffx_on 0xc7 on page 134 0x0c turn off the ffx modulator clock adc_stby 0xc6 on page 133 0x09 set the adc into standby mode clk_adc_on 0xc6 0x80 turn the adc clock off clk_proc_on 0xc7 0x08 turn the processing clock off clk_src_on 0xc7 0x00 turn the sample rate converter clock to off pll_byp_unl 0xc4 on page 132 0x80 bypass the pll clock and use mclk (or xti) as source clock when the pll is not locked (a safety operational mode) pll_pwdn 0xc4 0xa0 put the pll in standby clk_core_on 0xc8 on page 135 0x00 turning off the core clock
STA321 power-up and power-down sequences doc id 15351 rev 3 23/157 4.3 hardware power-down mode the hardware power-down is obtained by asserting pin stby to high. there are two power-down options available, namely mild mode and full (or deep) mode, that could be selected using the dc_stby_en signal in register stby_modes figure 8 summarizes the main power-down sequence. ?power on? is the normal operating status where all the startup procedures have already been executed. the rectangular boxes indicate the steps to be done by the user whilst the rounded boxes indicate the steps done by the device. figure 8. hardware power-done sequence power-down mode yes no cmp_en_n = 1 ? comp cell pwdn no dc_stby_en = 1 ? yes dc reg. stby embedded amp. cmos bridge powerdown power on pin stby <= 1' clk _ i2c off clk core off clk _ adc off pll power down i 2 c programming register stby_modes bits: cmp_en_n dc_stby_en
power-up and power-down sequences STA321 24/157 doc id 15351 rev 3 table 13. frequently used signals name description stby input pin stby on page 11 pwdn dc regulator internal a. ok dc regulator internal cmp_en_n bit 1, register stby_modes on page 139 ea_stby cb_stby bits 7:6, register ffxcfg1 on page 81 ea/cb volume internal pll_unlock bit 7, register pllst on page 132 pll_pwdn bit 5, register pllpfe on page 132 clk_proc_on bit 2, register ckocfg on page 134 clk_proc processing clock clk_ffx_on bit 4, register ckocfg on page 134 clk_ffx ffx clock clk_adc_on bit 1, register adccfg0 on page 133 clk_adc adc clock clk_src_on bit 3, register ckocfg on page 134 clk_src src clock cmp_en_n bit 1, register stby_modes on page 139 dc_stby_en bit 0, register stby_modes on page 139 ffx_ulck_pll bits 4:3, register ffxcfg1 on page 81
STA321 power-up and power-down sequences doc id 15351 rev 3 25/157 4.3.1 mild power-down in this case, the device is put into a mild power-down mode. all the peripherals are set to standby and their clocks turned off. the i 2 c configuration is not required as the defa ult values of the registers are sufficient. z initial conditions: ffx_ulck_pll = 10 cmp_en_n = 0 dc_stby_en = 0 z going into power-down: after the assertion of the pin stby, the following actions are taken by the device: 1. embedded amplifier (ea) and cmos bridge (cb) volume are set to mute (the length of this step changes according to the fade-out ramp configuration). 2. ea and cb are put into power-down. after the previous operation is completed: 3. all peripherals are turned off (regardless the register settings). 4. the pll clock is bypassed, the system clock (sys_clk in figure 11 on page 29 ) is xti. 5. all clocks are shut down. z returning to normal mode: after the release of the pin stby, the power-up procedure takes place: 1. all clocks are turned on. 2. all peripherals are restored to their previous status (based on the last register settings). 3. if the pll clock was the system clock it will be selected again af ter the locking time. 4. the ea and the cb execute the fade-in procedure before becoming ready to be used (the length of this step changes accord ing to the fade-in ramp configuration).
power-up and power-down sequences STA321 26/157 doc id 15351 rev 3 figure 9. hardware powerdown sequence (mild mode) pll locking time e.a fade in e.a fade out bridge fade out bridge fade in stby (active h) (active high) dc reg. a. ok (active high) dc reg. pwdn (active high) comp cell pwdn cb is in pwdn pll locked (active high) pll_pwdn (active high) i2c [core_clk_on] ea is in pwdn i2c [clk_adc_on] clk_i2c i2c [clk_proc_on] clk_proc_clk i2c [clk_ffx_on] clk_ffx_clk clk_adc_clk i2c [clk_src_on] clk_src_clk ea volume cb volume operational volume operational volume mute o.v. o.v. mute
STA321 power-up and power-down sequences doc id 15351 rev 3 27/157 4.3.2 full power-down in this case the device is put into a full power-down mode. this implies lower power consumption than the mild mode, but has a drawback in that it takes longer to execute. z initial conditions ffx_ulck_pll = 10 cmp_en_n = 1 dc_stby_en = 1 z going into power-down: this mode differs from the previous one by an additional step at the end of the power- down procedure and at the beginning of the power-up: 1. embedded amplifier (ea) and cmos bridge (cb) volume are set to mute (the length of this step changes according to the fade-out ramp configuration). 2. ea and cb are put into power-down. after the acknowledge signals (ea is in power-down and cb is in power-down) are received: 3. all peripherals are turned off (regardless the register settings). 4. pll clock is bypassed, the system clock (sys_clk in figure 11 on page 29 ) is xti. 5. all clocks are shut down. 6. dc regulator is put into standby mode. after this point the device is in a very low power consumption mode. z returning to normal mode: after the release of pin stby, the power-up procedure will take place: 1. dc regulator is set to operational mode after the acknowledge signal (dcaok) from the dc regulator is received: 2. all clocks are turned on. 3. all peripherals are restored to the status based on their relative register settings. 4. if the pll clock was the system clock it is selected again after the locking time. 5. the ea and the cb execute the fade-in procedure before being ready to be used (the length of this step changes according to the fade-in ramp configuration).
power-up and power-down sequences STA321 28/157 doc id 15351 rev 3 figure 10. hardware power-down sequence (full mode) pll locking time e.a fade in e.a fade out bridge fade out bridge fade in dc- tup dc - td own stby (active h) cb is in pwdn pll locked (active high) pll_pwdn (active high) (active high) dc reg. a. ok (active high) comp cell pwdn i2c [core_clk_on] ea is in pwdn i2c [clk_adc_on] clk_i2c i2c [clk_proc_on] clk_proc_clk i2c [clk_ffx_on] clk_ffx_clk clk_adc_clk i2c [clk_src_on] clk_src_clk ea volume cb volume (active high) dc reg. pwdn operational volume operational volume mute o.v. o.v. mute
STA321 clock management doc id 15351 rev 3 29/157 5 clock management figure 11. clock management scheme table 14. clock control registers register name address pllb on page 136 0xc9 adccfg0 on page 133 0xc6 ckocfg on page 134 0xc7 0 1 or pll 0 1 1/2 1/2 1/2 0 1 0 1 1 0 1/2 1/8 1/8 1/4 clk_core_on misc[0] clk_ffx_on ckocfg[4] clk_src_on ckocfg[3] clk_proc_on ckocfg[2] clk_adc_on adccfg[1] pll_clk_in_i biclk2pll pllpfe[6] clkout_sel ckocfg[6:5] sys_clk clock management biclki1 mclk xti 1/2 sai_out1 sai_in1 sai_out2 ffx sai_in2 clkout clk_i2c clk_ffx clk_src clk_proc clk_adc clk_adc_in adc pllb[3] p2s1_clksel pllb[1] p2s2_clksel pllb[7] clk_proc 11 10 01 00 1/4 pllb[5] adc_clksel
clock management STA321 30/157 doc id 15351 rev 3 5.1 system clock figure 11 above shows the STA321 clock management scheme with all the major clocks. as can be seen, the system clock ( sys_clk) is selected from on e of three sources by using register pllb on page 136 : z an external clock biclki1 z (default) an external clock xti or mclk (the unused one must, however, be set to 0) z the internal pll. if the pll is used there are some design constraints: z pll_clk_in_i must be in the range: 2.048 mhz to 49.152 mhz z pll_clk_out must be in the range: 65.536 mhz to 98.304 mhz. the sys_clk is routed to the peripherals through the clock manager section. 5.1.1 configuration example this is an example of the pll register setup. it is assumed that every peripheral is already configured and working correctly. there are other configuration examples to help you get started please refer to other chapters and also to chapter 14: register description on page 77 in order to get all the necessary and complementary details. starting with mclk as system clock switching to pll as source table 15. clock characteristics symbol parameter min typ max unit f mclk_range input clock frequency range 2.048 - 49.152 mhz duty mclk input clock duty cycle 40 - 60 % t mclk_rf input clock rise/fall time - - 0.2 ns f xti_range input clock frequency range 2.048 - 49.152 mhz duty xti input clock duty cycle 40 - 60 % t xti_rf input clock rise/fall time - - 0.2 ns f biclk1_range input clock frequency range 2.048 - 49.152 mhz duty biclk1 input clock duty cycle 40 - 60 % t biclk1_rf input clock rise/fall time - - 0.2 ns f clkout_range output clock frequency range - - 49.152 mhz table 16. register setup to provide sys_clk from mclk to pll register address value description pllpfe 0xc4 0x80 safety operational mode: autom atic use of mclk (or xti) as system clock if the pll is not locked pllb 0xc9 0x00 remove the pll bypass and use its clock as system
STA321 clock management doc id 15351 rev 3 31/157 5.2 peripheral clock manager this block manages the clocks of the core processing peripherals adc, ffx, proc (including memories and sai interfaces) and src. a clock divider (by 2) is attached before every block except the ffx. each block is attached to a global gating cell and to a dedicated one. this allows a flexible power-consumption management because it is possible to turn off either the whole processing chain or just a single block. the only exception is the i 2 c peripheral clock which is disabled only when the device is in hardware power-down mode. in all the other cases this clock remains active. 5.3 fractional pll the pll specifications are given in table 6 on page 14 . figure 12. pll block diagram 5.3.1 pll block description phase/frequency detector (pfd) this block compares the phase difference between the corresponding rising edges of the f_int and the clock coming from the loop frequency divider. it generates voltage pulses with widths proportional to the input phase error. charge pump and loop filter (lpf/cpump) this block converts the voltage pulses from the phase/frequency detector to current pulses which charge the loop filter and generate the control voltage for the voltage controlled oscillator (vco). lock detect buffer loop freq. divider ldf pfd vco lpf cpump idf input freq. divider fractional controlle r dither disable frac input clkin pll_pwdn lockp ndiv pllcfg0(5-4) pllcfg1(7-0) pllcfg2(7-0) pll_strb pll_strbbyp pll_fr_ctrl pllcfg3(5-0) pllcfg3(7) pllcfg3(6) pllcfg0(6) pllcfg0(3-0) idf fvco pll_clk_in f_int pll_clk_in clkin pllcfg0[3:0] idf pll_pwdn pllcfg3[7] pll_strb pll_strbbyp pll_fr_ctrl pllcfg3[6] pllcfg0[6] lockp fvco dither disable pllcfg0[5:4] frac input ndiv pllcfg2[7:0] pllcfg1[7:0] pllcfg3[5:0]
clock management STA321 32/157 doc id 15351 rev 3 voltage controlled oscillator (vco) this is the oscillator inside the pll, which produc es a frequency, f vco , on output fvco proportional to the input control voltage. input frequency divider (idf) this frequency divider divides th e pll input clock clkin by the input division factor (idf) to generate the pfd input frequency. idf is programmed in register pllcfg0[3:0]. loop frequency divider (ldf) this frequency divider is present within the pll for dividing the vco output by the loop division factor (ldf). ldf is programmed in register bits pllcfg3[5:0]. lock circuit the output of this block, signal lockp, is asserted high when the pll enters the state of coarse lock in which the output frequency is 10% of the desired frequency. lockp is refreshed every 32 cycles of f_int. the status bit pll_unlock is in register pllst on page 132 . 5.3.2 output fr equency computation the input clock frequency of the phase/frequency detector (pfd) is f f_int = clkin / idf the vco frequency depends on the value of register bit pllcfg0.pll_fr_ctrl such that when pll_fr_ctrl = 1 f vco = f f_int * (ldf + frac / 2 16 + 1 / 2 17 ) and when pll_fr_ctrl = 0 f vco = f f_int * ldf notes: 1. when dither is disabled (pll_ddis = 1), the factor 1 / 2 17 is not used in the multiplication. 2. there are some limits to the input and output frequencies as given in ta b l e 1 7 and ta bl e 1 8 when selecting the values for idf, ldf, and frac. 3. the ldf values of 5, 6 and 7 cannot be used when fractional synthesis mode is on, that is, when pll_fr_ctrl = 1. 4. the fractional control bits (frac_input) must be set to the required values before activating the fractional synthesis mode. table 17. input division factor (idf) idf[3] idf[2] idf[1] idf[0] inpu t division fa ctor (idf) 00001 00011 00102 ?????
STA321 clock management doc id 15351 rev 3 33/157 111014 111115 table 18. loop division factor (ldf) ndiv[5] ndiv[4] ndiv[3] ndiv[ 2] ndiv[1] ndiv[0] loop di vision factor (ldf) 0000xxna 000100na 0001015 (1) 1. the ldf values of 5, 6 and 7 cannot be used when fractional synthesis mode is on (pll_fr_ctrl = 1) 0001106 (see note 3) 0001117 (see note 3) 0010008 ??????? 11011054 11011155 111xxxna table 17. input division factor (idf) (continued) idf[3] idf[2] idf[1] idf[0] inpu t division fa ctor (idf)
digital processing stage STA321 34/157 doc id 15351 rev 3 6 digital processing stage 6.1 signal processing flow the STA321 provides 4 channels of audio sign al processing. the block diagram is shown in the following figure. figure 13. processing flow left and right channels coming from the two serial audio interfaces and adc (left and right channels) are fed into the selection multiplexer (controlled by register srcinsel on page 128 ), so that each channel can be connected to any desired processing chain. the four channels are then sample rate converted to the fixed internal sampling rate. pre mix, eq/tone processing, programmable delay, post mix, and volume/limiter make up the STA321 signal processing chain. figure 14. processing data multiplexer bq0 bq12 bq12 bq12 bq12 eq - tone control 13 biquads kz -1 kz -1 kz -1 kz -1 delay - g2 - g0 - g1 - g3 vol 3 vol 2 vol 1 vol 0 master volume volume control limite r rate converte r sample ffx modulator bq0 bq0 bq0 pre scaler post mix pre mix processing data mux 32 sai_in1 00 16 adc 01 32 sai_in2 10 24 srcinsel[7:6] 24 src1 ch0_in ch1_in proc ch0 proc ch1 proc ch2 proc ch3 24 24 24 32 sai_in1 00 16 adc 01 32 sai_in2 10 20 24 src2 ch2_in ch3_in ch0_out ch1_out ch2_out ch3_out 20 20 20 srcinsel[5:4] ffx 2-channel signal 1-channel signal to s a i _ o u t multiplexers processing
STA321 digital processing stage doc id 15351 rev 3 35/157 figure 15. sai_out data multiplexer 6.2 sampling rate converter the sample rate converter (src) re samples the input data source in order to send to the processing block an audio stream always with a fixed frequency: sampling frequency, f s = f sys_clk / 1024 where f sys_clk is the system clock frequency. in all the examples given here, f s = 96 khz. figure 16. sample rate converter block diagram the selection between x2 fir interpolation and direct input data is made automatically by the threshold selector block. if the input sampling frequency (measured by the drll) is higher than the src threshold (that is, more than 81 khz) the direct connection is selected (first filter bypassed), otherwise the first x2 filter is added to the data path. a 3-khz hysteresis is fixed around the src th reshold nominal value in order to prevent unstable oscillations. 16 adc (l/r) 000 sai_out1 32 sai_in1 (l/r) 001 32 sai_in2 (l/r) 010 24 src1 (l/r) 011 24 src2 (l/r) 100 24 proc (ch0/ch1) 101 24 proc (ch2/ch3) else p2sdata[5:3] 16 adc (l/r) 000 sai_out2 2-channel signal 1-channel signal 32 sai_in1 (l/r) 001 32 sai_in2 (l/r) 010 24 src1 (l/r) 011 24 src2 (l/r) 100 24 proc (ch0/ch1) 101 24 proc (ch2/ch3) else p2sdata[2:0] interpolation fir x2 threshold selector drll interpolation fir x2 precomp. fir sync 6 async. data input lrck_in ratio data output
digital processing stage STA321 36/157 doc id 15351 rev 3 6.3 pre-eq mix 1 and post-eq mix the four-channel data, received from the sample rate converters, is sent to mix1 block to produce the four mixed-channel data for processing. all this data can be mapped to any internal processing channel through the appropriate configuration of the ram memory locations. the post-eq mixer acts in a similar way for the output channels from the processing and directed to the ffx. it is placed after the delay block which provides a full 4-channel input mix on every channel. figure 17. mixers block diagram table 19. channel mapping function channel memory location (ram) pre mixer ch0 from 0x00 ch1 from 0x04 ch2 from 0x08 ch3 from 0x0c post mixer ch0 from 0x118 ch1 from 0x11c ch2 from 0x120 ch3 from 0x124 g0_3 g0_2 g0_1 g0_0 ch0_out ch1_out ch3_out ch2_out ch0_in ch1_in ch2_in ch3_in ch0_in ch1_in ch2_in ch3_in ch0_in ch1_in ch2 _ in ch3_in ch0_in ch1_in ch2_in ch3_in pos: 0x119 pos: 0x11a pos: 0x11b pos: 0x11c pos: 0x11d pos: 0x11e pos: 0x11ff pos: 0x120 pos: 0x121 pos: 0x122 pos: 0x123 pos: 0x124 pos: 0x125 pos: 0x126 pos: 0x127 pre: 0x01 pre: 0x02 pre: 0x03 pre: 0x04 pre: 0x05 pre: 0x06 pre: 0x0c pre: 0x08 pre: 0x09 pre: 0x0a pre: 0x0b pre: 0x0d pre: 0x0e pre: 0x07 pre: 0x0f pre: 0x00 pos: 0x118 g1_0 g1_1 g1_2 g1_3 g2_0 g2_1 g2_2 g2_3 g3_0 g3_1 g3_2 g3_3 + ++ +
STA321 digital processing stage doc id 15351 rev 3 37/157 6.3.1 presets by default, each mixer output is connected to its corresponding input without any attenuation and without any mixing with the other channels: ch0_out = ch0_in, ch1_out = ch1_in, ch2_out = ch2_in, ch3_out = ch3_in. 6.4 pre scaler the pre scale block, which precedes the first biquad, could be used to attenuate the input signal when the filters of the processing chai n have a gain that could reach the clamping value. each channel has a dedicated 24-bit signed multiplier in the range -1 (0x800000) to almost +1 (0x7fffff). 6.4.1 presets by default, all pre-scale factors are set to 0x7fffff 6.5 equalization, tone control and effects figure 18. eq/tone block diagram four channels of input data are fed to the eq processing block which provides 13 user-programmable biquad filters per channel as shown in figure 18 above. a description of the biquad programming is given in section 6.14 on page 44 . some filter coefficients are pre-programmed and stored in the non-volatile memory in order to supply particular eq effects (see figure 19 and table 20 on page 38 ). the selection of ram, rom bass/treble or rom effects is made using registers effs_en_chn on page 109 for the effects and bass_seln_r on page 111 and treb_seln_r on page 113 for the bass/treble. each biquad can be configured independently. biquad 00 biquad 07 reserved ram from prescaler biquad 09 ram deemph. biquad 10 ram reserved ram treble ram bass biquad 08 high pass ram to delay stage biquad 11 biquad 12 reserved ram effects_en[0] effects_en[1] reserved treb_sel bass_sel reserved reserved
digital processing stage STA321 38/157 doc id 15351 rev 3 figure 19. biquad coefficient selection table 20. eq control signals signal name description channel register addr effects_en[1] 1: enable deemphasysa filter ch0 0x71 ch1 0x73 ch2 0x73 ch3 0x77 bass_sel[5] 1: enable bass tone control ch0 0x78 ch1 0x79 ch2 0x7a ch3 0x7b treb_sel[5] 1: enable treble tone control ch0 0x7c ch1 0x7d ch2 0x7e ch3 0x7f ram rom - effects rom - bass coefficients romchxx & bass_selxx biquads (11) ram rom - effects coefficients biquads (00-10) romchxx_ ram rom - effects coefficients romchxx & treb_selxx biquads (12) rom - trebl.
STA321 digital processing stage doc id 15351 rev 3 39/157 6.6 biquads the biquads are based on the following equation and is shown diagramatically in figure 20 . y[n] = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] - a1 * y[n-1] - a2 * y[n-2] where y[n] represents the output and x[n] represents the input. fractional multipliers are 24-bit signed with coefficient values in the range -1 (0xffffff) to +1 (0x7fffff). figure 20. biquad filter 6.6.1 presets by default all the biquads values in ram are set to give a bypass function; in actual fact, the signal passes through unchanged. the coefficients for this are: a1 / 2 = 0, a2 / 2 = 0, b0 / 2 = 0.5 (0x400000), b1 / 2 = 0, b2 / 2 = 0. 6.7 high-pass filter the standard high-pass filter is provided by the STA321 figure 21. high-pass filter frequency response 2 b0/2 + b1/2 2 z -1 + b2 z -1 + 2 -a1/2 -a2 z -1 z -1 10 0 10 1 10 2 10 3 10 4 10 5 ?30 ?25 ?20 ?15 ?10 ?5 0 freq. [hz] gain [db] high pass filter
digital processing stage STA321 40/157 doc id 15351 rev 3 6.8 deemphasis filter the standard deemphasis filter is provided by the STA321. figure 22. deemphasis filter frequency response
STA321 digital processing stage doc id 15351 rev 3 41/157 6.9 bass and treble control preset values for the 11th and 12th biquads of every channel are stored in rom in order to achieve a bass and treble tone control. they are channel independent and have 24 curves ranging from -12 to +12 db gain with 1 db steps. their selection (a nd enable) is via register s bass_selx_r and treb_selx_r where x is the number of the channel to be equalized. the eq curve and filter cut-off frequencies are shown in figure 23 and figure 24 . with a sampling frequency of 96 khz (inside the processing block), the cut-off frequencies are 3 khz for treble curves and 150 hz for bass curves. figure 23. frequency responses of treble control at 1-db gain steps figure 24. frequency responses of bass control at 1-db gain steps
digital processing stage STA321 42/157 doc id 15351 rev 3 6.9.1 configuration example this is an example of the tone control register setup. it is assumed that every peripheral is already configured and working correctly. ta bl e 2 1 gives the register values to obtain +12 db of bass on all channels and -10 db of treble on channels 0 and 1. 6.10 programmable delay every channel, just after the biquads stage, is connected to a dedicated delay block. the length of the delay is stored in ram at location 0x128 and can vary from 0 to 35 samples. the corresponding time delay dep ends on the processing sampling frequency. 6.10.1 presets the delay of every channel is set to 0. 6.11 volume and mute control the STA321 provides a flexible volume and mute control stage. using the registers volch0 to volch3 on page 122 it is possible to set the volume for each channel individually from +36 db to -105 db with 0.5-db steps. there is a master volume control, register mvol on page 120 , as well. the master volume adds an offset to all the individual volume settings. the mute function offers the po ssibility to turn off the sound by reducing the volume setting to -127.5 db. it could be activated in two ways: z register ffxcfg0 on page 82 provides a dedicated mute control for each channel. z pin mute, driven by an external signal, puts all four channels into mute mode. register volcfg on page 120 provides some flexibility to set how the mute and volume change procedures are applied. if bit svol_onx is activated the volume of channel x is changed gradually (soft volume or soft mute); using a ramp it starts from the current value and goes down to the target value or to -127.5 db for mute. the slope of the ramp is set with with the value tim_svol which represents how many samples are needed to achieve a 0.5-db step. t step = 2 tim_svol / f s table 21. selecting eq curves register - address programmed value description bass_sel0_r 0x38 ch0 +12 db bass bass_sel1_r 0x38 ch1 +12 db bass bass_sel2_r 0x38 ch2 +12 db bass bass_sel3_r 0x38 ch3 +12 db bass treb_sel0_r 0x22 ch0 -10 db treble treb_sel1_r 0xx22 ch1 - 10 db treble
STA321 digital processing stage doc id 15351 rev 3 43/157 the ramp procedure ends when the target volume or mute level is reached. the time for the volume change is calculated as: t change = (volume current - volume ta r g e t ) / 0.5 * t step if svol_onx is not used, the volume and mute are set instantaneously. the STA321 also has the possibility to put the ffx into mute in the ev ent of bad input data using register ffxcfg0. if bit bad_cks_m is set to 1 the ffx is muted when biclk and lrclk do not meet the specifications. if mis_bick_m is set to 1 the ffx is muted when biclk is missing. the mute can be applied gradually or abruptly via bit bad_in_m. 6.12 limiter (clamping) the saturation stage provides an individual or a global limitation on the output signal amplitude such that if the signal is above the limiting value then it is truncated (clamped). a 23-bit saturation value made up using registers satchxcfg1, satchxcfg2 and satchxcfg3 can be set for each channel x. however, if bit 7 of register satch0cfg1 on page 116 is set to 1, all the channels take the saturation value of channel 0 and ignore the individual settings. 6.13 ffx channel re-mapping figure 25. ffx re-mapping the channels are re-mapped through registers pwmmap1 , pwmmap2 and pwmmap3 on page 86 . the default configuration routes the channels directly to their respective cb/ea signals: pwm_1a -> cb_pwm_1 pwm_1b -> cb_pwm_2 pwm_2a -> cb_pwm_3 pwm_2b -> pwm_00 (pwm00) pwm_3a -> ea_pwm_1 (eapwm1) pwm_3b -> ea_pwm_2 (eapwm2) pwm_4a -> ea_pwm_3 (eapwm3) pwm_4b -> ea_pwm_4 (eapwm4) pwm_2a pwm_2b pwm_3a pwm_3b pwm_4a pwm_4b ffx ch2 ffx ch3 ffx ch4 channle 0 channel 1 channel 2 channel 3 pwm_1a pwm_1b cb_pwm_1 cb_pwm_2 cb_pwm_3 pwm_00 cmos bridge ea_pwm_1a ea_pwm_1b ea_pwm_2a ea_pwm_2b processing block ffx ch1 ffx block channel re-map cb1_map cb2_map cb3_map pwm00_map ea1b_map ea2a_map ea1a_map ea2b_map out1 out2 out3
digital processing stage STA321 44/157 doc id 15351 rev 3 6.14 memory programming table 22 on page 47 shows the ram mapping for the programmable functions in the signal processing stage. changing or reading this data is done through the i 2 c interface in either single-word mode or in multi-word mode. register procctrl on page 107 sets the desired mode and whether to read or write: z 1-word mode: this is for write only; the address of the memory location must be specified in registers start_addr2 and start_addr1 on page 108 and the value of the parameter must be written into registers i2cb0_top , i2cb0_mid and i2cb0_bot on page 102 . z 5-word mode: in this case it is possible to write/read 5 contiguous locations. only the address of the first one must be specified in registers start_add1-2, all the others are generated automatically. the values of the parameters must be placed in (or taken from) registers i2cb0_top -bot, i2cb1_top -bot, i2cb2_top -bot, i2ca1_top -bot, i2ca2_top -bot. the 5-word mode is particular useful during the biquad programming when a set of five coefficients needs to be updated. not only is it more efficient to change all of them at the same time but it avoids the generation of possible unpleasant acoustical side-effects. the following sections explain how to implement this programming using the i 2 c interface. 6.14.1 writing one coeffi cient/location to ram z write ram address to registers start_addr2 and start_addr1 z (b0) write 8 msbs of coefficient in register i2cb0_top z write 8 middle bits of coefficient in register i2cb0_mid z write 8 lsbs of coefficient in register i2cb0_bot z write 1 to bit w1 in register procctrl . figure 26. writing ram location start_addr[8:0] write address to of coefficient write middle 8 bits of coefficient write top 8 bits of coefficient write bottom 8 bits in proc_ctrl write 1 to bit w1 0x60 = 0x01 0x61 = address[8] 0x62 = address[7:0] 0x51 = top_val 0x52 = mid_val 0x53 = bot_val
STA321 digital processing stage doc id 15351 rev 3 45/157 6.14.2 writing a set of five coefficients/l ocations to ram z write ram address of b0 to registers start_addr2 and start_addr1 z (b0) write 8 msbs of coefficient in register i2cb0_top z write 8 middle bits of coefficient in register i2cb0_mid z write 8 lsbs of coefficient in register i2cb0_bot z (b1) write 8 msbs of coefficient in register i2cb1_top z write 8 middle bits of coefficient in register i2cb1_mid z write 8 lsbs of coefficient in register i2cb1_bot z (b2) write 8 msbs of coefficient in register i2cb2_top z write 8 middle bits of coefficient in register i2cb2_mid z write 8 lsbs of coefficient in register i2cb2_bot z (a1) write 8 msbs of coefficient in register i2ca1_top z write 8 middle bits of coefficient in register i2ca1_mid z write 8 lsbs of coefficient in register i2ca1_bot z (a2) write 8 msbs of coefficient in register i2ca2_top z write 8 middle bits of coefficient in register i2ca2_mid z write 8 lsbs of coefficient in register i2ca2_bot z write 1 to bit wa in register procctrl . figure 27. writing five contiguous ram locations start_addr[8:0] write address to of coefficient write top 8 bits of coefficient write middle 8 bits of coefficient write bottom 8 bits 0x61 = address[8] 0x62 = address[7:0] repeat for all 5 coefficients 0x60 = 0x02 in proc_ctrl write 1 to bit wa 0x53/0x56/0x59/0x5c/0x5f = bot_val 0x52/0x55/0x58/0x5b/0x5e = mid_val 0x51/0x54/0x57/0x5a/0x5d = top_val
digital processing stage STA321 46/157 doc id 15351 rev 3 6.14.3 reading a set of five coefficients/locations from ram z write ram address of b0 to registers start_addr2 and start_addr1 z write 1 to bit ra in register procctrl z (b0) read 8 msbs of coefficient in register i2cb0_top z read 8 middle bits of coefficient in register i2cb0_mid z read 8 lsbs of coefficient in register i2cb0_bot z (b1) read 8 msbs of coefficient in register i2cb1_top z read 8 middle bits of coefficient in register i2cb1_mid z read 8 lsbs of coefficient in register i2cb1_bot z (b2) read 8 msbs of coefficient in register i2cb2_top z read 8 middle bits of coefficient in register i2cb2_mid z read 8 lsbs of coefficient in register i2cb2_bot z (a1) read 8 msbs of coefficient in register i2ca1_top z read 8 middle bits of coefficient in register i2ca1_mid z read 8 lsbs of coefficient in register i2ca1_bot z (a2) read 8 msbs of coefficient in register i2ca2_top z read 8 middle bits of coefficient in register i2ca2_mid z read 8 lsbs of coefficient in register i2ca2_bot figure 28. reading five contiguous ram locations start_addr[8:0] write address to of coefficient read bottom 8 bits of coefficient read top 8 bits of coefficient read middle 8 bits in proc_ctrl 0x61 = address[8] 0x62 = address[7:0] write 1 to bit ra 0x60 = 0x08 repeat for all 5 coefficients top_val = 0x51/0x54/0x57/0x5a/0x5d mid_val = 0x52/0x55/0x58/0x5b/0x5e bot_val = 0x53/0x56/0x59/0x5c/0x5f
STA321 digital processing stage doc id 15351 rev 3 47/157 6.14.4 ram mapping table 22. ram mapping for processing stage addr descr. default block addr descr. default block 0x000 ch0i 0x7fffff pre mix: ch0 0x021 #2 a2 0x000000 (ch0-biquad) 0x001 ch1i 0x000000 0x022 #2 a1 0x000000 0x002 ch2i 0x000000 0x023 #3 b0 0x400000 0x003 ch3i 0x000000 0x024 #3 b1 0x000000 0x004 ch0i 0x000000 pre mix: ch1 0x025 #3 b2 0x000000 0x005 ch1i 0x7fffff 0x026 #3 a2 0x000000 0x006 ch2i 0x000000 0x027 #3 a1 0x000000 0x007 ch3i 0x000000 0x028 #3 b0 0x400000 0x008 ch0i 0x000000 pre mix: ch2 0x029 #4 b1 0x000000 0x009 ch1i 0x000000 0x02a #4 b2 0x000000 0x00a ch2i 0x7fffff 0x02b #4 a2 0x000000 0x00b ch3i 0x000000 0x02c #4 a1 0x000000 0x00c ch0i 0x000000 pre mix: ch3 0x02d #5 b0 0x400000 0x00d ch1i 0x000000 0x02e #5 b1 0x000000 0x00e ch2i 0x000000 0x02f #5 b2 0x000000 0x00f ch3i 0x7fffff 0x030 #5 a2 0x000000 0x010 ch0 0x7fffff pre scaler 0x031 #5 a1 0x000000 0x011 ch1 0x7fffff 0x032 #6 b0 0x400000 0x012 ch2 0x7fffff 0x033 #6 b1 0x000000 0x013 ch3 0x7fffff 0x034 #6 b2 0x000000 0x014 #0 b0 0x400000 ch0-biquad 0x035 #6 a2 0x000000 0x015 #0 b1 0x000000 0x036 #6 a1 0x000000 0x016 #0 b2 0x000000 0x037 #7 b0 0x400000 0x017 #0 a2 0x000000 0x038 #7 b1 0x000000 0x018 #0 a1 0x000000 0x039 #7 b2 0x000000 0x019 #1 b0 0x400000 0x03a #7 a2 0x000000 0x01a #1 b1 0x000000 0x03b #7 a1 0x000000 0x01b #1 b2 0x000000 0x03c #8 b0 0x400000 0x01c #1 a2 0x000000 0x03d #8 b1 0x000000 0x01d #1 a1 0x000000 0x03e #8 b2 0x000000 0x01e #2 b0 0x400000 0x03f #8 a2 0x000000 0x01f #2 b1 0x000000 0x040 #8 a1 0x000000 0x020 #2 b2 0x000000 0x041 #9 b0 0x400000
digital processing stage STA321 48/157 doc id 15351 rev 3 0x042 #9 b1 0x000000 (ch0-biquad) 0x065 #3 b1 0x000000 (ch1-biquad) 0x043 #9 b2 0x000000 0x066 #3 b2 0x000000 0x044 #9 a2 0x000000 0x067 #3 a2 0x000000 0x045 #9 a1 0x000000 0x068 #3 a1 0x000000 0x046 #10 b0 0x400000 0x069 #3 b0 0x400000 0x047 #10 b1 0x000000 0x06a #4 b1 0x000000 0x048 #10 b2 0x000000 0x06b #4 b2 0x000000 0x049 #10 a2 0x000000 0x06c #4 a2 0x000000 0x04a #10 a1 0x000000 0x06d #4 a1 0x000000 0x04b #11 b0 0x400000 0x06e #5 b0 0x400000 0x04c #11 b1 0x000000 0x06f #5 b1 0x000000 0x04d #11 b2 0x000000 0x070 #5 b2 0x000000 0x04e #11 a2 0x000000 0x071 #5 a2 0x000000 0x04f #11 a1 0x000000 0x072 #5 a1 0x000000 0x050 #12 b0 0x400000 0x073 #6 b0 0x400000 0x051 #12 b1 0x000000 0x074 #6 b1 0x000000 0x052 #12 b2 0x000000 0x075 #6 b2 0x000000 0x053 #12 a2 0x000000 0x076 #6 a2 0x000000 0x054 #12 a1 0x000000 0x077 #6 a1 0x000000 0x055 #0 b0 0x400000 ch1-biquad 0x078 #7 b0 0x400000 0x056 #0 b1 0x000000 0x079 #7 b1 0x000000 0x057 #0 b2 0x000000 0x07a #7 b2 0x000000 0x058 #0 a2 0x000000 0x07b #7 a2 0x000000 0x059 #0 a1 0x000000 0x07c #7 a1 0x000000 0x05a #1 b0 0x400000 0x07d #8 b0 0x400000 0x05b #1 b1 0x000000 0x07e #8 b1 0x000000 0x05c #1 b2 0x000000 0x07f #8 b2 0x000000 0x05d #1 a2 0x000000 0x080 #8 a2 0x000000 0x05e #1 a1 0x000000 0x081 #8 a1 0x000000 0x05f #2 b0 0x400000 0x082 #9 b0 0x400000 0x060 #2 b1 0x000000 0x083 #9 b1 0x000000 0x061 #2 b2 0x000000 0x084 #9 b2 0x000000 0x062 #2 a2 0x000000 0x085 #9 a2 0x000000 0x063 #2 a1 0x000000 0x086 #9 a1 0x000000 0x064 #3 b0 0x400000 0x087 #10 b0 0x400000 table 22. ram mapping for processing stage (continued) addr descr. default block addr descr. default block
STA321 digital processing stage doc id 15351 rev 3 49/157 0x088 #10 b1 0x000000 (ch1-biquad) 0x0ab #4 b1 0x000000 (ch2-biquad) 0x089 #10 b2 0x000000 0x0ac #4 b2 0x000000 0x08a #10 a2 0x000000 0x0ad #4 a2 0x000000 0x08b #10 a1 0x000000 0x0ae #4 a1 0x000000 0x08c #11 b0 0x400000 0x0af #5 b0 0x400000 0x08d #11 b1 0x000000 0x0b0 #5 b1 0x000000 0x08e #11 b2 0x000000 0x0b1 #5 b2 0x000000 0x08f #11 a2 0x000000 0x0b2 #5 a2 0x000000 0x090 #11 a1 0x000000 0x0b3 #5 a1 0x000000 0x091 #12 b0 0x400000 0x0b4 #6 b0 0x400000 0x092 #12 b1 0x000000 0x0b5 #6 b1 0x000000 0x093 #12 b2 0x000000 0x0b6 #6 b2 0x000000 0x094 #12 a2 0x000000 0x0b7 #6 a2 0x000000 0x095 #12 a1 0x000000 0x0b8 #6 a1 0x000000 0x096 #0 b0 0x400000 ch2-biquad 0x0b9 #7 b0 0x400000 0x097 #0 b1 0x000000 0x0ba #7 b1 0x000000 0x098 #0 b2 0x000000 0x0bb #7 b2 0x000000 0x099 #0 a2 0x000000 0x0bc #7 a2 0x000000 0x09a #0 a1 0x000000 0x0bd #7 a1 0x000000 0x09b #1 b0 0x400000 0x0be #8 b0 0x400000 0x09c #1 b1 0x000000 0x0bf #8 b1 0x000000 0x09d #1 b2 0x000000 0x0c0 #8 b2 0x000000 0x09e #1 a2 0x000000 0x0c1 #8 a2 0x000000 0x09f #1 a1 0x000000 0x0c2 #8 a1 0x000000 0x0a0 #2 b0 0x400000 0x0c3 #9 b0 0x400000 0x0a1 #2 b1 0x000000 0x0c4 #9 b1 0x000000 0x0a2 #2 b2 0x000000 0x0c5 #9 b2 0x000000 0x0a3 #2 a2 0x000000 0x0c6 #9 a2 0x000000 0x0a4 #2 a1 0x000000 0x0c7 #9 a1 0x000000 0x0a5 #3 b0 0x400000 0x0c8 #10 b0 0x400000 0x0a6 #3 b1 0x000000 0x0c9 #10 b1 0x000000 0x0a7 #3 b2 0x000000 0x0ca #10 b2 0x000000 0x0a8 #3 a2 0x000000 0x0cb #10 a2 0x000000 0x0a9 #3 a1 0x000000 0x0cc #10 a1 0x000000 0x0aa #3 b0 0x400000 0x0cd #11 b0 0x400000 table 22. ram mapping for processing stage (continued) addr descr. default block addr descr. default block
digital processing stage STA321 50/157 doc id 15351 rev 3 0x0ce #11 b1 0x000000 (ch2-biquad) 0x0f1 #5 b1 0x000000 (ch3-biquad) 0x0cf #11 b2 0x000000 0x0f2 #5 b2 0x000000 0x0d0 #11 a2 0x000000 0x0f3 #5 a2 0x000000 0x0d1 #11 a1 0x000000 0x0f4 #5 a1 0x000000 0x0d2 #12 b0 0x400000 0x0f5 #6 b0 0x400000 0x0d3 #12 b1 0x000000 0x0f6 #6 b1 0x000000 0x0d4 #12 b2 0x000000 0x0f7 #6 b2 0x000000 0x0d5 #12 a2 0x000000 0x0f8 #6 a2 0x000000 0x0d6 #12 a1 0x000000 0x0f9 #6 a1 0x000000 0x0d7 #0 b0 0x400000 ch3-biquad 0x0fa #7 b0 0x400000 0x0d8 #0 b1 0x000000 0x0fb #7 b1 0x000000 0x0d9 #0 b2 0x000000 0x0fc #7 b2 0x000000 0x0da #0 a2 0x000000 0x0fd #7 a2 0x000000 0x0db #0 a1 0x000000 0x0fe #7 a1 0x000000 0x0dc #1 b0 0x400000 0x0ff #8 b0 0x400000 0x0dd #1 b1 0x000000 0x100 #8 b1 0x000000 0x0de #1 b2 0x000000 0x101 #8 b2 0x000000 0x0df #1 a2 0x000000 0x102 #8 a2 0x000000 0x0e0 #1 a1 0x000000 0x103 #8 a1 0x000000 0x0e1 #2 b0 0x400000 0x104 #9 b0 0x400000 0x0e2 #2 b1 0x000000 0x105 #9 b1 0x000000 0x0e3 #2 b2 0x000000 0x106 #9 b2 0x000000 0x0e4 #2 a2 0x000000 0x107 #9 a2 0x000000 0x0e5 #2 a1 0x000000 0x108 #9 a1 0x000000 0x0e6 #3 b0 0x400000 0x109 #10 b0 0x400000 0x0e7 #3 b1 0x000000 0x10a #10 b1 0x000000 0x0e8 #3 b2 0x000000 0x10b #10 b2 0x000000 0x0e9 #3 a2 0x000000 0x10c #10 a2 0x000000 0x0ea #3 a1 0x000000 0x10d #10 a1 0x000000 0x0eb #3 b0 0x400000 0x10e #11 b0 0x400000 0x0ec #4 b1 0x000000 0x10f #11 b1 0x000000 0x0ed #4 b2 0x000000 0x110 #11 b2 0x000000 0x0ee #4 a2 0x000000 0x111 #11 a2 0x000000 0x0ef #4 a1 0x000000 0x112 #11 a1 0x000000 0x0f0 #5 b0 0x400000 0x113 #12 b0 0x400000 table 22. ram mapping for processing stage (continued) addr descr. default block addr descr. default block
STA321 digital processing stage doc id 15351 rev 3 51/157 0x114 #12 b1 0x000000 (ch3-biquad) 0x120 ch0i 0x000000 post mix: ch2 0x115 #12 b2 0x000000 0x121 ch1i 0x000000 0x116 #12 a2 0x000000 0x122 ch2i 0x7fffff 0x117 #12 a1 0x000000 0x123 ch3i 0x000000 0x118 ch0i 0x7fffff post mix: ch0 0x124 ch0i 0x000000 post mix: ch3 0x119 ch1i 0x000000 0x125 ch1i 0x000000 0x11a ch2i 0x000000 0x126 ch2i 0x000000 0x11b ch3i 0x000000 0x127 ch3i 0x7fffff 0x11c ch0i 0x000000 post mix: ch1 0x128 delay 0x000000 delay 0x11d ch1i 0x7fffff - - - - 0x11e ch2i 0x000000 - - - - 0x11f ch3i 0x000000 - - - - table 22. ram mapping for processing stage (continued) addr descr. default block addr descr. default block
ffx STA321 52/157 doc id 15351 rev 3 7 ffx 7.1 functional description figure 29. ffx processing schematic the ffx modulator is a digital low-distortion low-noise pcm-to-pwm converter, based on a pseudo-natural sampling technique, which converts the 4 by 24-bit digital inputs into differential pulse-width modulated outputs at a frequency of either 384 or 768 khz (selected by register ffxcfg2 , bit pwm_freq) and with a time resolution of 98.304 mhz. this gives a dynamic range that is approaching 100 db. the signal is compared with two different carrier signals (rising and falling sawtooth waveforms at the pwm frequency), to get a double edge modulation and to have the possibility to drive a differenti al (full bridge) power stage. the order of the noise shaper can be modified by the user, via register bit ffxcfg2 .ns_ord, depending on the acceptable amount of noise out of the audio band, that is, noise above 20 khz. the higher the noise shaper order, the better is the snr but the higher is the out of band noise. the pwm generator block converts the amplitude quantization into time quantization to generate a pwm signal. 7.2 modulation schemes it is possible to use each of the two intersections with up-carrier and down-carrier to force a rising or a falling edge on each of the two pwm outputs (a and b). this flexibility is achieved through programming registers pwmoncfg1-2 (where n is the number, 1 to 4, of the output) beginning on page 91 . pwm output a can be modulated in one of, or a hybrid of, two basic ways via bits pm_na: z with the wave starting from level 0 at the beginning of the period, and rising to level 1 when the audio signal intersects the down-carrier z with the wave starting from level 1 at the be ginning of the period, and falling to level 0 when the audio signal intersects the up-carrier; 96 khz 24 bits 3 rd , 4 th , 5 th -order noise shaper 1536 khz 24 bits pwm generator 384/768 khz 8/7 bits pwm a dw up intersector pwm b d in up dw 384/768 khz 1 bits dw up 16x oversampling stage
STA321 ffx doc id 15351 rev 3 53/157 pwm output b can be similarly modulated via bits pm_nb: z with the wave starting from level 1 at the be ginning of the period, and falling to level 0 when the audio signal intersects the down-carrier; z with the wave starting from level 0 at the beginning of the period, and rising to level 1 when the audio signal intersects the up-carrier; the hybrid mode is the toggling between the two methods of modulation for each pwm period. figure 30. pwm modes for outputs a and b the various single output modulation schemes can be combined together on the two outputs to get the desired differential modulation schemes. pwm mode for output a dn dn up up pwm mode for output b 00: dn -> rising 01: up -> falling 10: hybrid 1 11: hybrid 2 00: dn -> falling 01: up -> rising 10: hybrid 1 11: hybrid 2
ffx STA321 54/157 doc id 15351 rev 3 in particular, for the traditional schemes (binary, phase shift), and the new one (new phase shift modulation) the mode bits must be set according to ta b l e 2 3 below. figure 31. modulation waveforms corresponding to table 23 table 23. modulation type with register programming register bit pwmoncfg1.pm_na register bit pwmoncfg2.pm_nb resulting modulation 00 00 binary 01 01 10 10 phase shift 11 11 00 01 new phase shift 01 00 a: 10 b: 10 a-b a: 00 b: 01 a: 01 b: 01 a - b pwm mode binary phase shift new phase shift
STA321 ffx doc id 15351 rev 3 55/157 7.3 pwm shift feature in new phase shift modulation it is possible to shift one output with respect to the other one. this can reduce the noise generated by the simultaneous switching of two or more outputs. the shift is performed through by programming bits ps_na and ps_nb in registers pwmoncfg1-2 (where n is the number, 1 to 4, of the output) beginning on page 91 . figure 32. new phase shift modulation with shift feature a- b a b without shift a b with shift a- b dn up up ?
ffx STA321 56/157 doc id 15351 rev 3 7.4 ternary mode the ternary mode feature is also available. it is activated by bits ternary_n in registers pwmoncfg0 beginning on page 91 (where n is the number, 1 to 4, of the output). this feature overrides the pwm mode bits settings pm_na and pm_nb. figure 33. ternary modulation 7.5 minimum pulse limitation the ffx modulator has a minimum pulse limitation feature which has a double purpose: z to limit the maximum/minimum duty cycle when the audio signal is near to full scale; z to have the commutations on the same channel outputs a and b separated by a minimum pulse distance. the first feature is always enabled. the second feature is enabled with register bit pwmoncfg0.mp_zero_n, where n is the output 1 to 4. it is possible to prevent the commutations on outputs a and b to happen exactly at the same time using bit azpls_n. the minimum pulse size is determined by the number of system clock (98.304 mhz) periods programmed in bits min_pls_n[3:0]. a: 10 b: 10 a: 00 b: 01 pwm mode phase shift new phase shift a: 10 b: 10 a: 00 b: 01 ternary ternary_n = 0 ternary_n = 1
STA321 ffx doc id 15351 rev 3 57/157 7.6 headphone modulation the ffx modulator can be used for driving a headphone load with the common terminal available, together with left and right terminals. in this case it is possible to drive the common terminal with a 50% fixed duty cycle square wave coming from output b of the modulator, by setting bit halfb_n to 1, and the left and right terminals from the output a of two different channels. for the three outputs used in this way bits pm_na and pm_nb can be 00 or 01. figure 34. modulation for headphones left right common output 0b output 0a output 1a common left right
ffx STA321 58/157 doc id 15351 rev 3 7.7 pfstart? operation in order to avoid pop noise the bypass capacitor, situated between the filtered amplifier output and the load in single-ended applications, needs to be pre-charged to half of the power supply voltage. this is usually done by connecting a resistive partition to the output and then disconnecting it at the end of the charging phase (see the analog pop free description in section 9). in the STA321 the ffx digital pop-free feature allows the digital pre-charging of the bypass capacitor using the amplifier instead of a resistive partition. this active pre-charge is also faster than the resistive partition method. the digital pop-free function can be independently set on both power stages, that is, the cmos bridge stage using bit cb_pfdig and the embedded amplifier stage using bit ea_pfdig in register ffxcfg2 on page 83 . registers cb_pframp1-6 beginning on page 97 and ea_pframp1-6 beginning on page 99 control the charging function. the register usage is given in the following description. the capacitor is charged from zero to half the supply voltage with the pwm signal. by applying a suitable ramp to the input of the modulator the pwm signal begins from near 0% duty cycle to 50% duty cycle. the method is based on a slow ramp signal (from ground to v cc / 2), implemented using both pulse density modulation (pdm) and pulse width modulation (pwm). at the beginning of the ramp pdm is used starting from an init ial value set by bits cbrmpini and earmpini, and then switching to pwm when reaching a threshold value set by bits cbrmpth and earmpth. the total ramp time can be modified via bits eatim_rmp and cbtim_rmp. figure 35. digital pop-free ramp implementation the pdm is realized with a noise shaper circuit, where the sampling time (td) of the noise shaper is equal to the minimum pulse size set by bits cbrmp_mp and earmp_mp. 1000 ? 000 ramp_init ramp_thold 0000 ? 000 output 0 pdm pwm ramp value
STA321 ffx doc id 15351 rev 3 59/157 7.8 pwm00 output pin pwm00 is an additional output with a ma ximum driving capability of 2 ma to control an external bridge or external operational amplifier. by default, pwm00 is tied to logical 0. when register bit ckocfg[0] is set to 1 then any ffx pwm channel output can be mapped to it. when the cmos bridge is in standby the output pwm00 is, by default, turned off. however, it is possible to have the ffx signal pwm3a as the pwm00 output by using bit 3 of register ffxcfg0 on page 82 , and this whatever the status of power-down or the 3-state signals of both bridges, even if they are different from the normal operating mode where the output is 0 when in power-down or 3-state mode.
cmos power stage STA321 60/157 doc id 15351 rev 3 8 cmos power stage the cmos half-bridge circuit of figure 36 is a single channel analog output power stage. there are three such output stages in the STA321, one for each of the outputs out1-3. the switching mode is regulated by the logic circuit which ensures that the mosfets are switched in such a way as to avoid (or minimize) conditions where both the pmos and the nmos are conducting at the same time. the input is a 1.8-v to 3.3-v level shi fter followed by some combinational logic. figure 36. cmos half bridge block diagram table 24. cmos bridge signal descriptions pin name direction description ffx-ch in digital audio signal coming from ffx block powerdown in powerdown signal coming from the ffx block tristate in 3-state signal from the ffx block popfree in pop-free signal from the ffx block fault out short-circuit fault output feedback signal to digital core (active low) out out channel half-bridge analog output vcc33/gnd33 supply pre-driver analog supply vdd/gnd supply digital core supply generated by internal regulator vccx/gndx supply half-bridge power supply logic pop-free outn driver p driver n level shifter enable logic power vcc33 gnd33 fault gnd33 gnd gndx vdd vcc33 vccx popfree tristate faultn ffx-ch n powerdown
STA321 cmos power stage doc id 15351 rev 3 61/157 the cmos bridge power rating can be calculated using the following formulas: p (<1%) = (r l / 2) * (m * vcc / 2 / (r l + 2 * r ds )) 2 for btl p (<1%) = (r l / 2) * (m * vcc / 2 / (r l + r ds )) 2 for single ended p (10%) = 1.28 * p(<1%) where r ds is composed of the most r dson and the board and connector parasitic resistances (including power supplies and coils) and m is the modulation index obtained from m = 1 - 2 * (min_pls_n + 1) / f clk_ffx / s where min_pls_n is the value in register pwmoncfg0 for channel n, f clk_ffx is the frequency of the ffx clock and s is the pwm clock period ( 384 khz or 768 khz selected by register bit ffxcfg2 .pwm_freq). for the cmos bridge, min_pls_n can be set to 0; this gives m = 0.9922. the analog pop_free function is available in the cmos bridge circuit by setting the appropriate bridge start-up as per ta b l e 2 6 . the cmos bridge enable and pop-free signals are generated from the three signals powerdown, tristate and popfree provided by the digital core and controlled/configured through register bits ffxcfg1 .cb_stby, ffxcfg1 .cb_tristn and pfefault .pfen for the three outputs, n = 1 to 3. figure 37. analog pop-free schematic table 25. power output (at 1% thd) in headphone mode load, r l in ? power, p in mw (for 3.3-v supply) 16 70 32 32 pfe & not(tristate) & powerdown outn gndx vccx
cmos power stage STA321 62/157 doc id 15351 rev 3 at the appropriate time the two pop-free resistors allow the bypass capacitor to be charged to v ccx / 2. the STA321 generates automatically the bridge start-up and switch-off sequence to provide the correct charging. the time tt in figure 38 below is set using registers cbttf0-1 and cbttp0-1. tt must be chosen for the specific application depending on the decoupling capacitor, load and power supply. after powerdown is applied again the decoupling capacitor discharges slowly due to capacitor leakage. the analog pop-free implementation cannot be used with the digital pfstart implementation both analog and digital pop-free features must be disabled if binary headphone modulation is used. figure 38. analog pop-free start-up and switch-off sequence the cmos bridge circuit includes over-current protection. the fault signal indicates to the output the status of the over-current condition due to a short circuit. the over-current thresholds detected by the cmos bridge are fixed at 1.8 a. table 26. logic circuit at bridge input powerdown tristate popfree pop-free resistors bridge status 000disconnected3-state 001disconnected3-state 101connected 3-state 111disconnectedon 110disconnectedon powerdown pfe tristate v(capacitor) vcc / 2 tt tt
STA321 fault detection and recovery doc id 15351 rev 3 63/157 9 fault detection and recovery 9.1 external amplifier when fault is reported on pin eaftn and bit ea_tsft_on of register ffxcfg2 on page 83 is active, then pin eatsn is reset to 0 and the embedded bridge outputs are put in the high-impedance state. when the fault sign al disappears (that is, goes to 1) the embedded bridge is kept in 3-state for a time defined in register eattf0-1 on page 86 , after which time the outputs recover. 9.2 cmos bridge when fault is reported to the digital core and cb_tsft_on of register ffxcfg2 on page 83 is active then the tristate is activated thus putting the STA321 outn outputs in the high-impedance state. when the fault signal disappears, the cmos bridge is kept in 3-state status for a time defined in register cbttf0-1 on page 88 , after which time the outputs recover.
adc STA321 64/157 doc id 15351 rev 3 10 adc 10.1 description the STA321 analog input is provided through a low-power, low-voltage complete low-cost analog-to-digital converter front end designed for stereo audio applications. it includes programmable gain amplifier, anti-aliasing filter, low-noise microphone biasing circuit, a third order mash2-1 delta-sigma modulator, a digital decimating filter and a 1st-order dc-removal filter. the adc works with either a microphone input or a line input, selected using bit adc_insel in register adccfg0 on page 133 . a programmable gain amplifier (pga) is available in microphone-in mode giving the possibility to amplify the signal from 0 to 42 db in steps of 6 db using register bit adccfg0 .adc_pga. the adc specifications are given in table 6 on page 14 . figure 39. adc front- end block diagram adc left 1 0 inl 2 pga 10 00 10 00 inr 2 inr 1 pga adc right 0 1 adcinsel[4] inl 1 adccfg1[7:6] 16 bits 16 bits
STA321 adc doc id 15351 rev 3 65/157 10.2 application schematic figure 40. typical connections for power supplies and inputs 10.2.1 configuration example this is an example of the register setup for the adc inputs. it is assumed that every peripheral is already configured and working correctly. there are other configuration examples to help you get started please refer to other chapters and also to chapter 14: register description on page 77 in order to get all the necessary and complementary details. ta bl e 2 7 shows the register settings for selecting inl2 and inr2 as input source for src and sai_out1 and using the pga with a 12-db gain. table 27. example register settings for adc register value description adccfg1 0x40 selecting inl2 and inr2 as sources adccfg0 0x52 pga gain = +12 db, pga enabled, adc clock on p2sdata 0x40 adc data routed also to the sai_out
serial audio interface STA321 66/157 doc id 15351 rev 3 11 serial audio interface the data on pins sdatai, sdatao, lrclki and lrclko are always synchronous with the bit clock. the data on these pins changes with the biclk active (or clocking) edge. the biclk strobe edge latches the data sdatai, sdatao, lrclki, lrclko; thus this data should be stable near the biclk strobe edges. the slave device uses the strobe edges to latch the serial data internally. the active and strobe edges can be selected to be the ri sing edge or the falling edge by appropriately programming register bits sai_in1_cfg0 [7], sai_out_cfg0 [7] and sai_in2_cfg0 [7]. the serial-to-parallel interface and the parallel-to-serial interface can have different sampling rates. figure 41 shows a typical setup. figure 41. sai typical sampling rates 11.1 master mode in this mode biclki/biclko and lrclki/lrclko are configured as outputs and are generated by the core. figure 42. timing diagram for master mode sai_out pll clk 98 mhz sai_in sample rate converter fs = 8 - 192 khz fs = clk / 1024 96 khz processing fs = clk / 1024 96 khz fs = clk / 2048 96 khz or 48 khz or fs = clk / 1024 biclki/ biclko biclki biclko lrclki lrclko sdatao sdatai t dl t dda t dst t dht
STA321 serial audio interface doc id 15351 rev 3 67/157 11.2 slave mode in this mode biclki/o and lrclki/o are configured as inputs and supplied by the external peripheral. figure 43. timing diagram for slave mode table 28. timing parameters for master mode symbol parameter min typ max unit t dl lrclki/lrclko propagation delay from biclk active edge 0 - 10 ns t dda sdatai propagation delay from biclki/o active edge 0 - 15 ns t dst sdatao setup time to biclki/o strobing edge 10 - - ns t dht sdatao hold time from biclki/o strobing edge 10 - - ns table 29. timing parameters for slave mode symbol parameter min typ max unit t bcy biclk cycle time 50 - - ns t bch biclk pulse width high 20 - - ns t bcl biclk pulse width low 20 - - ns t lrsu lrclki/lrclko setup time to biclk strobing edge 10 - - ns t lrh lrclki/lrclko hold time to biclk strobing edge 10 - - ns t ds sdatao setup time to biclk strobing edge 10 - - ns t dh sdatao hold time to biclk strobing edge 10 - - ns t dd sdatai propagation delay from biclk active edge 0 - 10 ns biclki biclko lrclki lrclko sdatao sdatai t bch t bcl t bcy t ds t lrh t lrsu t dh t dd
serial audio interface STA321 68/157 doc id 15351 rev 3 11.3 serial formats different audio formats are supported in both master and slave modes. clock and data configurations can be customized to match most of the serial audio protocols available on the market. data length can be customized for 8, 16, 24 or 32 bits. 11.3.1 right justified figure 44. right justified serial format 11.3.2 left justified figure 45. left justified serial format biclki biclko lrclki lrclko sdatao sdatai biclki biclko lrclki lrclko sdatao sdatai
STA321 serial audio interface doc id 15351 rev 3 69/157 11.3.3 dsp figure 46. dsp serial format 11.3.4 i 2 s figure 47. i 2 s serial format 11.3.5 pcm/if (non-delayed mode) z msb first z 16-bit data. figure 48. pcm (non-delayed) serial format biclki biclko lrclki lrclko sdatao sdatai left right 3 n n -1 1 2 3 n n -1 biclki biclko lrclki lrclko sdatao sdatai 1 2 3 n n -1 any width sdatao / sdatai biclki biclko lrclki lrclk biclki biclko lrclki lrclko sdatao sdatai
serial audio interface STA321 70/157 doc id 15351 rev 3 11.3.6 pcm/if (delayed mode) z msb first z 16-bit data. figure 49. pcm (delayed) serial format 1 2 3 n n -1 sdatao / sdatai biclki/ biclko lrclki/ lrclko biclki biclko lrclki lrclko sdatao sdatai
STA321 serial audio interface doc id 15351 rev 3 71/157 11.4 invalid detection STA321 has an invalid input detection feature that can detect an invalid serial interface bit clock or frame clock and then mute the processing channels to avoid any speaker or headphone damage and, moreover, to avoid loud audible transients which may be discomforting to the listener. the control is active only for the sai input. the configuration programmed in bits 0, 1 and 2 of register ffxcfg0 on page 82 is applicable to both sai1 and sai2 whilst the checks are independent for each interface. the mute on the processing channel is asserted depending on the input interface mapping. figure 50 shows the invalid detection schematic. here, two different checks are available. the first one is enabled by register bit ffxcfg0 .bad_cks_m and evaluates the ratio of biclk and lrclk. the resulting number must be the same as that written in bits s2pn_bos (for example, 32 * f s or 64 * f s ) in registers sai_in1_cfg1 on page 123 and sai_in2_cfg1 , otherwise the channels are muted. the second check is enabled by register bit ffxcfg0 .mis_bick_m and is related to the presence of biclk. basically, a 8-bit watchdog counter decrements, starting from 0xff, with each edge of clk_proc. the counter is reset to 0xff at each biclk edge; so, if the watchdog counter ever reaches 0x00, a missing bit clock error is signalled and the mute command is issued. figure 50. invalid input detection schematic biclki1 lrclki1 biclki2 lrclki2 ratio calculator ratio calculator is alive? is alive? s2p2_bos s2p1_bos = = clk_proc clk_proc or or mis_bick_m mis_bick_m bad_cks_m bad_cks_m mute0 mute1 mute2 mute3 00 01 1x 00 01 1x 00 01 1x 00 01 1x mute0 mute1 mute3 mute2 mute ch0 mute ch1 mute ch2 mute ch3 src1_insel src2_insel
headphone detection STA321 72/157 doc id 15351 rev 3 12 headphone detection the headphone detector circuit, shown in figure 51 , is made with two schmitt-trigger comparators (with different thresholds) which sense the value of the hpdect input voltage and modifies the hp_det1 or the hp_det2 level as given in ta b l e 3 0 and ta b l e 3 1 below. the comparators are enabled or disabled with bits e_hp1 and e_hp2 in register hpdet2 on page 138 the comparator output status is provided via bits 1 and 0 of register hpdet2 on page 138 . one of the comparator outputs is then selected with register bit hpdet1 .hpd_sel, and that signal is passed through a digital debouncing filter and supplied to the ffx modulator. the pwm outputs are then modified depending on the settings of register bits hpdst .hp_det_filt and hpdet1 .hpd_act_mode. table 30. headphone 1 detector e_hp1 (register hpdet2) hp-jack status hp_det voltage hp_det1 status register bit hpdst.hp_det_filt 1 unplugged low 0 - 1 plugged high 1 - 0xx1- table 31. headphone 2 detector e_hp2 (register hpdet2) hp-jack status hp_det voltage hp_det2 status register bit hpdst.hp_det_filt 1 unplugged low 1 - 1 plugged high 0 - 0xx1-
STA321 headphone detection doc id 15351 rev 3 73/157 12.1 applications circuits two applications circuits are given here, one fo r the binary single-ended application and one for the binary headphone application. figure 51. headphone detection circuit for single-ended configuration figure 52. headphone detection circuit for binary hp configuration hp_det1 hp_det i 2 c 100 k 1 k vcc33 tud_en hp_det2 filter ffx modulator cmos bridge eapwm out l1 l2 1 k 5 k hp_det_filt vcc33 hp_det1 hp_det i 2 c 100 k 1 k vcc33 tud_en hp_det2 ffx modulator cmos bridge eapwm out l1 l2 1 k 5 k hp_det_filt vcc33 l3 1 k filter
headphone detection STA321 74/157 doc id 15351 rev 3 12.2 configuration example this is an example of the register setup for headphones detection. it is assumed that every peripheral is already configured and working correctly. there are other configuration examples to help you get started please refer to other chapters and also to chapter 14: register description on page 77 in order to get all the necessary and complementary details. ta bl e 3 2 and ta bl e 3 3 below give a possible setup for the headphones detection configurations shown in figure 51 and figure 52 , respectively. note: the pullup on hpdet pad must always be disabled before using the hpdet function. note: comparator 1 and comparator 2 cannot be enabled simultaneously. table 32. headphone detection configuration sequence for binary se register value description misc on page 135 0x21 enable core clock pllb on page 136 0x00 use pll clock user ffx and cmos bridge configuration hpdet2 on page 138 0x80 disable the hp_det pull-up hpdet1 on page 137 0x57 use hp1 for hpdet filter; polarity = high; action = mute; mod = binary se; average time 170 ms. hpdet2 on page 138 0x80 select e_hp1 comparator ffxcfg1 on page 81 0x00 remove the tristate from the bridges table 33. headphone detection configuration sequence for binary headphone register value description misc on page 135 0x21 enable core clock pllb on page 136 0x00 use pll clock user ffx and cmos bridge configuration hpdet2 on page 138 0x80 disable the hp_det pull-up hpdet1 on page 137 0x5f use hp1 for hpdet filter; polarity = high; action = mute; mod = binary hp; average time 170 ms. hpdet2 on page 138 0x80 select e_hp1 comparator ffxcfg1 on page 81 0x00 remove the tristate from the bridges
STA321 i 2 c interface doc id 15351 rev 3 75/157 13 i 2 c interface 13.1 communication protocol 13.1.1 data transition and change data changes on the sda line must only occur when the scl clock is low. sda transition while the clock is high is used to identify a start or stop condition. 13.1.2 start condition start is identified by a high to low transition of the sda bus while the clock signal, scl, is stable in the high state. a start condition must precede any command for data transfer. 13.1.3 stop condition stop is identified by a low to high transition on the sda bus while the clock signal, scl, is stable in the high state. a stop condition terminates communication between STA321 and the bus master. 13.1.4 data input during the data input the STA321 samples the sda signal on the rising edge of clock scl. for correct device operation the sda signal must be stable during the rising edge of the clock and the data can change only when the scl line is low. 13.1.5 device addressing to start communication between the master and the STA321, the master initiates with a start condition. following this, the master sends 8 bits (msb first) on the sda line which corresponds to the device select address and read or write mode. the 7 msbs are the device address identifiers, corresponding to the i 2 c bus definition. in the STA321 the i 2 c interface has the device address 0x30. after a start condition the STA321 identifies the device address and if a match is found, acknowledges the identification on sda bus during the 9th bit time. the byte following the device identification byte is the internal space address. 13.1.6 write operation following the start condition the master sends a device select code with the rw bit set to 0. after the STA321 acknowledge, the master sends the byte of internal address. on receiving the internal byte address the STA321 responds with acknowledge. byte write in the byte write mode the master sends one data byte, this is acknowledged by the STA321. the master then terminates the transfer by generating a stop condition.
i 2 c interface STA321 76/157 doc id 15351 rev 3 multi-byte write the multi-byte write mode starts from any internal address. the master generates a stop condition to terminate the transfer. 13.1.7 read operation current address byte read following the start condition the master sends a device select code with the rw bit set to 1. the STA321 acknowledges and then responds by sending one byte of data. the master then terminates the transfer by generating a stop condition. current address multi-byte read the multi-byte read mode start from any internal address. data bytes are read from sequential addresses within the STA321. the master acknowledges each data byte read and then generates a stop condition to terminate the transfer. random address byte read following the start condition the master sends a device select code with the rw bit set to 0. the STA321 acknowledges and then the master writes the internal address byte. after receiving, the internal byte address the STA321 again responds with an acknowledge. the master then initiates another start condition and sends the device select code with the rw bit set to 1. the STA321 acknowledges this and then responds by sending one byte of data. the master then terminates the transfer by generating a stop condition. random address multi-byte read the multi-byte read modes start from any internal address. data bytes are read from sequential addresses within the STA321. the master acknowledges each data byte read and then generates a stop condition to terminate the transfer. figure 53. i 2 c write operations figure 54. i 2 c read operations
STA321 register description doc id 15351 rev 3 77/157 14 register description table 34. register summary registeraddr76543210 ffxcfg1 0x00 ea_stby cb_stby ea_trist ffx_ulck_pll cb_trist2 cb_trist1 cb_trist0 ffxcfg0 0x01 mute3 mute2 mute1 mute0 pwm00_3a bad_in_m bad_cks_m mis_bick_m ffxcfg2 0x02 reset _noish pwm_freq ns_ord[1:0] ea_tsft_on cb_tsft_on ea_pfdig cb_pfdig pwmmap1 0x03 cb1_map[2:0] cb2_map[2:0] cb3_map[2:1] pwmmap2 0x04 cb3_map[0] pwm00_map[2:0] ea1a_map[2:0] ea1b_map[2] pwmmap3 0x05 ea1b_map[1:0] ea2a_map[2:0] ea2b_map[2:0] eattf0 0x06 eattf[7:0] eattf1 0x07 eattf[7:0] eattp0 0x08 eattp[15:8] eattp1 0x09 eattp[7:0] cbttf0 0x0a cbttf[15:8] cbttf1 0x0b cbttf[7:0] cbttp0 0x0c cbttp[15:8] cbttp1 0x0d cbttp[7:0] ffxst 0x0e ea_mpwm cb_mpwm earmp_st[1:0] cbrmp_st[1:0] eabinss_ac cbbinss_ac powst 0x0f reserved ea_tw ea_pd ea_ft ea_ts powst1 0x10 reserved cb_pd cb_ft[2:0] cb_ts[2:0] pwmo1cfg0 0x11 azpls_1 ternary_1 halfb_1 mp_zero_1 min_pls_1[3:0] pwmo1cfg1 0x12 pm_1a[1:0] ps_1a[5:0] pwmo1cfg2 0x13 pm_1b[1:0] ps_1b[5:0] pwmo2cfg0 0x14 azpls_2 ternary_2 halfb_2 mp_zero_2 min_pls_2[3:0] pwmo2cfg1 0x15 pm_2a[1:0] ps_2a[5:0] pwmo2cfg2 0x16 pm_2b[1:0] ps_2b[5:0] pwmo3cfg0 0x17 azpls_3 ternary_3 halfb_3 mp_zero_3 min_pls_3[3:0] pwmo3cfg1 0x18 pm_3a[1:0] ps_3a[5:0] pwmo3cfg2 0x19 pm_3b[1:0] ps_3b[5:0] pwmo4cfg0 0x1a azpls_4 ternary_4 halfb_4 mp_zero_4 min_pls_4[3:0] pwmo4cfg1 0x1b pm_4a[1:0] ps_4a[5:0] pwmo4cfg2 0x1c pm_4b[1:0] ps_4b[5:0] cb_pframp1 0x20 cbrmp_mp[5:0] reserved cb_pframp2 0x21 cbrmpini[15:8] cb_pframp3 0x22 cbrmpini[7:0] cb_pframp4 0x23 cbtim_rmp[3:0] reserved cb_pframp5 0x24 cbrmpth[15:8] cb_pframp6 0x25 cbrmpth[7:0] ea_pframp1 0x26 earmp_mp[5:0] reserved ea_pframp2 0x27 earmpini[15:8]
register description STA321 78/157 doc id 15351 rev 3 ea_pframp3 0x28 earmpini[7:0] ea_pframp4 0x29 eatim_rmp[3:0] reserved ea_pframp5 0x2a earmpth[15:8] ea_pframp6 0x2b earmpth[7:0] src1state 0x30 src1_byp[1:0] src_1_lock src1_fisfo[4:0] src2state 0x31 src1_byp[1:0] src_1_lock src1_fisfo[4:0] i2cb0_top 0x51 i2cb0[23:16] i2cb0_mid 0x52 i2cb0[15:8] i2cb0_bot 0x53 i2cb0[7:0] i2cb1_top 0x54 i2cb1[23:16] i2cb1_mid 0x55 i2cb1[15:8] i2cb1_bot 0x56 i2cb1[7:0] i2cb2_top 0x57 i2cb2[23:16] i2cb2_mid 0x58 i2cb2[15:8] i2cb2_bot 0x59 i2cb2[7:0] i2ca1_top 0x5a i2ca1[23:16] i2ca1_mid 0x5b i2ca1[15:8] i2ca1_bot 0x5c i2ca1[7:0] i2ca2_top 0x5d i2ca2[23:16] i2ca2_mid 0x5e i2ca2[15:8] i2ca2_bot 0x5f i2ca2[7:0] procctrl 0x60 reserved ra reserved wa w1 start_add2 0x61 reserved i2cstart_a8 start_add 0x62 i2cstart_a7_a0 rom_remap 0x6f reserved enab_pre3 enab_pre2 enab_pre1 enab_pre0 enab_post enab_prmix enab_delay byp_en_ch0 0x70 reserved effs_en_ch0 0x71 reserved erom09 erom08 byp_en_ch1 0x72 reserved effs_en_ch1 0x73 reserved erom19 reserved byp_en_ch2 0x74 reserved effs_en_ch2 0x75 reserved erom29 erom28 byp_en_ch3 0x76 reserved effs_en_ch3 0x77 reserved erom39 reserved bass_sel0_r 0x78 reserved bass_en0 bass_sel0 bass_sel1_r 0x79 reserved bass_en1 bass_sel1 bass_sel2_r 0x7a reserved bass_en2 bass_sel2 bass_sel3_r 0x7b reserved bass_en3 bass_sel3 treb_sel0_r 0x7c reserved treb_en0 treb_sel0 treb_sel1_r 0x7d reserved treb_en1 treb_sel1 treb_sel2_r 0x7e reserved treb_en2 treb_sel2 table 34. register summary (continued) registeraddr76543210
STA321 register description doc id 15351 rev 3 79/157 treb_sel3_r 0x7f reserved treb_en3 treb_sel3 satch0cfg1 0x90 sat_eq sat_ch0[22:16] satch0cfg2 0x91 sat_ch0[15:8] satch0cfg3 0x92 sat_ch0[7:0] satch1cfg1 0x93 reserved sat_ch1[22:16] satch1cfg2 0x94 sat_ch1[15:8] satch1cfg3 0x95 sat_ch1[7:0] satch2cfg1 0x96 reserved sat_ch2[22:16] satch2cfg2 0x97 sat_ch2[15:8] satch2cfg3 0x98 sat_ch2[7:0] satch3cfg1 0x99 reserved sat_ch3[22:16] satch3cfg2 0x9a sat_ch3[15:8] satch3cfg3 0x9b sat_ch3[7:0] volcfg 0xa0 svol_on3 svol_on2 svol_on1 svol_on0 tim_svol mvol 0xa1 mvol volch0 0xa2 cvol0 volch1 0xa3 cvol1 volch2 0xa4 cvol2 volch3 0xa5 cvol3 sai_in1_cfg0 0xb0 s2p1_b_str s2p1_lr_l reserved s2p1_msb s2p1_dfm s2p1_mmd sai_in1_cfg1 0xb1 s2p1_dlen s2p1_bos s2p1_map_l s2p1_map_r sai_out_cfg0 0xb2 p2s_b_str p2s_lr_l sdatao_act p2s_msb p2s_dfm p2s_mmd sai_out_cfg1 0xb3 p2s_dlen p2s_bos p2s_map_l p2s_map_r sai_in2_cfg0 0xb4 s2p2_b_str s2p2_lr_l reserved s2p2_msb s2p2_dfm s2p2_mmd sai_in2_cfg1 0xb5 s2p2_dlen s2p2_bos s2p2_map_l s2p2_map_r auifshare 0xb6 reserved share_bilr srcinsel 0xb7 src1_insel src2_insel mute_srcu reserved p2sdata 0xb8 reserved p2s_hfs p2s1_dsel p2s2_dsel pllcfg0 0xc0 pll_dprog pll_fr _ctrl pll_ddis pll_idf pllcfg1 0xc1 pll_frac[15:8] pllcfg2 0xc2 pll_frac[7:0] pllcfg3 0xc3 pll_strb pll _strbbyp pll_ndiv pllpfe 0xc4 pll_byp _unl biclk2pll pll_pwdn pll _nopddiv reserved pllst 0xc5 pll_unlock pll_pwd_st pll_byp_st reserved adccfg0 0xc6 adc_pga adc_insel adc_stby adc_bypcal clk_adc_on reserved ckocfg 0xc7 clkout_dis clkout_sel clk_ffx_on clk_src_on clk_proc _on eapwm_dis pwm00act misc 0xc8 osc_dis s2p_fs_rng adc_fs_rng p2p_in_adc clkcore _on table 34. register summary (continued) registeraddr76543210
register description STA321 80/157 doc id 15351 rev 3 pllb 0xc9 pll_byp reserved adc_clksel reserved p2s1 _clksel reserved p2s2 _clksel reserved hpdet1 0xca hpd_sel hpd_pol hpd_act_mode hpd_hpmod hpd_tim_f hpdet2 0xcb e_hp2 e_hp1 tud_en reserved e_hpdet1 e_hpdet2 hpdst 0xcc hpd_det _filt reserved stby_modes 0xcd pad_pulldis reserved cmp_en_n dc_stby _en_n adccfg1 0xce adc_ana_sel reserved pfefault 0xcf reserved pfe1 pfe2 pfe3 reset_ea _ft reset_cb _ft bistrun0 0xd0 sf1_brun sf2_brun ss1_brun ss2_brun cf_brun pr_brun cf_rom _brun reserved bistrun1 0xd1 os_brun db_brun reserved bistst0 0xd2 sf1_bend sf1_bbad sf1_bfail sf2_bend sf2_bbad sf2_bfail ss1_bend ss1_bbad bistst1 0xd3 ss1_bfail ss2_bend ss2_bbad ss2_bfail cf_bend cf_bbad cf_bfail pr_bend bistst2 0xd4 pr_bbad pr_bfail os_bend os_bbad os_bfail db_bend db_bbad db_bfail bistst3 0xd5 cf_rom _bend reserved romsign0 0xd6 cf_roms[7:0] romsign1 0xd7 cf_roms[15:8] romsign2 0xd8 cf_roms[23:16] debug0 0xd9 dbgcko_on dbgcko_val padst0 0xf0 pad_rstn reserved pad_scl pad_sda pad_i2cdis reserved pad_stby padst1 0xf1 pad_mute pad_biclki pad_lrclki pad_sdatai pad_biclko pad_lrclko reserved table 34. register summary (continued) registeraddr76543210
STA321 register description doc id 15351 rev 3 81/157 f fxcfg1 address: 0x00 type: rw reset: 0xd0 description: 76543210 ea_stby cb_stby ea_trist ffx_ulck_pll cb_trist2 cb_trist1 cb_trist0 [7] ea_stby 0: the external bridge is active 1: the external bridge is in standby mode [6] cb_stby 0: the bridge is active 1: the bridge is in standby mode [5] ea_trist 0: normal behaviour 1: the external bridge is put in 3-state mode [4:3] ffx_ulck_pll: behavior of the ffx modulator in the event of the pll losing lock: 00: do nothing 01: ffx hard mute (equivalent to using pin mute) 10: ffx standby 11: ffx hard mute and noise-shaper reset [2] cb_trist2 0: the bridge is active 1: force cmos bridge out3 to 3-state [1] cb_trist1 0: the bridge is active 1: force cmos bridge out2 to 3-state [0] cb_trist0 0: normal behaviour 1: force cmos bridge out1 to 3-state
register description STA321 82/157 doc id 15351 rev 3 ffxcfg0 address: 0x01 type: rw reset: 0x07 description: 76543 2 1 0 mute3 mute2 mute1 mute0 pwm00_3a bad_in_m bad_cks_m mis_bick_m [7] mute3 0: normal behaviour 1: force the mute in the channel 3 [6] mute2 0: normal behaviour 1: force the mute in the channel 2 [5] mute1 0: normal behaviour 1: force the mute in the channel 1 [4] mute0 0: normal behaviour 1: force the mute in the channel 0 [3] pwm00_3a 0: output pwm00 is driven by ffx (default) 1: output pwm00 comes from ff x output pwm3a and is not sensitive to bridge power-down or 3-state states [2] bad_in_m depending on the bit 0 and bit 1 settings 0: mute with a ramp 1: mute instantaneously [1] bad_cks_m 0: ffx not muted 1: ffx muted if biclk and lrclk do not meet the specification [0] mis_bick_m 0: ffx not muted 1: ffx will be muted if biclk is missing
STA321 register description doc id 15351 rev 3 83/157 ffxcfg2 address: 0x02 type: rw reset: 0x2d description: note: particular care must be taken when bits ns_ord and pwm_freq are changed. to avoid any audible artifacts, these bits must be modified only with the following procedure: 1. mute STA321 processing. 2. change pwm_freq and/or ns_ord and set reset_noish = 1. 3. configure reset_noish = 0. 4. unmute STA321 processing. 76543210 reset_noish pwm_freq ns_ord[1:0] ea_tsft_on cb_tsft_on ea_pfdig cb_pfdig [7] reset_noish 1: a reset is forced to the noise-shaper block [6] pwm_freq 0: 4 f s (4*96 khz = 384 khz) 1: 8 fs (8*96 khz = 768 khz) [5:4] ns_ord[1:0] noise shape order 00: 3rd. order 01: 4th. order 10: 5th. order [3] ea_tsft_on 1: if there is a fault on the external bridge, it will be put in 3-state [2] cb_tsft_on 1: if there is a fault on the cmos bridge, it will be put in 3-state [1] ea_pfdig 1: enable the pop-free ramp of ea [0] cb_pfdig 1: enable the pop-free ramp of cb
register description STA321 84/157 doc id 15351 rev 3 pwmmap1 processing to pwm out mapping address: 0x03 type: rw reset: 0x08 description: 765432 1 0 cb1_map[2:0] cb2_map[2:0] cb3_map[2:1] [7:5] cb1_map[2:0] cb_pwm_1 channel mapping: 000: ch0-a 001: ch0-b 010: ch1-a 011: ch1-b 100: ch2-a 101: ch2-b 110: ch3-a 111: ch3-b [4:2] cb2_map[2:0] cb_pwm_2 channel mapping 000: ch0-a 001: ch0-b 010: ch1-a 011: ch1-b 100: ch2-a 101: ch2-b 110: ch3-a 111: ch3-b [1:0] cb3_map[2:1] cb_pwm_3 channel mapping (for bit 0 see register pwmmap2 ): 000: ch0-a 001: ch0-b 010: ch1-a 011: ch1-b 100: ch2-a 101: ch2-b 110: ch3-a 111: ch3-b
STA321 register description doc id 15351 rev 3 85/157 pwmmap2 address: 0x04 type: rw reset: 0xb9 description: 7 654321 0 cb3_map[0] pwm00_map[2:0] ea1a_map[2:0] ea1b_map[2] [7] cb3_map[0] cb_pwm_3 channel mapping (for bits 1 and 2 see register pwmmap1 ) [6:4] pwm00_map[2:0] pwm00 channel mapping: 000: ch0-a 001: ch0-b 010: ch1-a 011: ch1-b 100: ch2-a 101: ch2-b 110: ch3-a 111: ch3-b [3:1] ea1a_map[2:0] ea_pwm_1a channel mapping: 000: ch0-a 001: ch0-b 010: ch1-a 011: ch1-b 100: ch2-a 101: ch2-b 110: ch3-a 111: ch3-b [0] ea1b_map[2] ea_pwm_1b channel mapping (for bits 1and 0 see register pwmmap3 ) 000: ch0-a 001: ch0-b 010: ch1-a 011: ch1-b 100: ch2-a 101: ch2-b 110: ch3-a 111: ch3-b
register description STA321 86/157 doc id 15351 rev 3 pwmmap3 address: 0x05 type: rw reset: 0x77 description: eattf0 external bridge tristate time from fault address: 0x06 type: rw reset: 0x00 description: the tristate time is the time between fault deasserted and 3-state removed for the external bridge. it is calculated as eattf[15:0] * 41.66 s 7 6 543210 ea1b_map[1:0] ea2a_map[2:0] ea2b_map[2:0] [7:6] ea1b_map[1:0] ea_pwm_1b channel mapping (for bit 2 see register pwmmap2 ) [5:3] ea2a_map[2:0] ea_pwm_2a channel mapping: 000: ch0-a 001: ch0-b 010: ch1-a 011: ch1-b 100: ch2-a 101: ch2-b 110: ch3-a 111: ch3-b [2:0] ea2b_map[2:0] ea_pwm_2b channel mapping: 000: ch0-a 001: ch0-b 010: ch1-a 011: ch1-b 100: ch2-a 101: ch2-b 110: ch3-a 111: ch3-b 76543210 eattf[15:8] [7:0] eattf[15:8] msbs of the ea tristate time factor
STA321 register description doc id 15351 rev 3 87/157 eattf1 external bridge tristate time from fault address: 0x07 type: rw reset: 0x03 description: see also register eattf0 eattp0 external bridge tristate time from powerdown address: 0x08 type: rw reset: 0x00 description: this tristate time is the time between bridge powerdown removed and 3-state removed for the external bridge. it is calculated as eattp[15:0] * 41.66 s eattp1 external bridge tristate time from powerdown address: 0x09 type: rw reset: 0x03 description: see also register eattp0 76543210 eattf[7:0] [7:0] eattf[7:0] lsbs of ea tristate time factor 76543210 eattp[15:8] [7:0] eattp[15:8] msbs of ea 3-state time after power-up factor 76543210 eattp[7:0] [7:0] eattp[7:0] lsbs of ea 3-state time after power-up factor
register description STA321 88/157 doc id 15351 rev 3 cbttf0 cmos bridge tristate time from fault address: 0x0a type: rw reset: 0x00 description: the tristate time is the time between fault deasserted and 3-state removed for the cmos bridge. it is calculated as cbttf[15:0] * 41.66 s cbttf1 cmos bridge tristate time from fault address: 0x0b type: rw reset: 0x02 description: see also register cbttf0 cbttp0 cmos bridge tristate time from powerdown address: 0x0c type: rw reset: 0x00 description: this tristate time is the time between bridge powerdown removed and 3-state removed for the cmos bridge. it is calculated as cbttp[15:0] * 41.66 s 76543210 cbttf[15:8] [7:0] cbttf[15:8] msbs of cb 3-state time factor 76543210 cbttf[7:0] [7:0] cbttf[7:0] lsbs of cb 3-state time factor 76543210 cbttp[15:8] [7:0] cbttp[15:8] msbs of cb 3-state time after power-up factor
STA321 register description doc id 15351 rev 3 89/157 cbttp1 cmos bridge tristate time from powerdown address: 0x0d type: rw reset: 0x02 description: see also register cbttp0 ffxst address: 0x0e type: ro reset: 0xc0 description: 76543210 cbttp[7:0] [7:0] cbttp[7:0] lsbs of cb 3-state time after power-up factor 7 6 5432 1 0 ea_mpwm cb_mpwm earmp_st[1:0] cbrmp_st[1:0] eabinss_ac cbbinss_ac [7] ea_mpwm 1: ea is in mute [6] cb_mpwm 1: cb is in mute [5:4] earmp_st[1:0] : pop free ramp status 00: parked 11: ready 10: going to park 01: going to ready [3:2] cbrmp_st[1:0]: pop free ramp status 00: parked 11: ready 10: going to park 01: going to ready [1] eabinss_ac 1: ramp active (going to park or ready) [0] cbbinss_ac 1: ramp active (going to park or ready)
register description STA321 90/157 doc id 15351 rev 3 powst status register fo r external amplifier address: 0x0f type: ro reset: 0x05 description: powst1 status register for cmos bridge address: 0x10 type: ro reset: 0x47 description: 76543210 reserved ea_tw ea_pd ea_ft ea_ts [7:4] reserved [3] ea_tw 1: ea thermal warning [2] ea_pd 1: ea power-down [1] ea_ft 1: ea is in fault [0] ea_ts 1: ea is in 3-state 76543210 reserved cb_pd cb_ft[2:0] cb_ts[2:0] [7] reserved [6] cb_pd 1: cmos bridge is in power-down [5:3] cb_ft[2:0] xx1: cmos bridge channel 1 is in fault x1x: cmos bridge channel 2 is in fault 1xx: cmos bridge channel 3 is in fault [2:0] cb_ts[2:0] xx1: cmos bridge channel 1 is in 3-state x1x: cmos bridge channel 2 is in 3-state 1xx: cmos bridge channel 3 is in 3-state
STA321 register description doc id 15351 rev 3 91/157 pwmo1cfg0 address: 0x11 type: rw reset: 0x20 description: pwmo1cfg1 address: 0x12 type: rw reset: 0x00 description: configuration for pwm-a 7 6 5 4 3210 azpls_1 ternary_1 halfb_1 mp_zero_1 min_pls_1[3:0] [7] azpls_1 1: avoid zero pulse [6] ternary_1 1: ternary modulation [5] halfb_1 1: 1b is modulated as null signal [4] mp_zero_1 1: apply the minimum pulse settings also for values near 0 [3:0] min_pls_1[3:0] minimum pulse length = clock period * (min_pls_1 + 1) 76543210 pm_1a[1:0] ps_1a[5:0] [7:6] pm_1a[1:0]: pwm mode 00: generate a rising edge using a down carrier 01: generate a falling edge using an up carrier 10: hybrid mode: alternation of modes 00 and 01 11: hybrid mode: alternation of modes 01 and 00 [5:0] ps_1a[5:0]: pwm shift the pwm waveform could be shifted by (ps_1a * clock period / 64)
register description STA321 92/157 doc id 15351 rev 3 pwmo1cfg2 address: 0x13 type: rw reset: 0x48 description: configuration for pwm-b pwmo2cfg0 address: 0x14 type: rw reset: 0x20 description: 76543210 pm_1b[1:0] ps_1b[5:0] [7:6] pm_1b[1:0]: pwm mode 00: generate a rising edge using a down carrier 01: generate a falling edge using an up carrier 10: ibrid mode: alternation of modes 00 and 01 11: ibrid mode: alternation of modes 01 and 00 [5:0] ps_1b[5:0]: pwm shift the pwm waveform could be shifted by (ps_1b * clock period / 64) 7 6 5 4 3210 azpls_2 ternary_2 halfb_2 mp_zero_2 min_pls_2[3:0] [7] azpls_2 1: avoid zero pulse [6] ternary_2 1: ternary modulation [5] halfb_2 1: 2b is modulated as null signal [4] mp_zero_2 1: apply the minimum pulse settings also for values near 0 [3:0] min_pls_2[3:0] minimum pulse length = clock period * (min_pls_2 + 1)
STA321 register description doc id 15351 rev 3 93/157 pwmo2cfg1 address: 0x15 type: rw reset: 0x10 description: pwmo2cfg2 address: 0x16 type: rw reset: 0x58 description: 76543210 pm_2a[1:0] ps_2a[5:0] [7:6] pm_2a[1:0]: pwm mode 00: generate a rising edge using a down carrier 01: generate a falling edge using an up carrier 10: hybrid mode: alternation of modes 00 and 01 11: hybrid mode: alternation of modes 01 and 00 [5:0] ps_2a[5:0]: pwm shift the pwm waveform could be shifted by (ps_2a * clock period / 64) 76543210 pm_2b[1:0] ps_2b[5:0] [7:6] pm_2b[1:0]: pwm mode 00: generate a rising edge using a down carrier 01: generate a falling edge using an up carrier 10: hybrid mode: alternation of modes 00 and 01 11: hybrid mode: alternation of modes 01 and 00 [5:0] ps_2b[5:0]: pwm shift the pwm waveform could be shifted by (ps_2b * clock period / 64)
register description STA321 94/157 doc id 15351 rev 3 pwmo3cfg0 address: 0x17 type: rw reset: 0x00 description: pwmo3cfg1 address: 0x18 type: rw reset: 0x20 description: 7 6 5 4 3210 azpls_3 ternary_3 halfb_3 mp_zero_3 min_pls_3[3:0] [7] azpls_3 1: avoid zero pulse [6] ternary_3 1: ternary modulation [5] halfb_3 1: 3b is modulated as null signal [4] mp_zero_3 1: apply the minimum pulse settings also for values near 0 [3:0] min_pls_3[3:0] minimum pulse length = clock period * (min_pls_3 + 1) 76543210 pm_3a[1:0] ps_3a[5:0] [7:6] pm_3a[1:0]: pwm mode 00: generate a rising edge using a down carrier 01: generate a falling edge using an up carrier 10: hybrid mode: alternation of modes 00 and 01 11: hybrid mode: alternation of modes 01 and 00 [5:0] ps_3a[5:0]: pwm shift the pwm waveform could be shifted by (ps_3a * clock period / 64)
STA321 register description doc id 15351 rev 3 95/157 pwmo3cfg2 address: 0x19 type: rw reset: 0x68 description: pwmo4cfg0 address: 0x1a type: rw reset: 0x00 description: 76543210 pm_3b[1:0] ps_3b[5:0] [7:6] pm_3b[1:0]: pwm mode 00: generate a rising edge using a down carrier 01: generate a falling edge using an up carrier 10: hybrid mode: alternation of modes 00 and 01 11: hybrid mode: alternation of modes 01 and 00 [5:0] ps_3b[5:0]: pwm shift the pwm waveform could be shifted by (ps_3b * clock period / 64) 7 6 5 4 3210 azpls_4 ternary_4 halfb_4 mp_zero_4 min_pls_4[3:0] [7] azpls_4 1: avoid zero pulse [6] ternary_4 1: ternary modulation [5] halfb_4 1: 4b is modulated as null signal [4] mp_zero_4 1: apply the minimum pulse settings also for values near 0 [3:0] min_pls_4[3:0] minimum pulse length = clock period * (min_pls_4 + 1)
register description STA321 96/157 doc id 15351 rev 3 pwmo4cfg1 address: 0x1b type: rw reset: 0x30 description: pwmo4cfg2 address: 0x1c type: rw reset: 0x78 description: 76543210 pm_4a[1:0] ps_4a[5:0] [7:6] pm_4a[1:0]: pwm mode 00: generate a rising edge using a down carrier 01: generate a falling edge using an up carrier 10: hybrid mode: alternation of modes 00 and 01 11: hybrid mode: alternation of modes 01 and 00 [5:0] ps_4a[5:0]: pwm shift the pwm waveform could be shifted by (ps_4a * clock period / 64) 76543210 pm_4b[1:0] ps_4b[5:0] [7:6] pm_4b[1:0]: pwm mode 00: generate a rising edge using a down carrier 01: generate a falling edge using an up carrier 10: hybrid mode: alternation of modes 00 and 01 11: hybrid mode: alternation of modes 01 and 00 [5:0] ps_4b[5:0]: pwm shift the pwm waveform could be shifted by (ps_4b * clock period / 64)
STA321 register description doc id 15351 rev 3 97/157 cb_pframp1 address: 0x20 type: rw reset: 0x14 description: cb_pframp2 address: 0x21 type: rw reset: 0x80 description: initial value of the ramp signal cb_pframp3 address: 0x22 type: rw reset: 0x3c description: 76543210 cbrmp_mp[5:0] reserved [7:2] cbrmp_mp[5:0] minimum pulse width of the pdm signal [1:0] reserved 76543210 cbrmpini[15:8] [7:0] cbrmpini[15:8] msbs of cb ramp init 76543210 cbrmpini[7:0] [7:0] cbrmpini[7:0] lsbs of cb ramp init
register description STA321 98/157 doc id 15351 rev 3 cb_pframp4 address: 0x23 type: rw reset: 0x10 description: cb_pframp5 address: 0x24 type: rw reset: 0x14 description: during the ramp, if the signal is below the threshold, the signal is modulated with pdm, otherwise with pwm cb_pframp6 address: 0x25 type: rw reset: 0x00 description: during the ramp, if the signal is below the threshold, the signal is modulated with pdm, otherwise with pwm 76543210 cbtim_rmp[3:0] reserved [7:4] cbtim_rmp[3:0] ea timing duration of the ramp (= slope) [3:0] reserved 76543210 cbrmpth[15:8] [7:0] cbrmpth[15:8] msbs of cb ramp threshold 76543210 cbrmpth[7:0] [7:0] cbrmpth[7:0] lsbs of cb ramp threshold
STA321 register description doc id 15351 rev 3 99/157 ea_pframp1 address: 0x26 type: rw reset: 0x1c description: ea_pframp2 address: 0x27 type: rw reset: 0x80 description: initial value of the ramp signal ea_pframp3 address: 0x28 type: rw reset: 0x60 description: 76543210 earmp_mp[5:0] reserved [7:2] earmp_mp[5:0] minimum pulse width of the pdm signal [1:0] reserved 76543210 earmpini[15:8] [7:0] earmpini[15:8] msbs of ea ramp init 76543210 earmpini[7:0] [7:0] earmpini[7:0] lsbs of ea ramp init
register description STA321 100/157 doc id 15351 rev 3 ea_pframp4 address: 0x29 type: rw reset: 0x10 description: ea_pframp5 address: 0x2a type: rw reset: 0x80 description: during the ramp, if the signal is below the threshold, the signal is modulated with pdm, otherwise with pwm ea_pframp6 address: 0x2b type: rw reset: 0x60 description: during the ramp, if the signal is below the threshold, the signal is modulated with pdm, otherwise with pwm 76543210 eatim_rmp[3:0] reserved [7:4] eatim_rmp[3:0] ea timing duration of the ramp (= slope) [3:0] reserved 76543210 earmpth[15:8] [7:0] earmpth[15:8] msbs of ea ramp threshold 76543210 earmpth[7:0] [7:0] earmpth[7:0] lsbs of ea ramp threshold
STA321 register description doc id 15351 rev 3 101/157 src1state address: 0x30 type: ro reset: 0x8f description: values of f s based on the 96 khz as output frequency src2state address: 0x31 type: ro reset: 0x8f description: 76543210 src1_byp[1:0] src_1_lock src1_fisfo[4:0] [7:6] src1_byp[1:0] 00: input signal has f s < 78 khz 10: input signal has f s > 81 khz [5] src_1_lock 0: src target frequency not reached 1: src1 target frequency reached [4:0] src1_fisfo[4:0] msb fs_input / fs_output 76543210 src1_byp[1:0] src_1_lock src1_fisfo[4:0] [7:6] src2_byp[1:0] 00: input signal has f s < 78 khz 10: input signal has f s > 81 khz [5] src_2_lock 0: src target frequency not reached 1: src1 target frequency reached [4:0] src2_fisfo[4:0] msb fs_input / fs_output
register description STA321 102/157 doc id 15351 rev 3 i2cb0_top address: 0x51 type: rw reset: 0x00 description: i2cb0_mid address: 0x52 type: rw reset: 0x00 description: i2cb0_bot address: 0x53 type: rw reset: 0x00 description: 76543210 i2cb0[23:16] [7:0] i2cb0[23:16] msbs of coefficient b0 76543210 i2cb0[15:8] [7:0] i2cb0[15:8] middle bits of coefficient b0 76543210 i2cb0[7:0] [7:0] i2cb0[7:0] lsbs of coefficient b0
STA321 register description doc id 15351 rev 3 103/157 i2cb1_top address: 0x54 type: rw reset: 0x00 description: i2cb1_mid address: 0x55 type: rw reset: 0x00 description: i2cb1_bot address: 0x56 type: rw reset: 0x00 description: 76543210 i2cb1[23:16] [7:0] i2cb1[23:16] msbs of coefficient b1 76543210 i2cb1[15:8] [7:0] i2cb1[15:8] middle bits of coefficient b1 76543210 i2cb1[7:0] [7:0] i2cb1[7:0] lsbs of coefficient b1
register description STA321 104/157 doc id 15351 rev 3 i2cb2_top address: 0x57 type: rw reset: 0x00 description: i2cb2_mid address: 0x58 type: rw reset: 0x00 description: i2cb2_bot address: 0x59 type: rw reset: 0x00 description: 76543210 i2cb2[23:16] [7:0] i2cb2[23:16] msbs of coefficient b2 76543210 i2cb2[15:8] [7:0] i2cb2[15:8] middle bits of coefficient b2 76543210 i2cb2[7:0] [7:0] i2cb2[7:0] lsbs of coefficient b2
STA321 register description doc id 15351 rev 3 105/157 i2ca1_top address: 0x5a type: rw reset: 0x00 description: i2ca1_mid address: 0x5b type: rw reset: 0x00 description: i2ca1_bot address: 0x5c type: rw reset: 0x00 description: 76543210 i2ca1[23:16] [7:0] i2ca1[23:16] msbs of coefficient a1 76543210 i2ca1[15:8] [7:0] i2ca1[15:8] middle bits of coefficient a1 76543210 i2ca1[7:0] [7:0] i2ca1[7:0] lsbs of coefficient a1
register description STA321 106/157 doc id 15351 rev 3 i2ca2_top address: 0x5d type: rw reset: 0x00 description: i2ca2_mid address: 0x5e type: rw reset: 0x00 description: i2ca2_bot address: 0x5f type: rw reset: 0x00 description: 76543210 i2ca2[23:16] [7:0] i2ca2[23:16] msbs of coefficient a2 76543210 i2ca2[15:8] [7:0] i2ca2[15:8] middle bits of coefficient a2 76543210 i2ca2[7:0] [7:0] i2ca2[7:0] lsbs of coefficient a2
STA321 register description doc id 15351 rev 3 107/157 procctrl address: 0x60 type: ro reset: 0x00 description: start_addr2 address: 0x61 type: rw reset: 0x00 description: 76543210 reserved ra reserved wa w1 [7:4] reserved [3] ra 1: read all the biquad coefficients [2] reserved [1] wa 1: write/update all the biquad coefficients [0] w1 1: write/update the b0 coefficient 76543210 reserved i2cstart_a8 [7:1] reserved [0] i2cstart_a8 base address of the biquadratic to be updated (= address of coefficient b0)
register description STA321 108/157 doc id 15351 rev 3 start_addr1 address: 0x62 type: rw reset: 0x00 description: rom_remap address: 0x6f type: rw reset: 0x00 description: 76543210 i2cstart_a7_a0 [7:0] i2cstart_a7_a0 base address of the biquadratic to be updated (= address of the b0 coefficient) 76543210 reserved enab_pre3 enab_pre2 enab_pre1 enab_pre0 enab_post enab_prmix enab_delay [7] reserved [6] enab_pre3 0: pre scale value of channel 3 taken from ram 1: pre scale value of channel 3 taken from rom [5] enab_pre2 0: pre scale value of channel 2 taken from ram 1: pre scale value of channel 2 taken from rom [4] enab_pre1 0: pre scale value of channel 1 taken from ram 1: pre scale value of channel 1 taken from rom [3] enab_pre0 0: pre scale value of channel 0 taken from ram 1: pre scale value of channel 0 taken from rom [2] enab_post 0: post mix values taken from ram 1: post mix values taken from rom [1] enab_prmix 0: pre mix values taken from ram 1: pre mix values taken from rom [0] enab_delay 0: delay values taken from ram 1: delay values taken from rom
STA321 register description doc id 15351 rev 3 109/157 byp_en_ch0 address: 0x70 type: rw reset: 0x00 description: effs_en_ch0 address: 0x71 type: rw reset: 0x00 description: byp_en_ch1 address: 0x72 type: rw reset: 0x00 description: 76543210 reserved [7:0] reserved 76543210 reserved erom09 erom08 [7:2] reserved [1] erom09 1: enable de-emphasis eq on channel 0 [0] erom08 1: enable high-pass filter on channel 0 76543210 reserved [7:0] reserved
register description STA321 110/157 doc id 15351 rev 3 effs_en_ch1 address: 0x73 type: rw reset: 0x00 description: byp_en_ch2 address: 0x74 type: rw reset: 0x00 description: effs_en_ch2 address: 0x75 type: rw reset: 0x00 description: 76543210 reserved erom19 reserved [7:2] reserved [1] erom19 1: enable de-emphasis eq on channel 1 [0] reserved 76543210 reserved [7:0] reserved 76543210 reserved erom29 erom28 [7:2] reserved [1] erom29 1: enable de-emphasis eq on channel 2 [0] erom28 1: enable high-pass filter on channel 2
STA321 register description doc id 15351 rev 3 111/157 byp_en_ch3 address: 0x76 type: rw reset: 0x00 description: effs_en_ch3 address: 0x77 type: rw reset: 0x00 description: bass_sel0_r address: 0x78 type: rw reset: 0x00 description: 76543210 reserved [7:0] reserved 76543210 reserved erom39 reserved [7:2] reserved [1] erom39 1: enable de-emphasis eq on channel 3 [0] reserved 76543210 reserved bass_en0 bass_sel0 [7:6] reserved [5] bass_en0 0: bass eq of channel 0 is not active 1: bass eq of channel 0 is active [4:0] bass_sel0 select the gain of the bass filter from -12 db (00000) to +12 db using ta b l e 3 5 below
register description STA321 112/157 doc id 15351 rev 3 bass_sel1_r address: 0x79 type: rw reset: 0x00 description: bass_sel2_r address: 0x7a type: rw reset: 0x00 description: 76543210 reserved bass_en1 bass_sel1 [7:6] reserved [5] bass_en1 0: bass eq of channel 1 is not active 1: bass eq of channel 1 is active [4:0] bass_sel1 select the gain of the bass filter from -12 db (00000) to +12 db using ta b l e 3 5 below 76543210 reserved bass_en2 bass_sel2 [7:6] reserved [5] bass_en2 0: bass eq of channel 2 is not active 1: bass eq of channel 2 is active [4:0] bass_sel2 select the gain of the bass filter from -12 db (00000) to +12 db using ta b l e 3 5 below
STA321 register description doc id 15351 rev 3 113/157 bass_sel3_r address: 0x7b type: rw reset: 0x00 description: treb_sel0_r address: 0x7c type: rw reset: 0x00 description: 76543210 reserved bass_en3 bass_sel3 [7:6] reserved [5] bass_en3 0: bass eq of channel 3 is not active 1: bass eq of channel 3 is active [4:0] bass_sel3 select the gain of the bass filter from -12 db (00000) to +12 db using ta b l e 3 5 below 76543210 reserved treb_en0 treb_sel0 [7:6] reserved [5] treb_en0 0: treble eq of channel 0 is not active 1: treble eq of channel 0 is active [4:0] treb_sel0 select the gain of the treble filter from -12 db (00000) to +12 db using ta bl e 3 5 below
register description STA321 114/157 doc id 15351 rev 3 treb_sel1_r address: 0x7d type: rw reset: 0x00 description: treb_sel2_r address: 0x7e type: rw reset: 0x00 description: 76543210 reserved treb_en1 treb_sel1 [7:6] reserved [5] treb_en1 0: treble eq of channel 1 is not active 1: treble eq of channel 1 is active [4:0] treb_sel1 select the gain of the treble filter from -12 db (00000) to +12 db using ta bl e 3 5 below 76543210 reserved treb_en2 treb_sel2 [7:6] reserved [5] treb_en2 0: treble eq of channel 2 is not active 1: treble eq of channel 2 is active [4:0] treb_sel2 select the gain of the treble filter from -12 db (00000) to +12 db using ta bl e 3 5 below
STA321 register description doc id 15351 rev 3 115/157 treb_sel3_r address: 0x7f type: rw reset: 0x00 description: 76543210 reserved treb_en3 treb_sel3 [7:6] reserved [5] treb_en3 0: treble eq of channel 3 is not active 1: treble eq of channel 3 is active [4:0] treb_sel3 select the gain of the treble filter from -12 db (00000) to +12 db using ta bl e 3 5 below table 35. bass/treble filter gains used in register addresses 0x78 - 0x7f bass_selx treble_selx gain bass_selx treble_selx gain 11000 +12 - - 10111 +11 01011 -01 10110 +10 01010 -02 10101 +09 01001 -03 10100 +08 01000 -04 10011 +07 00111 -05 10010 +06 00110 -06 10001 +05 00101 -07 10000 +04 00100 -08 01111 +03 00011 -09 01110 +02 00010 -10 01101 +01 00001 -11 01100 +00 00000 -12
register description STA321 116/157 doc id 15351 rev 3 satch0cfg1 address: 0x90 type: rw reset: 0xff description: satch0cfg2 address: 0x91 type: rw reset: 0xff description: satch0cfg3 address: 0x92 type: rw reset: 0xff description: 76543210 sat_eq sat_ch0[22:16] [7] sat_eq 0: saturation value of every channel is independent 1: all the channels take the saturation value of channel 0 [6:0] sat_ch0[22:16] msbs of the absolute saturation value for channel 0. if the signal is above sat_ch0[22:0] then it is truncated 76543210 sat_ch0[15:8] [7:0] sat_ch0[15:8] middle bits of the saturation value for channel 0 if the signal is above sat_ch0[22:0] then it is truncated 76543210 sat_ch0[7:0] [7:0] sat_ch0[7:0] lsbs of the saturation value for channel 0 if the signal is above sat_ch0[22:0] then it is truncated
STA321 register description doc id 15351 rev 3 117/157 satch1cfg1 address: 0x93 type: rw reset: 0x00 description: satch1cfg2 address: 0x94 type: rw reset: 0x00 description: satch1cfg3 address: 0x95 type: rw reset: 0x00 description: 76543210 reserved sat_ch1[22:16] [7] reserved [6:0] sat_ch1[22:16] msbs of the absolute saturation value for channel 1. if the signal is above sat_ch1[22:0] then it is truncated, see also register bit satch0cfg1 [7] 76543210 sat_ch1[15:8] [7:0] sat_ch1[15:8] middle bits of the saturation value for channel 1 if the signal is above sat_ch1[22:0] then it is truncated, see also register bit satch0cfg1 [7] 76543210 sat_ch1[7:0] [7:0] sat_ch1[7:0] lsbs of the saturation value for channel 1 if the signal is above sat_ch1[22:0] then it is truncated, see also register bit satch0cfg1 [7]
register description STA321 118/157 doc id 15351 rev 3 satch2cfg1 address: 0x96 type: rw reset: 0x00 description: satch2cfg2 address: 0x97 type: rw reset: 0x00 description: satch2cfg3 address: 0x98 type: rw reset: 0x00 description: 76543210 reserved sat_ch2[22:16] [7] reserved [6:0] sat_ch2[22:16] msbs of the absolute saturation value for channel 2. if the signal is above sat_ch2[22:0] then it is truncated, see also register bit satch0cfg1 [7] 76543210 sat_ch2[15:8] [7:0] sat_ch2[15:8] middle bits of the saturation value for channel 2 if the signal is above sat_ch2[22:0] then it is truncated, see also register bit satch0cfg1 [7] 76543210 sat_ch2[7:0] [7:0] sat_ch2[7:0] lsbs of the saturation value for channel 2 if the signal is above sat_ch2[22:0] then it is truncated, see also register bit satch0cfg1 [7]
STA321 register description doc id 15351 rev 3 119/157 satch3cfg1 address: 0x99 type: rw reset: 0x00 description: satch3cfg2 address: 0x9a type: rw reset: 0x00 description: satch3cfg3 address: 0x9b type: rw reset: 0x00 description: 76543210 reserved sat_ch3[22:16] [7] reserved [6:0] sat_ch3[22:16] msbs of the absolute saturation value for channel 3. if the signal is above sat_ch3[22:0] then it is truncated, see also register bit satch0cfg1 [7] 76543210 sat_ch3[15:8] [7:0] sat_ch3[15:8] middle bits of the saturation value for channel 3 if the signal is above sat_ch3[22:0] then it is truncated, see also register bit satch0cfg1 [7] 76543210 sat_ch3[7:0] [7:0] sat_ch3[7:0] lsbs of the saturation value for channel 3 if the signal is above sat_ch3[22:0] then it is truncated, see also register bit satch0cfg1 [7]
register description STA321 120/157 doc id 15351 rev 3 volcfg address: 0xa0 type: rw reset: 0xf5 description: the register sets up the soft volume control mvol master volume control address: 0xa1 type: rw reset: 0x00 description: 76543210 svol_on3 svol_on2 svol_on1 svol_on0 tim_svol [7] svol_on3 0: volume on channel 3 is updated immediately 1: volume on channel 3 is updated gradually with a ramp [6] svol_on2 0: volume on channel 2 is updated immediately 1: volume on channel 2 is updated gradually with a ramp [5] svol_on1 0: volume on channel 1 is updated immediately 1: volume on channel 1 is updated gradually with a ramp [4] svol_on0 0: volume on channel 0 is updated immediately 1: volume on channel 0 is updated gradually with a ramp [3:0] tim_svol set the volume ramp; each vo lume step (0.5 db) takes (2 tim_svol / f s ) s 76543210 mvol [7:0] mvol master volume from 0 db to -127.5 db in 0.5 db steps (volume = mvol * 0.5 db)
STA321 register description doc id 15351 rev 3 121/157 volch0 channel 0 volume control address: 0xa2 type: rw reset: 0x48 description: volch1 channel 1 volume control address: 0xa3 type: rw reset: 0x48 description: volch2 channel 2 volume control address: 0xa4 type: rw reset: 0x48 description: 76543210 cvol0 [7:0] cvol0 channel 0 volume 36 db to -91.5 db in 0.5 db steps 76543210 cvol1 [7:0] cvol1 channel 1 volume 36 db to -91.5 db in 0.5 db steps 76543210 cvol2 [7:0] cvol2 channel 2 volume 36 db to -91.5 db in 0.5 db steps
register description STA321 122/157 doc id 15351 rev 3 volch3 channel 3 volume control address: 0xa5 type: rw reset: 0x48 description: sai_in1_cfg0 address: 0xb0 type: rw reset: 0xd2 description: 76543210 cvol3 [7:0] cvol3 channel 3 volume 36 db to -91.5 db in 0.5 db steps 76543210 s2p1_b_str s2p1_lr_l reserved s2p1_msb s2p1_dfm s2p1_mmd [7] s2p1_b_str biclk strobe 0: active_edge = rising, strb_edge = falling 1: active_edge = falling, strb_edge = rising [6] s2p1_lr_l lrclk strobe 0: left = 0, right = 1 1: left = 1, right = 0 [5] reserved [4] s2p1_msb msb first [3:1] s2p1_dfm[2:0] data format 000: left justified 001: i 2 s 010: right justified 100: pcm no-delay 101: pcm delay 111: dsp [0] s2p1_mmd master mode
STA321 register description doc id 15351 rev 3 123/157 sai_in1_cfg1 address: 0xb1 type: rw reset: 0x91 description: 76543210 s2p1_dlen s2p1_bos s2p1_map_l s2p1_map_r [7:6] s2p1_dlen data length 00: 8 bits 01: 16 bits 10: 24 bits 11: 32 bits [5:4] s2p1_bos biclk_os 00: biclk = 32 * f s 01: biclk = 64 * f s 10: biclk = 128 * f s 11: biclk = 256 * f s [3:2] s2p1_map_l map left 00: slot 0 01: slot 1 10: slot 2 11: slot 3 [1:0] s2p1_map_r map right 00: slot 0 01: slot 1 10: slot 2 11: slot 3
register description STA321 124/157 doc id 15351 rev 3 sai_out_cfg0 address: 0xb2 type: rw reset: 0xd3 description: 76543210 p2s_b_str p2s_lr_l sdatao_act p2s_msb p2s_dfm p2s_mmd [7] p2s_b_str biclk strobe 0: active_edge = rising, strb_edge = falling 1: active_edge = falling, strb_edge = rising [6] p2s_lr_l lrclk strobe 0: left = 0, right = 1 1: left = 1, right = 0 [5] sdata0_act 0: normal behavior 1: sdatao is disabled [4] p2s_msb msb first [3:1] p2s_dfm[2:0] data format 000: left justified 001: i 2 s 010: right justified 100: pcm no-delay 101: pcm delay 111: dsp [0] p2s_mmd master mode
STA321 register description doc id 15351 rev 3 125/157 sai_out_cfg1 address: 0xb3 type: rw reset: 0x91 description: 76543210 p2s_dlen p2s_bos p2s_map_l p2s_map_r [7:6] p2s_dlen data length 00: 08 bits 01: 16 bits 10: 24 bits 11: 32 bits [5:4] p2s_bos biclk_os 00: biclk = 32 * f s 01: biclk = 64 * f s 10: biclk = 128 * f s 11: biclk = 256 * f s [3:2] p2s_map_l map left 00: slot 0 01: slot 1 10: slot 2 11: slot 3 [1:0] p2s_map_r map right 00: slot 0 01: slot 1 10: slot 2 11: slot 3
register description STA321 126/157 doc id 15351 rev 3 sai_in2_cfg0 address: 0xb4 type: rw reset: 0xd2 description: 76543210 s2p2_b_str s2p2_lr_l reserved s2p2_msb s2p2_dfm s2p2_mmd [7] s2p2_b_str biclk strobe 0: active_edge = rising, strb_edge = falling 1: active_edge = falling, strb_edge = rising [6] s2p2_lr_l lrclk strobe 0: left = 0, right = 1 1: left = 1, right = 0 [5] reserved [4] s2p2_msb msb first [3:1] s2p2_dfm[2:0] data format 000: left justified 001: i 2 s 010: right justified 100: pcm no-delay 101: pcm delay 111: dsp [0] s2p2_mmd master mode
STA321 register description doc id 15351 rev 3 127/157 sai_in2_cfg1 address: 0xb5 type: rw reset: 0x91 description: 76543210 s2p2_dlen s2p2_bos s2p2_map_l s2p2_map_r [7:6] s2p2_dlen data length 00: 8 bits 01: 16 bits 10: 24 bits 11: 32 bits [5:4] s2p2_bos biclk_os 00: biclk = 32 * f s 01: biclk = 64 * f s 10: biclk = 128 * f s 11: biclk = 256 * f s [3:2] s2p2_map_l map left 00: slot 0 01: slot 1 10: slot 2 11: slot 3 [1:0] s2p2_map_r map right 00: slot 0 01: slot 1 10: slot 2 11: slot 3
register description STA321 128/157 doc id 15351 rev 3 auifshare address: 0xb6 type: rw reset: 0x00 description: srcinsel address: 0xb7 type: rw reset: 0x28 description: 76543210 reserved share_bilr [7:2] reserved [1:0] share_bilr 00: no clock sharing 01: sai_in1, sai_in2 share the clocks: biclki1 and lrclki1 (others are not used) sai1: can be master/slave (see config) sai2: always slave 10: sai_in1, sai_in2, sai_out share the clocks : biclki1 and lrclki1 (others arenot used) sai_out: can be master/slave (see config) sai1 and sai2: always slave 11: no clock sharing 76543210 src1_insel src2_insel mute_srcu reserved [7:6] src1_insel sample rate converter in channels 0 and 1: 00: serial audio interface in 1 01: adc 1x: serial audio interface in 2 [5:4] src2_insel sample rate converter in channels 2 and 3: 00: serial audio interface in 1 01: adc 1x: serial audio interface in 2 [3] mute_srcu0: 1: the device will be put in mute if the src is not locked at the 96 khz sample frequency [2:0] reserved
STA321 register description doc id 15351 rev 3 129/157 p2sdata address: 0xb8 type: rw reset: 0x00 description: 76543210 reserved p2s_hfs p2s1_dsel p2s2_dsel [7] reserved [6] p2s_hfs sai out: 0: 96 khz 1: half processing frequency (48 khz) [5:3] p2s1_dsel sai out 1 000: adc 001: sai in 1 010: sai in 2 011: src channels 0-1 100: src channels 2-3 101: processing channels 0 - 1 110: processing channels 2 - 3 [2:0] p2s2_dsel sai out 2 000: adc 001: sai in 1 010: sai in 2 011: src channels 0-1 100: src channels 2-3 101: processing channels 0 - 1 110: processing channels 2 - 3
register description STA321 130/157 doc id 15351 rev 3 pllcfg0 address: 0xc0 type: rw reset: 0x00 description: pllcfg1 address: 0xc1 type: rw reset: 0x00 description: see also section 5.3: fractional pll on page 31 76543210 pll_dprog pll_fr_ctrl pll_ddis pll_idf [7] 0: pll takes the internal settings 1: pll takes the register settings [6] pll_fr_ctrl 0: fractional frequency synthesis disabled 1: fractional frequency synthesis enabled [5:4] pll_ddis pll dither disable x0: triangular pdf dither input enabled x1: triangular pdf dither input disabled 0x: rectangular pdf dither input enabled 1x: rectrangular pdf dither input disabled [3:0] pll_idf set the input division factor of the pll (see section 5.3: fractional pll on page 31 ) 76543210 pll_frac[15:8] [7:0] pll_frac[15:8] the msbs of pll_frac[15:0] which is used to set the pll multiplication factor
STA321 register description doc id 15351 rev 3 131/157 pllcfg2 address: 0xc2 type: rw reset: 0x00 description: see also section 5.3: fractional pll on page 31 pllcfg3 address: 0xc3 type: rw reset: 0x00 description: see also section 5.3: fractional pll on page 31 76543210 pll_frac[7:0] [7:0] pll_frac[7:0] the lsbs of pll_frac[15:0] which is us ed to set the pll mu ltiplication factor 76543210 pll_strb pll_strbbyp pll_ndiv [7] pll_strb 0: normal behaviour 1: asynchronous strobe input, a new configurati on input is loaded into the fraction controller [6] pll_strbbyp 0: normal behaviour 1: bypass the strobe signal [5:0] pll_ndiv set the pll multiplication factor (integ ral part), loop division factor (ldf)
register description STA321 132/157 doc id 15351 rev 3 pllpfe address: 0xc4 type: rw reset: 0x80 description: pllst pll status address: 0xc5 type: ro reset: 0x00 description: 76543210 pll_byp_unl biclk2pll pll_pwdn pll_nopddiv reserved [7] pll_byp_unl 0: pll clock is not bypassed if it is unlock 1: pll clock is bypassed if it is unlock, the external clock is used as system clock [6] biclk2pll pll clock in selection 0: normal behaviour 1: biclki1 is used as pll clock source [5] pll_pwdn 0: normal behaviour 1: pll goes into power-down mode [4] pll_nopddiv 0: pll goes to power-down when the divider settings are changed 1: pll remains active when the divider settings are changed [3:0] reserved 76543210 pll_unlock pll_pwd_st pll_byp_st reserved [7] pll_unlock 0: normal behaviour 1: pll is not locked [6] pll_pwd_st 0: normal behaviour 1: pll is in power-down mode [5] pll_byp_st 0: pll is selected 1: pll is bypassed
STA321 register description doc id 15351 rev 3 133/157 adccfg0 address: 0xc6 type: rw reset: 0x00 description: [4:0] reserved 76543210 adc_pga adc_insel adc_stby adc_bypcal clk_adc_on reserved [7:5] adc_pga programmable gain amplifier: 000: 0 db 001: +6 db 010: +12 db 011: +18 db 100: +24 db 101: +30 db 110: +36 db 111: +42 db [4] adc_insel 0: line input mode selected 1: mike input mode selected [3] adc_stby 0: adc normal mode 1: adc standby mode for power reduction [2] adc_bypcal 0: dc-removal block enabled 1: bypass dc-removal block [1] clk_adc_on 0: adc clock disabled 1: adc clock active [0] reserved
register description STA321 134/157 doc id 15351 rev 3 ckocfg address: 0xc7 type: rw reset: 0x1c description: 76543210 clkout_dis clkout_sel clk_ffx_on clk_src_on clk_proc_on eapwm_dis pwm00act [7] clkout_dis 0: clkout is enabled 1: clkout is disabled [6:5] clkout_sel 00: system clock / 4 01: system clock / 2 10: system clock / 4 11: system clock / 8 [4] clk_ffx_on 0: ffx clock disabled 1: ffx clock active [3] clk_src_on 0: sample rate converter clock disabled 1: sample rate converter clock active [2] clk_proc_on 0: process block clock disabled 1: process block clock active [1] eapwm_dis 0: ea pwm output is enable 1: ea pwm output is disabled [0] pwm00act 0: output pwm00 is at logical 0 1: output pwm00 is active
STA321 register description doc id 15351 rev 3 135/157 misc address: 0xc8 type: rw reset: 0x20 description: 76543210 osc_dis s2p_fs_rng adc_fs_rng reserved clk_core_on [7] osc_dis 0: normal behaviour 1: xt oscillator is disabled [6:4] s2p_fs_rng serial audio interface sampling frequency, f s , range: 000: 8 - 12 khz (very low) 001: 16 - 24 khz (low) 010: 32 - 48 khz (normal) 011: 64 - 96 khz (high) 100: 128 - 192 khz (very high) [3:2] adc_fs_rng adc sampling frequency, f s , range: 00: 32 - 48 khz (normal) 01: 16 - 24 khz (low) 1x: 8 - 12 khz (very low) [1] reserved [0] clk_core_on 0: core clock disabled 1: core clock active
register description STA321 136/157 doc id 15351 rev 3 pllb address: 0xc9 type: rw reset: 0x80 description: see also figure 11: clock management scheme on page 29 76543210 pll_byp reserved adc_clksel reserved p2s1_clksel reserved p2s2_clksel reserved [7] pll_byp 0: pll not bypassed 1: pll bypassed [6] reserved [5] adc_clksel 0: clk_adc / 4 1: pll_clk_in [4] reserved [3] p2s1_clksel 0: processing clock 1: pll_clk_in [2] reserved [1] p2s2_clksel 0: processing clock 1: pll_clk_in [0] reserved
STA321 register description doc id 15351 rev 3 137/157 hpdet1 address: 0xca type: rw reset: 0x40 description: 76543210 hpd_sel hpd_pol hpd_act_mode hpd_hpmod hpd_tim_f [7] hpd_sel select the headphone detection threshold 0: hp1 1: hp2 [6] hpd_pol polarity of the detection signal [5:4] hpd_act_mode action to be done in case of detection: 00: inactive 01: mute ea and un-mute cb 10: 3-state ea and un-3-state cb 11: power-down ea and power-up cb [3] hpd_hpmod 0: normal behaviour 1: ffx is in headphone modulation mode [2:0] hpd_tim_f 000: 1.33 ms 001: 2.66 ms 010: 5.33 ms 011: 10.66 ms 100: 21.33 ms 101: 42.66 ms 110: 85.33 ms 111: 170.67 ms
register description STA321 138/157 doc id 15351 rev 3 hpdet2 address: 0xcb type: rw reset: 0xc0 description: hpdst headphone detection status address: 0xcc type: ro reset: 0x00 description: 76543210 e_hp2 e_hp1 tud_en reserved e_hpdet1 e_hpdet2 [7] e_hp2 0: headphone detection 2 is disabled 1: headphone detection 2 is enabled [6] e_hp1 0: headphone detection 1 is disabled 1: headphone detection 1 is enabled [5] tud_en 1: disable the pull-up resistor of the headphones detector [4:2] reserved [1] e_hpdet1 headphone 1 detector line (not filtered) [0] e_hpdet2 headphone 2 detector line (not filtered) 76543210 hpd_det_filt reserved [7] hpd_det_filt 0: no headphones 1: headphones detected [6:0] reserved
STA321 register description doc id 15351 rev 3 139/157 stby_modes address: 0xcd type: rw reset: 0x00 description: adccfg1 adc analog input selection address: 0xce type: rw reset: 0x00 description: 76543210 pad_pulldis reserved cmp_en_n dc_stby_en_ n [7] pad_pulldis 0: enable the pull (up/down) of the pads 1: disable the pull (up/down) of the pads [6:2] reserved [1] cmp_en_n 0: compensation cell is active 1: compensation cell goes into power-down mode when pin stby is asserted [0] dc_stby_en_n 0: dc regulators are active 1: dc regulators go into power-down mode when pin stby is asserted 76543210 adc_ana_sel reserved [7:6] adc_ana_sel 00: inl1, inr1 01: inl2, inr2 1x: reserved [5:0] reserved
register description STA321 140/157 doc id 15351 rev 3 pfefault address: 0xcf type: rw reset: 0x00 description: 76543210 reserved pfe1 pfe2 pfe3 reset_ea_ft reset_cb_ft [7:5] reserved [4] pfe1 0: analog pop free disabled on bridge output 1 1: analog pop free enabled bridge output 1 [3] pfe2 0: analog pop free disabled on bridge output 2 1: analog pop free enabled bridge output 2 [2] pfe3 0: analog pop free disabled on bridge output 3 1: analog pop free enabled bridge output 3 [1] reset_ea_ft 0: normal operation 1: reset register bit powst [1] [0] reset_cb_ft 0: normal operation 1: reset register bits powst1 [5:3]
STA321 register description doc id 15351 rev 3 141/157 bistrun0 bist control address: 0xd0 type: rw reset: 0x00 description: 76543210 sf1_brun sf2_brun ss1_brun ss2_brun cf_brun pr_brun cf_rom_brun reserved [7] sf1_brun src1 ram 0: normal functional mode 1: start the bist [6] sf2_brun src2 ram 0: normal functional mode 1: start the bist [5] ss1_brun src1 ram 0: normal functional mode 1: start the bist [4] ss2_brun src2 ram 0: normal functional mode 1: start the bist [3] cf_brun proc ram (coefficients) 0: normal functional mode 1: start the bist [2] pr_brun proc ram (program) 0: normal functional mode 1: start the bist [1] cf_rom_brun proc ram (coefficients) 0: normal functional mode 1: start the bist [0] reserved
register description STA321 142/157 doc id 15351 rev 3 bistrun1 address: 0xd1 type: rw reset: 0x00 description: bistst0 bist status register 0 address: 0xd2 type: ro reset: 0x00 description: 76543210 os_brun db_brun reserved [7] os_brun ffx ram 0: normal functional mode 1: start the bist [6] db_brun ffx ram 0: normal functional mode 1: start the bist [5:0] reserved 76543210 sf1_bend sf1_bbad sf1_bfail sf2_bend s f2_bbad sf2_bfail ss1_bend ss1_bbad [7] sf1_bend: for src1 ram bist 0: normal functional mode 1: bist is finished [6] sf1_bbad for src1 ram bist 0: no faults detected 1: at least one fault detected [5] sf1_bfail for src1 ram bist 0: no faults detected in the current location 1: at least one fault detected in the current location
STA321 register description doc id 15351 rev 3 143/157 [4] sf2_bend for src2 ram bist 0: normal functional mode 1: bist is finished [3] sf2_bbad for src2 ram bist 0: no faults detected 1: at least one fault detected [2] sf2_bfail for src2 ram bist 0: no faults detected in the current location 1: at least one fault detected in the current location [1] ss1_bend for src1 ram bist 0: normal functional mode 1: bist is finished [0] ss1_bbad for src1 ram bist 0: no faults detected 1: at least one fault detected
register description STA321 144/157 doc id 15351 rev 3 bistst1 bist status register 1 address: 0xd3 type: ro reset: 0x00 description: 76543210 ss1_bfail ss2_bend ss2_bbad ss2_bfail cf_bend cf_bbad cf_bfail pr_bend [7] ss1_bfail for src1 ram bist 0: no faults detected in the current location 1: at least one fault detected in the current location [6] ss2_bend: for src2 ram bist 0: normal functional mode 1: bist is finished [5] ss2_bbad for src2 ram bist 0: no faults detected 1: at least one fault detected [4] ss2_bfail for src2 ram bist 0: no faults detected in the current location 1: at least one fault detected in the current location [3] cf_bend: for proc ram bist 0: normal functional mode 1: bist is finished [2] cf_bbad for proc ram bist 0: no faults detected 1: at least one fault detected [1] cf_bfail for proc ram bist 0: no faults detected in the current location 1: at least one fault detected in the current location [0] pr_bend: for proc ram bist 0: normal functional mode 1: bist is finished
STA321 register description doc id 15351 rev 3 145/157 bistst2 bist status register 2 address: 0xd4 type: ro reset: 0x00 description: 76543210 pr_bbad pr_bfail os_bend os_bbad os_bfail db_bend db_bbad db_bfail [7] pr_bbad for proc ram bist 0: no faults detected 1: at least one fault detected [6] pr_bfail for proc ram bist 0: no faults detected in the current location 1: at least one fault detected in the current location [5] os_bend: for ffx ram bist 0: normal functional mode 1: bist is finished [4] os_bbad for ffx ram bist 0: no faults detected 1: at least one fault detected [3] os_bfail for ffx ram bist 0: no faults detected in the current location 1: at least one fault detected in the current location [2] db_bend: for ffx ram bist 0: normal functional mode 1: bist is finished [1] db_bbad for ffx ram bist 0: no faults detected 1: at least one fault detected [0] db_bfail for ffx ram bist 0: no faults detected in the current location 1: at least one fault detected in the current location
register description STA321 146/157 doc id 15351 rev 3 bistst3 bist status register 3 address: 0xd5 type: ro reset: 0x00 description: 76543210 cf_rom_bend reserved [7] cf_rom_bend rom bist computation is finished [6:0] reserved
STA321 register description doc id 15351 rev 3 147/157 romsign0 rom bist signature (lsbs) address: 0xd6 type: ro reset: 0x00 description: romsign1 rom bist signature (middle bits) address: 0xd7 type: ro reset: 0x00 description: romsign2 rom bist signature (msbs) address: 0xd8 type: ro reset: 0x00 description: 76543210 cf_roms[7:0] [7:0] cf_roms[7:0] lsbs of rom bist signature cf_roms[23:0] 76543210 cf_roms[15:8] [7:0] cf_roms[15:8] middle bits of rom bist signature cf_roms[23:0] 76543210 cf_roms[23:16] [7:0] cf_roms[23:16] msbs of rom bist signature cf_roms[23:0]
register description STA321 148/157 doc id 15351 rev 3 debug0 address: 0xd9 type: rw reset: 0x00 description: 76543210 dbgcko_on dbgcko_val [7] dbgcko_on 0: normal behaviour 1: clkout exports internal clocks as defined by bits dbgcko_val [6:0] dbgcko_val 0x00: invalid_inp_fbk 0x01: mute_int_fbk 0x02: binss_fbk 0x21: debug_start 0x22: debug_data_end 0x23: debug_data_ok 0x24: debug_lrclk_old 0x25: debug_biclk 0x40: clk_proc 0x41: clk_src 0x42: clk_ffx 0x50: src_1_lock 0x51: src_2_lock 0x52: src_1_bypass_state[0] 0x53: src_1_bypass_state[1] 0x54: src_2_bypass_state[0] 0x55: src_2_bypass_state[1] 0x56: pwm_sync 0x57: s2p_1_bad_clocks 0x58: s2p_2_bad_clocks 0x59: s2p_1_missing_biclk all other values: no clock exported
STA321 register description doc id 15351 rev 3 149/157 padst0 pad status 0 address: 0xf0 type: ro reset: 0xa0 description: padst1 address: 0xf1 type: rw reset: 0x74 description: 76543210 pad_rstn reserved pad_scl pad_sda pad_i2cdis reserved pad_stby [7] pad_rstn [6] reserved [5] pad_scl [4] pad_sda [3] pad_i2cdis [2:1] reserved [0] pad_stby 76543210 pad_mute pad_biclki pad_lrclki pad_sdatai pad_biclko pad_lrclko reserved [7] pad_mute [6] pad_biclki [5] pad_lrclki [4] pad_sdatai [3] pad_biclko [2] pad_lrclko [1:0] reserved
i 2 c disabled (microless) mode STA321 150/157 doc id 15351 rev 3 15 i 2 c disabled (microless) mode figure 55. microless mode block diagram in microless mode (i2cdis = 1) the i 2 c interface is inhibited and sda and scl are used as static inputs. the device is working in the configuration shown in figure 55 with the adc connected to input line 1 and to sai out. the processing chain uses the inputs from sai input 1. the working modes are selected via the logical levels on the inputs sda, scl as follows: z scl = 0 : cmos bridge outputs come from digital input serial audio interface; scl = 1 : cmos bridge outputs come from analog adc input. z sda = 0 : external amplifier outputs come from digital input serial audio interface; sda = 1 : external amplifier outputs come from analog adc input. at power-up the channel volume is set to -60 db. the volume is controlled by pulsing the inputs lrclko and biclko as follows: z when pulsing lrclko = 1 and biclko = 1 simu ltaneously the channel volume is set to 0 db. z any lrclko = 1 pulse causes a channel volume decrease of 0.5 db. z any biclko = 1 pulse causes a channel volume increase of 0.5 db. the channel volume change applies only to the external amplifier. the digital output serial audio interface is always fed with the result of the adc conversion with no volume control (line-out mode). it is in master mode when scl = 1 and sda = 1 otherwise it is in slave m ode. it is configured in i 2 s format. the lrclk and biclk signals are shared between input and output sai. 4-channel sample rate converter vol ctrl ffx? modulator input sai osc pll divider output sai cmos bridge adc v_bias vcm vhi vlo biclki1 lrclki1 sdatai1 inl1 inr1 biclki2 lrclki2 sdatai2 inl2 inr2 sdatao1 biclko lrclko stby tm eapwm4 eapwm3 eapwm2 eapwm1 out1 out2 out3 pwm00 eaftn eatsn eapdn rstn xto xti mclk clkout mute sda scl i2cdis = 1 reg_byp aclk
STA321 i 2 c disabled (microless) mode doc id 15351 rev 3 151/157 the input sampling frequency must be between 32 khz and 48 khz and the master clock input (mclk or xti) must be 256 * f s . the cmos bridge ffx output is configured in line-out mode: z left channel binary on out1 z right channel binary on out2 z zero signal binary (duty cycle 50%) on out3 z pop-free digital ramp active z volume control not effective (always 0 db) z switching frequency 384 khz. the external amplifier ffx output is configured in btl mode: z left channel btl (new ternary modulation) on eapwm1 and eapwm2 z right channel btl (new ternary modulation) on eapwm1 and eapwm2 z volume control is effective z switching frequency 384 khz. the headphone detection is disabled. the clkout pad is active at the pll frequency of 2048 * f s .
package mechanical data STA321 152/157 doc id 15351 rev 3 16 package mechanical data the STA321 comes in a 64-pin, 10 mm x 10 mm, lqfp, exposed pad down (epd) package. the reference number is jedec ms-026-bcd-hd. in order to meet environmental requirements, st offers these devices in different grades of ecopack ? packages, depending on their level of environmental compliance. ecopack ? specifications, grade definitions and product status are available at: www.st.com . ecopack ? is an st trademark. figure 56. lqfp-64l epd outline drawing
STA321 package mechanical data doc id 15351 rev 3 153/157 table 36. lqfp-64l epd dimensions symbol dimensions in mm dimensions in inches notes min typ max min typ max a --1.60--0.063- a1 0.05 - 0.15 0.002 - 0.006 - a2 1.35 1.40 1.45 0.053 0.055 0.057 - b 0.17 0.22 0.27 0.007 0.009 0.011 - c 0.09 - 0.20 0.004 - 0.008 - d 11.80 12.00 12.20 0.465 0.472 0.480 - d1 9.80 10.00 10.20 0.386 0.394 0.402 - d3 -7.50--0.295-- e 11.80 12.00 12.20 0.465 0.472 0.480 - e1 9.80 10.00 10.20 0.386 0.394 0.402 - e3 -7.50--0.295-- e - 0.50 - - 0.020 - - h - 5.89 - - 0.232 - - l 0.45 0.60 0.75 0.018 0.024 0.030 - l1 -1.00--0.039-- s 6.00 - - 0.236 - - exposed pad s1 6.00 - - 0.236 - - exposed pad ccc --0.08--0.003- k 0 3.5 7.0 0 3.5 7.0 degrees
glossary STA321 154/157 doc id 15351 rev 3 17 glossary total harmonic distortion + noise (thdn) the ratio of the rms value of all the spectral components in the specified band (20 hz - 20 khz) to the rms values of the signal fundamental component. thdn is measured at 0 dbfs input at a frequency of 1 khz. signal to noise plus distortion ratio (sndr) ratio between power of signal fundamental component and ?noise+distortion?. it is measured at different input levels: 0 dbfs, -3 dbfs, -6 dbfs, -10 dbfs, -20 dbfs, -40 dbfs, -60 dbfs. when the signal amplitude is less than 0 dbfs, that much db is added to obtain the final snr. for example, if sndr is 87 db with -6dbfs signal, then snr = 87 + 6 = 93 db. dynamic range (dr) dynamic range is measured using sndr at -60 d bfs, 1 khz signal an d adding 60 db. for example, if sndr with -60 dbfs is 38 db then the dynamic range is 38 + 60 = 98 db. crosstalk crosstalk is the measure of the inter-channel isolation between the left and right channels of a stereo system. it is measured at each output with zero input to the channel under test and a full-scale input applied to the other channel. deviation from linear phase measurement bandwidth 20 hz to 20 khz, f s = 48 khz. the measurement takes into account the combined digital and analog filter characteristics. pass band, pass-band ripple, stop band, stop-band attenuation these parameters take into account both analog and digital filter characteristics. stop-band attenuation should be measured between 0.55 * f s and 3.45 * f s .
STA321 trademarks and other acknowledgements doc id 15351 rev 3 155/157 18 trademarks and other acknowledgements soundterminal, ffx and pfstart are trademarks of stmicroelectronics. ecopack is a registered trademark of stmicroelectronics.
revision history STA321 156/157 doc id 15351 rev 3 19 revision history table 37. document revision history date revision changes 27-mar-2009 1 initial release. 11-may-2009 2 updated table 1: device summary on page 1 added ambient temperature to table 5: recommended operating conditions on page 13 updated table 6: electrical specifications on page 14 updated resistor to 32 ? in figure 3: test circuit on page 17 updated and moved headphone detector threshold limits table from chapter 12 on page 72 and merged into table 6: electrical specifications on page 14 updated hpdet2 bitfield in table 34: register summary on page 77 updated description of register hpdet2 on page 138 30-oct-2009 3 updates to feature list on page 1 updated chapter 1: overview on page 9 updated chapter 16: package mechanical data on page 152
STA321 doc id 15351 rev 3 157/157 please read carefully: information in this document is provided solely in connection with st products. stmicroelectronics nv and its subsidiaries (?st ?) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described he rein at any time, without notice. all st products are sold pursuant to st?s terms and conditions of sale. purchasers are solely responsible for the choice, selection and use of the st products and services described herein, and st as sumes no liability whatsoever relating to the choice, selection or use of the st products and services described herein. no license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. i f any part of this document refers to any third party products or services it shall not be deemed a license grant by st for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoev er of such third party products or services or any intellectual property contained therein. unless otherwise set forth in st?s terms and conditions of sale st disclaims any express or implied warranty with respect to the use and/or sale of st products including without limitation implied warranties of merchantability, fitness for a parti cular purpose (and their equivalents under the laws of any jurisdiction), or infringement of any patent, copyright or other intellectual property right. unless expressly approved in writing by an authorized st representative, st products are not recommended, authorized or warranted for use in milita ry, air craft, space, life saving, or life sustaining applications, nor in products or systems where failure or malfunction may result in personal injury, death, or severe property or environmental damage. st products which are not specified as "automotive grade" may only be used in automotive applications at user?s own risk. resale of st products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by st for the st product or service described herein and shall not create or extend in any manner whatsoev er, any liability of st. st and the st logo are trademarks or registered trademarks of st in various countries. information in this document supersedes and replaces all information previously supplied. the st logo is a registered trademark of stmicroelectronics. all other names are the property of their respective owners. ? 2009 stmicroelectronics - all rights reserved stmicroelectronics group of companies australia - belgium - brazil - canada - china - czech republic - finland - france - germany - hong kong - india - israel - ital y - japan - malaysia - malta - morocco - philippines - singapore - spain - sweden - switzerland - united kingdom - united states of america www.st.com


▲Up To Search▲   

 
Price & Availability of STA321

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X