Distributor Training
2017-09-20
Contents
•
VS1005 Hi-Res Recorder
•
VSOS Overview
•
VSOS Shell and Some New Commands
•
VSOS Audio Drivers
•
How to Get Pre-Programmed VS1005s
VS1005 HiRes Recorder: Main Specs
•
Demonstration Hardware:
• VS1005g Developer Board v1.8
• VS1005g's Line Inputs
• VS1005g's Line / Earphone outputs
• SD Card
• Buttons
• VS1005g Dev. Board Extension 1
• 1.77” colour LCD
• Control wheel with 5 buttons
VS1005 Hi-Res Recorder: Demonstration Hardware
•
Demonstration Hardware:
• VS1005g Developer Board v1.8
• VS1005g
• SD Card
• External SPI flash
• VS1005g Dev. Board Extension 1
• 1.77” colour LCD
• Control wheel with 5 buttons
VS1005 Hi-Res Recorder: Sound Quality
•
Sample rates:
• 96 kHz (high-resolution), frequency response 20-42000 Hz • 48 kHz (CD quality), frequency response 20-21000 Hz
• 24 kHz (voice quality)
•
Bit depth:
• 24 bits (high-resolution), dynamic range approx. 98 dB(A) with VS1005's own ADCs
• 16 bits (CD quality), dynamic range approx. 96 dB(A) with VS1005's own ADCs
VS1005 Hi-Res Recorder: Features
•
Records directly to SD card in WAV format.
•
Uses VS23S040 as 512 KiB (4 Mi-bit) audio buffer.
•
External I2S ADC can be used for higher performance.
•
Extremely robust:
• Uses battery-backed RAM for bookkeeping while recording. • If there is a sudden power loss while recording, the file system
does NOT GET CORRUPTED!
• The next time the recorder is started, the recording is rescued automatically!
VSOS Shell
•
UART-controlled interface to VSOS
•
Much like DOS Prompt
•
Can be used for testing and developing a system using a terminal
emulation program on a PC
•
Can be used as an interface between a microcontroller and VS1005
•
Makes it easy to load / unload drivers, and run applications
•
Documentation available in VSOS Root and Libraries Source Code
package: docs/VSOS_Shell_vXXX.pdf
•
VSOS Audio document is also available is same package:
docs/VSOS_Audio_vXXX.pdf
Frags
Tasks
•
Tasks
• Task state • Stack frame • Stack depth • Call tree•
Timer queues
• Tasks that have queues
•
Interrupts
SetClock
AuInput
AuOutput
Format, FatInfo, DiskFree
•
Format:
• Formats a disk drive into FAT32 format.
• Makes it possible to use SD cards larger than 32 GB:
• Microsoft Windows and many portable devices automatically formats SD cards larger than 32 GB to proprietary exFAT.
• Most devices can still use FAT32-formatted disks.
•
FatInfo:
• Gives useful debug information of a FAT32 file system. • Allows reading individual RAW disk blocks from a drive.
•
DiskFree:
• Tells how much there is free space on a disk. • Optionally can show more verbose information.
config.txt
•
config.txt
•
Executed at boot time
•
Sets up the system:
• Loads drivers and libraries; they stay in memory after loading
• May run applications with the “RUN” command, they are removed from memory after execution
•
May contain different configurations for different start-up conditions
VSOS Audio Drivers: Analog Input and Output
•
Analog input: AUIADC.DL3
• Can select between Line inputs / Mic inputs / RF input • 8, 24, 48, 96, or 192 kHz
• 16-bit / 32-bit at all sample rates (32-bit actually 24-bit)
•
Analog high-quality output: AUODAC.DL3
• Line / Earphone output, 16-bit or 32-bit at all sample rates • Up to 97500 Hz with adjustment accuracy of 0.09 Hz
•
Secondary analog audio output path: AUOOSET.DL3
• Summed to Line / Earphone output • Can be used for sound effects
VSOS Audio Drivers: I2S
•
I2S input and output supported
• Input and output share the same clock signals, so they must operate at the exactly same frequency
•
I2S can operate in either Master or Slave mode
• In Master mode, VS1005 creates clocks and syncronization
• Max rate 96 kHz / 32 bits, or 192 kHz / 16 bits
• In Slave mode, VS1005 synchronizes itself to an external source
VSOS Audio Drivers: S/PDIF
•
In S/PDIF the transmitter is always the master
•
S/PDIF can NOT be used at the same time as USB!
• There can be no USB audio driver that outputs to S/PDIF!!!
•
S/PDIF receiver drivers:
• Automatically synchronize to 44.1 / 48 / 88.2 / 96 kHz
• For hardware reasons, receiver drivers must modify system clock:
• 61.440 MHz for 48 / 96 kHz
• 56.448 MHz for 44.1 / 88.2 kHz
•
S/PDIF transmitter drivers:
• Some support 48 / 96 kHz, some also 44.1 and 88.2 kHz • Some drivers need to modify system clock
VSOS Audio Drivers: Synchronization
•
AUXSYNCS synchronizes slave input sample rate to analog output
sample rate
• Slave input (e.g. AUII2SS.DL3 or AUISPD.DL3) must be connected to stdaudioin
• Analog output (AUODAC.DL3) must be connected to stdaudioout
•
Driver carefully adjusts the playback sample rate so that it keeps in
sync with input
How to Get Pre-Programmed VS1005 ICs 1/3
•
VLSI offers a new service where VS1005g's with internal flash
memory can be delivered pre-programmed. The turnaround time for
preprogramming VS1005's is just a few working days.
•
Pros:
• No need for the customer to program firmware on their devices. • No extra cost - VLSI offers pre-programming for free.
•
Cons:
• If the customer finds a critical bug:
• VS1005's need to be reprogrammed either at VLSI...
• ... or using other methods (like Safe Update Kernel through USB) on those devices that already have VS1005's soldered.
How to Get Pre-Programmed VS1005 ICs 2/3
•
Example of design and production flow:
• Develop with DevBoard with 2 MiB external flash. • Use UART and USB to load and debug.
• When application is debugged, remove unnecessary drivers and libraries so that the end result can fit in 1 MiB internal flash.
• Build Safe Update Kernel to 1 MiB internal flash. • Dump system to image file (1048576 bytes).
• Send image file to VLSI.
How to Get Pre-Programmed VS1005 ICs 3/3
•
Select a unique and clear name for the image file:
• The file name must contain:
• Descriptive manufacturer / project / product name.
• Version number.
• Date of release.
• Separate the fields by underscores, no white space. • Example: BigCompany_Aurator_v103_2017-09-18.img
•
Use the exact file name every time you order more ICs!
•
Note: If you have ordered pre-programmed ICs, but the product is
no more needed, VLSI can clear their content.
Design for Debuggability and Productability
•
Provide debug header on your PCB: Provide pads to solder pins for
VHIGH, RX, TX and GND. Without these pins, your product may be
impossible to debug or produce. RX and TX need pull-up resistors.
•
Consider how initial flash contents is to be loaded in production.
Provide USB pins on pin headers for pushing the operating system
files to the board during production.
•
For writing to the external SPI flash in your system (if applicable),
you need a flash that has 4K sector erase capability.
•
Provide a ground pin on the PCB for connecting the oscilloscope
probe ground.
•
SD card can also theoretically be used for initial flash programming
during production.
Choose Carefully Which GPIO Pins You Use 1/4
•
Software for the VS1005g consists of several parts, which need to
work together. A VS1005g product typically runs the VSOS Kernel,
some drivers and other libraries, and application code. It's not
practical to modify all the pre-existing code to change which GPIO
pins it uses. Furthermore, most digital pins in the VS1005g have
some fixed functionality, such as SPI bus pins, which you need to
take into consideration when selecting which GPIO pins you use.
•
To determine which pins you can or should use in your product,
please study the following list carefully. You can also use the
VS1005g Developer Board schematic as a guideline.
Choose Carefully Which GPIO Pins You Use 2/4
•
The VSOS Kernel needs to use the following pins (1/2):
• XCS0 (GPIO 1_1, the SPI flash chip select), NFCE (GPIO0_11, the NAND flash chip select) and GPIO1_15 (the LCD display chip select) for various purposes.
• The kernel assumes that there is a 74HC138 address decoder connected to these pins so the kernel writes to all three.
• NFRDY (Nand Flash Ready) pin needs a pull-up, otherwise booting may get stuck in waiting for a (non-existent) Nand Flash to become ready.
• Some bus (usually SPI0) for communicating with an external system SPI flash memory.
• UART for console messages and debugging. Both RX and TX need pull-up resistors on the PCB.
Choose Carefully Which GPIO Pins You Use 3/4
•
The VSOS Kernel needs to use the following pins (2/2):
• GPIO0_7 for determining the boot IO voltage and GPIO0_0 - GPIO0_3 for determining the boot configuration and for mechanical push-buttons if there are some.
• GPIO0_0 - GPIO0_7 together with the chip select pins for
switching external powers such as SD card regulator or USB regulator on and off: Whenever a driver calls SetPower(), pins GPIO0_0 - GPIO0_7, XCS0, NFCE and GPIO1_15 are written to - if this causes problems with your board, rewrite the
SetPower() function in the Kernel.
• GPIO0_0 - GPIO0_3, TMS, TDI and DBG are also checked by the ROM firmware at boot: if all are high, the internal flash is
erased. To prevent this from happening inadvertently, make sure that at least one of these pins is pulled low (with
Choose Carefully Which GPIO Pins You Use 4/4
•
Other buses and their pins are largely left unused (although they
might get an initial value during bootup).
•
The pins for those peripherals that you and the VSOS Kernel don't
use, can be used as GPIO pins. For example GPIO2_0 through
GPIO2_3 (the JTAG pins TMS, TDI, TDO and TCK) are good pins
to be used as GPIO pins.
•
For recommendations on how to get more GPIO pins with least
amounts of conflicts, contact VLSI with the product information.
Design for Reliability
•
VS1005G: Connect FVDD (pin 6) to IOVDD (pin 7). This is a
work-around for a VS1005G boot timing criticality that causes boot
problems in early VS1005G production lots.
• Works if IOVDD >= 2.8 V.
• If your system requires that IOVDD = 1.8 V, contact VLSI for further information.
•
Provide the SD card with its own regulator.
• Otherwise SD card access may cause brown-outs or audio noise. • Connect the SD card regulator to some VS1005 pin so that the
SD card can be powered up, down and resetted. For 3V IOVDD systems, a good solution is to use GPIO0_7, a pull-up resistor, active high enabled regulator and AMPBCONF.DL3 driver to control the SD card power.