Version 1.0 of the LyreProject
- Free/Open hardware audio player for use with RockBox
. It was started on December 2007.
running on some Free/Open hardware. After we can go to Olimex and ask them (or any others) If they are still interested on assembly and sell the hardware as a gadget on their online shop. We had contacted Olimex on 11 January 2007 and they said they will probably be interested and they even suggest a possible hardware configuration and price: AT91SAM9260?
+ LCD NOKIA 6610 + 8MB flash + 8/16MB SDRAM + nRF24L01 wireless chip + audio CODEC + Li-ion battery + charger + miniUSB + buttons, price in range of 100 ¤.
Version 1 of the LyreProject
will be made on some development board having as base an ARM MCU. We should not seek to have exotic hardware, just simple and cheap, to try not spending time in coding drivers and spending money on some hardware that will change in future. Just do the necessary to have a functional hardware that plays audio from files stored on some kind of flash memory, and which displays files, audio information, on a display
Status of the project
Now there is a bootstrap code working that boots from DataFlash
memory. There is also one test application flash_LED code that is started by the bootstrap. The application resides on DataFlash
memory with the bootstrap. In the end, the application will be the Rockbox bootloader that will load the Rockbox firmware from the SD card FAT file system partition. Audio data files will also be loaded from SD card.
Some code and more information are hosted on code.google SVN page
Active developing and discussing ideas are happening in forum
and IRC. Please contribute!
We will use two development boards, the Olimex SAM9-L9260 development board
and a custom secondary board. The bloc diagram:
At red we have the main board - Olimex SAM9-L9260 development board
. We will use the MCU + SDRAM + FLASH + SD card connector + USB port. There is also the Power section, JTAG connection and an RS232 port, that were not drawn.
We will connect to that main board one custom secondary board, assigned as green in the image. The secondary board will have buttons, IC audio codec + earphone jack and color LCD.
Development board - Olimex SAM9-L9260
Olimex SAM9-L9260 development board
- Manual SAM9-L9260.pdf
SAM9-L9260 is a development platform with ARM9 microcontroller, 64MB SDRAM and 512MB NAND Flash. The board have Ethernet 100Mbit controller, USB host, USB device, RS232 and 40 pin extension port with all unused SAM9260 ports available for add-on boards. Have a RTC clock which is backuped with 3V Li battery.
- MCU: AT91SAM9260? 16/32 bit ARM9 180MHz operation
- standard JTAG connector with ARM 2x10 pin layout for programming/debugging with ARM-JTAG
- 64 MB SDRAM
- 512 MB NAND Flash (seen in Linux as silicon drive)
- 2 MB DataFlash memory
- Ethernet 100Mbit connector
- USB host and USB device connectors
- RS232 interface and drivers
- SD/MMC card connector
- one user button and one reset button
- one power and two status LEDs
- on board voltage regulator 3.3V with up to 800mA current
- single power supply: 5V DC required
- power supply filtering capacitor
- 18.432 Mhz crystal on socket
- extension header
- Dimensions: 100 x 80 mm (3.94 x 3.15")
Microcontroller - Atmel AT91SAM9260?
is the first member of a pin-compatible ARM9-based microcontroller family that shares the same programming model as ARM7-based controllers, allowing direct migration between controllers based on different ARM cores. It supports deterministic, real-time operation, offers supervisory functions, and has third-party support comparable to that for 8-bit microcontrollers.
is based on the ARM926EJ?
-S processor, with 8K byte instruction and 8K byte data cache memories. It operates at 210 MIPS with a 190 MHz clock. It features 8K bytes of SRAM and 32K bytes of ROM with single cycle access at maximum processor or bus speed, together with an external bus interface with controllers for SDRAM and static memories including NAND Flash and CompactFlash?
. Its extensive peripheral set includes USB Full Speed Host and Device interfaces, a 10/100 Base T Ethernet MAC, Image Sensor Interface, Multimedia Card Interface (MCI), Synchronous Serial Controllers (SSC), USARTs, Master/Slave Serial Peripheral Interfaces (SPI), a three-channel 16-bit Timer Counter (TC), a Two Wire Interface (TWI) and four-channel 10-bit ADC. Three 32-bit Parallel I/O Controllers multiplex the pins to/from these peripherals in order to reduce the device pin count, and peripheral DMA channels maximize the data throughput between these interfaces and the on- and off-chip memories.
has a fully featured system controller for efficient system management, including a reset controller, shutdown controller, clock management, advanced interrupt controller (AIC), debug unit (DBGU), periodic interval timer, watchdog timer and real-time timer. It is available in a 217-ball LFBGA RoHS?
-compliant package and in a 208-pin Green QFP package.
The only feature that the AT91SAM9260?
does not have is an integrated LCD controller. This limitation is met by the AT91SAM9261?
. But we will defer using it since it is available only in BGA package.
The minimum size of RAM memory (for an audio player), should be at least 4MB, 8MB a good choice.
The minimum size of Flash memory (for RockBox
firmware), should be at least 4MB, 8MB is a good choice.
SD/MMC card connector
SD/MMC card connector will be used for host data, music files.
The development board has different extension ports. If possible we should only use connections from them. Nearly all Pins can also be General Purpose I/O (GPIO).
|| First Function
|| whats this?
|| second function
|| whats this
|| already used by
|| 3,3 V
|| Two Wire communication - Data
|| Two Wire communication - Clock
|| SPI data input
|| Trigger input ?
|| SPI data output
|| Trigger input ?
|| SPI clock
|| Trigger input ?
|| SPI addr0 / chip select 1
|| Trigger input ?
|| serial transmit
|| serial recieve
Custom secondary board
Download schematic - made in KiCad
Connections between SAM9-L9260 dev. board and external secondary board:
| connector 1 pins
|| SAM9-L9260 dev. board
|| MCU pins
|| UEXT pin 1
|| AEXT pin 1
|| Analog GND
|| UEXT pin 2
|| Digital GND
|| UEXT pin 6
|| I2C? serial data
|| UEXT pin 5
|| I2C? serial clock
|| EXT pin 29
|| I2S? SD out
|| EXT pin 27
|| I2S? word select
|| EXT pin 25
|| I2S? clock
|| UEXT pin 8
|| SPI MOSI
|| UEXT pin 9
|| SPI SPSK
|| UEXT pin 10
|| SPI CS
|| EXT pin 13
|| Button 1
|| EXT pin 15
|| Button 2
|| EXT pin 17
|| Button 3
|| EXT pin 19
|| Button 4
|| UEXT pin 3
|| Button 5
|| UEXT pin 4
|| Button 6
|| EXT pin 21
|| Button 7
|| EXT pin 23
|| Button 8
|| not used
Stereo Audio CODEC
We decided to use the TLV320AIC23 IC AUDIO STEREO CODEC 28-TSSOP (datasheet)
- cost $6,5 in Digikey
Good points of the TLV320AIC23?
- 24-bit resolution Sigma-Delta CODEC supporting up to 96 KHz sampling rate;
- headphone amplifier;
- TWI and SPI interface;
- can generate pretty exact 44.1 kHz and 48 kHz sample rates from its own 12 MHz main clock;
- stereo line input;
- microphone amplifier;
- drivers already in RockBox - tlv320.c - and is used in various Free/Open source hardware digital audio players;
- can be obtained through TI sampling.
The Stereo Audio CODEC will be connected with the SAM9-L9260 development board by TWI and I2S?
. TWI for control as sound volume, mute, etc and I2S?
for audio data stream.
We will use the Nokia 6610 Color LCD 128x128 plus a carrier board, as show in images. The carrier board of the LCD will be connected with the SAM9-L9260 development board using SPI and +3.3V and GND. The carrier board have a voltage step-up converter to power also de 6-7 volts background light (leds) of the LCD.
We will use 8 buttons: 4 direction buttons (up/down/left/right), select, menu, play/pause and stop. Up and down buttons typical acts as volume up and down.
BOM - Bill of materials
|| Farnell order code: 1287664 - 6,5 euros
| R1, R2, R3, R4, R5, R6, R7, R8
|| 1K - 1/8W
|| Farnell order code: 9234004 - 0,04 euros
| C1, C2, C3, C4, C5, C6, C7, C8, C11
|| 100nF - 50 volts
|| Farnell order code: 7569564 - 0,09 euros
| C9, C10
|| 220uF - 6 volts
|| Farnell order code: 9695605 - 0,75 euros
|| 10uF - 16 volts
|| Farnell order code: 1469324 - 0,23 euros
|| Stereo audio jack
|| Farnell order code: 1368640 - 0,23 euros
|| 20 header pins
|| Farnell order code: 1022262 - 1,12 euros
|| 5 header pins
|| Farnell order code: 671940 - 0,28 euros
* Prices on 13.03.2008.
This section describes the RockBox
port for the hardware.
will boot directly from NAND flash. The first 4kB bytes of the NAND flash are loaded into internal SRAM and executed by branching at address 0x0000_0000 after remap. This is automatically done by the AT91SAM9260?
Boot Program - read more about on the section "NAND Flash Boot" at AT91SAM9260 datasheet
1st stage bootloader
The 1st stage bootloader must not be more than the 4kB because it will be stored on the internal SRAM of the AT91SAM9260?
have 4kB of the internal SRAM.
We will use the AT91 Bootstrap
bootloader provided on the SAM9-L9260 development board. This bootloader will initialize, at least, the SDRAM and flash memory controllers. After It will load a code binary image from flash memory to SDRAM and jump to It, in our case, the 2nd stage bootloader
more information about AT91 Bootstrap
bootloader provided by Atmel.
2nd stage bootloader
We will use U-Boot to launch our final application, the RockBox
firmware. We will use the U-Boot version provided by SAM9-L9260 development board - here the patches and the binaries to U-Boot 1.2: u-boot-1.2.0-atmel.patch.bz2
See more about U-Boot at www.linux4sam.org - U-Boot
U-Boot will help in development because we can communicate with him by ethernet and using TFTP, we can upload a new image of Rockbox to the NAND flash memory.
3rd stage bootloader
This bootloader is an application that will be launched by U-Boot.
At this stage, we need to use buttons, LCD and flash NAND memory. For flash NAND memory we must make an ATA driver, the functions: ata_init(), ata_read_sectors() and ata_write_sectors() - to initialize, read and write data to the flash NAND memory. We need to also to mount fat file system and for that we will re-use the code from others targets.
We will need to implement also the next tasks:
- call system_init(); -- to re-initialize the ARM core??
- call kernel_init(); -- to initialize the Rockbox kernel.
- call spi_init(); -- to initialize SPI bus communications. We will use, at this stage, SPI to communicate with the LCD.
- call lcd_init(); -- to initialize the LCD.
- call button_init(); -- to initialize the buttons - configure the MCU IOs that connect to buttons, as digital inputs.
- mount partitions of FAT file system, of the NAND flash memory ??
- call load_raw_firmware(); -- to read Rockbox firmware from NAND flash, put it on SDRAM and jump to it.
Keymap definitions for the various targets are in apps/keymaps/ - lines such as BUTTON_ON|BUTTON_UP indicate a button combination that the hardware allows. The keymap_h1x0_h3x0.c and keymap_gigabeat.c
are probably most useful to look at, as they have a similar number of buttons. (note that BUTTON_REL and BUTTON_REPEAT aren't real buttons, they're used to indicate release and repeat events respectively).
This Nokia Color LCD 128x128 uses the Epson S1D15G10?
Compatible Controller. There is drivers for the Epson S1D15E06?
LCD Controller 2bit color 160x128 at IriverPort
), maybe the drivers for the Epson S1D15G10?
Controller are similar.
There is the IriverH10Port
that uses a 128x128 color LCD, should be nice to look at that code as example.
There is a lot of examples codes at the product page in SparkFun
AT91SAM9260? --> ARM926EJ?-S
uses an ARM926EJ?
core and there is OlympusMR500Info
port that have drivers already made for this ARM core -> code can be re-used
Stereo Audio CODEC
There is at least the IaudioPort
(X5 and M3) that uses this TLV320AIC23?
and the drivers are availably
There are example codes outside RockBox
, for others projects digital audio players: ARM MP3/AAC Player
Online Machine Shop
- Download the software for free, design the case in 3d, and it tell you the price you will pay. This is ideal for a prototype or small quantities.
See here: LyrePrototypeDevelopmentTools
Design electronic schematic diagrams and printed circuit board
- KiCad - Free/Open software (GPL) for the creation of electronic schematic diagrams and printed circuit board artwork.
- gEDA - Suite of Electronic Design Automation tools for electrical circuit design, schematic capture, simulation, prototyping, and production.
Topic discussions in RB forum
Copyright © by the contributing authors.