X hits on this document

PDF document

AVR32709: AVR32 UC3 Audio Decoder Over USB - page 23 / 29





23 / 29


Sample rate set point (Hz)

ABDAC Generic clock input frequency

Actual Sample Rate (Hz)

Relative Error (%) -2.34 0.00 -2.34

Music Interval (semitones)

32000 44100 48000


31250 44100 46875

-0.41 0.00 -0.41


SDRAM Loader

Graphical data like images consume a lot of space in RAM and flash which could be used by the application instead. Because of that, the images that are used by the audio player application GUI are stored in DataFlash and are loaded to SDRAM upon startup. The reason for having the data in the SDRAM, rather than in flash, is the speed improvement that leads to faster updates of the display with new content.

The SDRAM loader module uses a memory manager to manage the SDRAM memory space. This memory manager can also be used in the application to allocate memory from SDRAM instead of the internal SRAM.

The following sections give a short introduction to the parts involved in the SDRAM loader module.

P T h e S D R A M lo a d e r s o u r c e c o d e i s lo c a t e d L A Y E R / U S E R _ I N T E R F A C E _ G U I / s d r a m _ l o a d e r . c , h .



The DataFlash is formatted with a FAT16 file system and it currently contains graphical data that is used by the audio player application in the GUI implementation. The graphical data is stored as BMP files and the used format is RGB565 which can be used directly on the display when swapped from little endian to big endian. Other BMP formats are currently not implemented but this can be extended if needed.

The FAT file system makes it easy for developers to upgrade the content with new files or even use it for other applications like a web-server. An upgrade of the content can be done by using a mass storage example application.

The BMP picture used in the application are stored into the /PICTURES directory.

To customize the GUI, the bitmap files can be updated and must be saved to the ‘Windows bit- map image’ format using a ‘16-bit R5 G6 B5’ encoding. This can be done using ‘GIMP’, the GNU Image Manipulation Program (see http://www.gimp.org/).

Loading Process

The SDRAM loader consists of two files, sdram_loader.c and sdram_loader.h, in the directory APPLICATIONS/AUDIO-PLAYER/USER_INTERFACE/GUI. In these files the images are speci- fied that should be loaded to SDRAM and how they should be converted. A configuration that loads three images to SDRAM could look like this:

typedef struct {

const wchar_t *name; void *start_addr; } ram_file_t;



Document info
Document views55
Page views55
Page last viewedSun Oct 23 18:21:47 UTC 2016