Atmel AT83SND2C MP3 User Manual

Page 45

Advertising
background image

Protocol Frame Description

AT83SND2CMP3 User Guide

5-41

7525A–MP3–07/05

Table 5-41 . FS_GET_NAME command

Note:

When selected root or directory is empty, the returned file name is ‘\0’.

FS_FORMAT Command Format Selected Memory in FAT16. Player reponse is SYSTEM_ACK* or

SYSTEM_NACK* frame.

It is necessary to send the SYSTEM_ SELECT_MEMORY once (to select the memory)
before sending the FS_FORMAT command.

Player status can be viewed in Status Byte (Memory Error or File Name Available).

Table 5-42 . FS_FORMAT command

Note:

Depending of the memory type and size, Player response can be up to several seconds.
NandFlash 64 Mo: ~6 seconds, SD card: ~4 seconds.

FS_FCREATE Command Create a File in root dir in Selected Memory. Once this file is created, Player is waiting

for ‘Number of Blocks’ FS_FWRITE_BLOCK commands.

Table 5-43 . FS_FCREATE command

„

Block size: Depending of transfer link, size of a block can change. For the UART link,
block size is always equal to sector size 512 bytes. Block size is not a parameter in
FS_FCREATE command.

„

Number of Blocks Parameter: this is File length in Block. For a 2384 Bytes File, it is
necessary to transfer 5* FS_WRITE_BLOCK commands (Number of Blocks = 5)
with stuffing bytes in last command FS_WRITE_BLOCK.

„

The File_Name is a ASCII long filename with extension already formatted:
song1.mp3”. Example: File_name ‘S’,’O’,’N’,’G’,’1’ , ‘.’ , ’M’, ‘P’, ‘3’ ‘\0’. File name
length is limited to 8 characters. Extension is limited to 3 characters.

To create a File:

– FS_CREATE (Number of blocks, File name),
– (Number of blocks-1) x FS_WRITE_BLOCK (512 bytes data),
– FS_WRITE_LAST_BLOCK (Number of bytes < 512), Player response is then

SYSTEM_ACK. File is created.

Frame Start

Channel

Protocol

Command

Data Length

Data

CheckSum

7Eh

If not used,

FFh

64h

00h

No

Yes

Frame Start

Channel

Protocol

Command

Data Length

Data

CheckSum

7Eh

If not used,

FFh

65h

00h

No

Yes

Frame Start

Channel

Protocol

Command

Data Length

Data

CheckSum

7Eh

If not used,

FFh

66h

Nh

Byte 0 MSB(Number of blocks)
Byte 1 LSB(Number of blocks)
Byte 2:N-1 File Name (must
finish with ‘\0’).

Yes

Advertising