release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Search | Go
Wiki > Main > LyreProject > LyrePrototype

About

Version 1.0 of the LyreProject - Free/Open hardware audio player for use with RockBox. It was started on December 2007.

Objectives

Show RockBox 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 smile

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! smile

Hardware

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 - schematic.

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.

FEATURES:

  • 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

The 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.

The AT91SAM9260 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.

The AT91SAM9260 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.

RAM

The minimum size of RAM memory (for an audio player), should be at least 4MB, 8MB a good choice.

Flash

The minimum size of Flash memory (for RockBox firmware), should be at least 4MB, 8MB is a good choice.

USB

SD/MMC card connector

SD/MMC card connector will be used for host data, music files.

Extension ports

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).

EXT port


UEXT port

Pin First Function whats this? second function whats this already used by
Vcc 3,3 V - - -
Gnd gnd - - -
PA23 TWD Two Wire communication - Data ETX2 ? EEPROM
PA24 TWCK Two Wire communication - Clock ETX3 ? EEPROM
PB0 SPI1_MSIO SPI data input TIOA3 Trigger input ? ?
PB1 SPI1_MOSI SPI data output TIOB3 Trigger input ? ?
PB2 SPI1_SPCK SPI clock TIOA4 Trigger input ? ?
PB3 SPI1_MSIO SPI addr0 / chip select 1 TIOB4 Trigger input ? ?
PB8 TXD2 serial transmit - - ?
PB9 RXD2 serial recieve - - ?


AEXT port

Pin First Function whats this? second function whats this already used by
AVDD 3,3 V analog voltage - - -
Vreff - reference Voltage - - -
Gnd gnd - - - -
PC0 SCK3 ? AD0 Analog Digital convertor 0 ?
PC1 PCK0 ? AD1 Analog Digital convertor 1 ?

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 description
1 UEXT pin 1 - +3.3V
2 AEXT pin 1 - Analog GND
3 UEXT pin 2 - Digital GND
4 UEXT pin 6 PA23 I2C serial data
5 UEXT pin 5 PA24 I2C serial clock
6 EXT pin 29 PB18 I2S SD out
7 EXT pin 27 PB17 I2S word select
8 EXT pin 25 PB16 I2S clock
9 UEXT pin 8 PB1 SPI MOSI
10 UEXT pin 9 PB2 SPI SPSK
11 UEXT pin 10 PB3 SPI CS
12 EXT pin 13 PB4 Button 1
13 EXT pin 15 PB5 Button 2
14 EXT pin 17 PB6 Button 3
15 EXT pin 19 PB7 Button 4
16 UEXT pin 3 PB8 Button 5
17 UEXT pin 4 PB9 Button 6
18 EXT pin 21 PB10 Button 7
19 EXT pin 23 PB11 Button 8
20 not used - -

Stereo Audio CODEC

TLV320AIC23:

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.

Knowledge:

LCD

Nokia 6610 Color LCD 128x128 - 14¤ on Sparkfun Carrier Board - 13¤ on SparkFun - datasheet - schematic

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.

Buttons

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

Reference Quantity Name Price Description
U1 1 TLV320AIC23 Farnell order code: 1287664 - 6,5 euros  
R1, R2, R3, R4, R5, R6, R7, R8 8 1K - 1/8W Farnell order code: 9234004 - 0,04 euros  
C1, C2, C3, C4, C5, C6, C7, C8, C11 9 100nF - 50 volts Farnell order code: 7569564 - 0,09 euros  
C9, C10 2 220uF - 6 volts Farnell order code: 9695605 - 0,75 euros  
C12 1 10uF - 16 volts Farnell order code: 1469324 - 0,23 euros  
jack_stereo 1 Stereo audio jack Farnell order code: 1368640 - 0,23 euros  
connector1 1 20 header pins Farnell order code: 1022262 - 1,12 euros  
connector2 1 5 header pins Farnell order code: 671940 - 0,28 euros  
* Prices on 13.03.2008.

Software

This section describes the RockBox port for the hardware.

Bootloader

The AT91SAM9260 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 - 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.

Se here 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; u-boot-1.2.0-atmel-olimex.patch.bz2 and u-boot-1.2.0-atmel-olimex-binaries.tar.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.

Buttons

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).

LCD

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 (IriverHardwareComponents), 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 smile

AT91SAM9260 --> ARM926EJ-S

Texas DM320 uses an ARM926EJ core and there is OlympusMR500Info port that have drivers already made for this ARM core -> code can be re-used smile

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 and DSPdap.

Enclosure

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.

Development tools

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

I Attachment Action Size Date Who Comment
K9xxG08UXM.pdfpdf K9xxG08UXM.pdf manage 1032.5 K 17 Jan 2008 - 21:07 JorgePinto  
PCF8574_4.pdfpdf PCF8574_4.pdf manage 132.5 K 26 Jan 2008 - 17:36 RogerQuadros I2C I/O expander (8 lines)
PCF8575_3.pdfpdf PCF8575_3.pdf manage 116.0 K 26 Jan 2008 - 17:37 RogerQuadros I2C I/O expander (16 lines)
SAM9-L9260-24LC256.jpgjpg SAM9-L9260-24LC256.jpg manage 22.4 K 20 Jan 2008 - 19:30 JorgePinto  
SAM9-L9260-24LC256_sch.jpgjpg SAM9-L9260-24LC256_sch.jpg manage 32.8 K 20 Jan 2008 - 19:32 JorgePinto  
SAM9-L9260-sch-AEXT.jpgjpg SAM9-L9260-sch-AEXT.jpg manage 8.6 K 23 Jan 2008 - 08:49 JorgePinto  
SAM9-L9260-sch-EXT.jpgjpg SAM9-L9260-sch-EXT.jpg manage 53.4 K 23 Jan 2008 - 08:49 JorgePinto  
SAM9-L9260-sch-UEXT.jpgjpg SAM9-L9260-sch-UEXT.jpg manage 13.1 K 23 Jan 2008 - 08:49 JorgePinto  
Samsung_K4S561632D.pdfpdf Samsung_K4S561632D.pdf manage 60.9 K 17 Jan 2008 - 21:15 JorgePinto  
at91bootstrap-2.3_olimex.tgztgz at91bootstrap-2.3_olimex.tgz manage 297.5 K 05 Apr 2008 - 08:08 JorgePinto  
bloco_funcionamento_rbplayer-18012007.pngpng bloco_funcionamento_rbplayer-18012007.png manage 42.7 K 18 Jan 2008 - 10:50 JorgePinto  
ks8721bl-sl.pdfpdf ks8721bl-sl.pdf manage 766.4 K 17 Jan 2008 - 21:25 JorgePinto  
project-rockbox_player-03032008.zipzip project-rockbox_player-03032008.zip manage 349.7 K 03 Mar 2008 - 23:14 JorgePinto  
rockbox_player-24012008-1.jpgjpg rockbox_player-24012008-1.jpg manage 124.6 K 24 Jan 2008 - 16:40 JorgePinto  
rockbox_player-24012008-1.schsch rockbox_player-24012008-1.sch manage 7.3 K 24 Jan 2008 - 16:41 JorgePinto  
rockbox_player-24012008.schsch rockbox_player-24012008.sch manage 7.3 K 24 Jan 2008 - 13:39 JorgePinto  
rockbox_player-secondary_board-03032008.jpgjpg rockbox_player-secondary_board-03032008.jpg manage 205.3 K 03 Mar 2008 - 23:15 JorgePinto  
rockbox_player-secondary_board-12032008.jpgjpg rockbox_player-secondary_board-12032008.jpg manage 143.4 K 12 Mar 2008 - 08:33 JorgePinto  
rockbox_player-secondary_board-26012008.jpgjpg rockbox_player-secondary_board-26012008.jpg manage 144.8 K 26 Jan 2008 - 14:46 JorgePinto  
rockbox_player-secondary_board-26012008.tar.bz2bz2 rockbox_player-secondary_board-26012008.tar.bz2 manage 314.4 K 26 Jan 2008 - 14:45 JorgePinto  
secondary_board.jpgjpg secondary_board.jpg manage 117.9 K 24 Jan 2008 - 11:58 JorgePinto  
u-boot-1.2.0-atmel-olimex-binaries.tar.bz2bz2 u-boot-1.2.0-atmel-olimex-binaries.tar.bz2 manage 499.7 K 05 Apr 2008 - 10:21 MarcoenHirschberg  
u-boot-1.2.0-atmel-olimex.patch.bz2bz2 u-boot-1.2.0-atmel-olimex.patch.bz2 manage 60.7 K 05 Apr 2008 - 10:18 MarcoenHirschberg  
u-boot-1.2.0-atmel.patch.bz2bz2 u-boot-1.2.0-atmel.patch.bz2 manage 216.9 K 05 Apr 2008 - 10:18 MarcoenHirschberg  
r49 - 02 Apr 2021 - 20:46:07 - UnknownUser


Parents: WebHome > LyreProject
Copyright © by the contributing authors.