Problems getting started with VS1063

Designing hardware that use VLSI Solution's devices as the system controller for the entire design.
jdtengineering
User
Posts: 11
Joined: Fri 2018-10-12 16:58

Problems getting started with VS1063

Post by jdtengineering » Fri 2018-10-12 17:31

Hello,

I bought the VS1063A proto board because we are looking into using it in a product that records audio as MP3. However I keep running into problems, it would be nice if you guys could give me a push in the right direction.

First off, the device does not record to SD card straight out of the box as it should, according to the note that came with it. I have changed the jumpers as described in the note. Pushing the buttons does not seem to do anything.

Secondly, I downloaded the example solution "vs1063-standalone-vside-20180426.zip". In this project, without any modifications, there are some problems that prevented me from succesfully compiling and then uploading the software, a bit clumsy!

After browsing this forum for time I was however able to upload the code. I still can't get the device to record though :| I have the following DEFINEs enabled:

Code: Select all

#define UART_BUFFERED /* Use buffered UART commands. */

#define RECORDER

#define SCI_KEYS /* Both SCI control and keys (GPIO4 through GPIO6). */
My PC is connected to the board over UART. When starting up the device it outputs

Code: Select all

FAT ok
[00][00]
It does however not respond to any of the buttons, nor to the GPIO[4-6] pins (pulling them high or low), nor any serial command.

I've spent the whole day trying to get the device to record some audio, but so far no luck. What am I missing here?

Many thanks in advance,
Jim

User avatar
pasi
VLSI Staff
Posts: 1586
Joined: Thu 2010-07-15 16:04

Re: Problems getting started with VS1063

Post by pasi » Mon 2018-10-15 11:09

Hi Jim,
In the current version you can't have UART_BUFFERED and key controls at the same time due to code size issues. The recorder automatically deactivates key control if you set them both (see recorder.c).

The RECORDER define is no longer set by the user. The VSIDE solution has separate projects for the player and recorder. Set the recorder project as an active project, then program it.

I worked on the code last week to further optimize the code size to have both UART and key control at the same time. I'm trying to get the new revision released this week. (Edit: the new version is now available.)

(The vs1063a prototyping board should ship with the button-controlled recorder and star recording with a long press of the middle button, so I'm not sure whether not being able to record was due to wrong firmware or some other issue.)
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

jdtengineering
User
Posts: 11
Joined: Fri 2018-10-12 16:58

Re: Problems getting started with VS1063

Post by jdtengineering » Mon 2018-10-15 11:32

Hi pasi,

Thanks for your reply, it clears up some of my confusion. However I still don't understand why the device does not respond to any serial command? For example, sending "?" should make it send some status information but nothing happens.

I'll try again without UART_BUFFERED defined. How long should the middle button be held approximately?

Thanks,
Jim

User avatar
pasi
VLSI Staff
Posts: 1586
Joined: Thu 2010-07-15 16:04

Re: Problems getting started with VS1063

Post by pasi » Mon 2018-10-15 11:45

The default version or the one you programmed?

The ? command only works while playing. It's possible the project had START_IN_FILEMODE enabled and thus wasn't playing anything.

The new version should be up in a couple of minutes. (Edit: http://www.vlsi.fi/fileadmin/software/V ... 181015.zip )

Long press is detected at 0.75s. It takes a while to start recording, because the recorder needs to go over the FAT and locate enough free space.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

jdtengineering
User
Posts: 11
Joined: Fri 2018-10-12 16:58

Re: Problems getting started with VS1063

Post by jdtengineering » Mon 2018-10-15 11:48

I assumed it would always output the current state, playing, recording, whatever. I realise now that assumption was false. Thanks for posting the new version!

You say it takes some time before the actual recording starts, but I assume that's in the order of a few seconds, right?

User avatar
pasi
VLSI Staff
Posts: 1586
Joined: Thu 2010-07-15 16:04

Re: Problems getting started with VS1063

Post by pasi » Mon 2018-10-15 11:56

Yes, a few seconds. Just enough that you start to wonder if it starts or not. You'll get record monitoring from the output at a lowered volume when the recording starts.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

jdtengineering
User
Posts: 11
Joined: Fri 2018-10-12 16:58

Re: Problems getting started with VS1063

Post by jdtengineering » Mon 2018-10-15 12:35

Ok thanks. You said you were working on getting UART and key control to fit in the memory at the same time. Is this realized in the new version, or do I still have to disable UART?

jdtengineering
User
Posts: 11
Joined: Fri 2018-10-12 16:58

Re: Problems getting started with VS1063

Post by jdtengineering » Mon 2018-10-15 13:59

I still can't get it to work.. here's what I did

1) Formatted the SD card as "FAT (default)" (I also tried FAT32)

2) Download the newest firmware that you posted this morning

3) Commented out UART_BUFFERED, and leaving COMPAT_KEYS uncommented

Code: Select all

//#define UART_BUFFERED /* Use buffered UART commands. */
#define COMPAT_KEYS  /**< Read the old 3-button interface of vs10xx prototyping board. (is overriden by SCI_KEYS) */
4) Removed SPIB jumper and SD card from protoboard

5) Programmed the software using "Recorder" as active project, making sure that recorder.coff is selected as the image

6) Connected a phone to the LINE-input

7) Inserted SD card, the device outputs over UART

Code: Select all

FAT ok
[00][00]
8) Hold SW3, middle button, for about 2 seconds

9) Waited about 20 seconds, enough time for the device to start recording and record a few seconds of audio. Nothing seems to happen and no signal appears on the output.

10) Pressed SW3 shortly

11) Waited another 20 seconds for the device to finish writing

12) Removed SD card and inserted it into laptop. SD card is still empty.

I also tried re-adding the SPIB jumper and resetting after uploading the firmware. Same behaviour.

Am I missing something? Thanks in advance.

User avatar
pasi
VLSI Staff
Posts: 1586
Joined: Thu 2010-07-15 16:04

Re: Problems getting started with VS1063

Post by pasi » Tue 2018-10-16 11:51

Check that SE1,SE2,SE3 jumpers are present. You should see recording start messages from the UART.
With UART_BUFFERED (but by pressing keys):
Init Record
CallEncoders
Saving Recording!
Without UART_BUFFERED you seem to be able to start recording, but not end it. I'll take a look at what's going on.

Edit: At least I seem to run into a powering issue. The uSD card I used takes a lot of current when writing, and it seems the power supply of the prototyping card cannot always handle that. Feeding 2V8 from external power seems to have an effect.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

jdtengineering
User
Posts: 11
Joined: Fri 2018-10-12 16:58

Re: Problems getting started with VS1063

Post by jdtengineering » Tue 2018-10-16 12:43

Thanks for your message. After trying for some time it seems to be an intermittent issue, I have gotten it to work only once so far. Other times the device seems to freeze / crash at some point.

I got it to work by

1) Programming the code from VSIDE

2) Quickly (!) connecting over UART and inserting an SD Card. The device outputs something like

Code: Select all

Card ok
FAT ok
fat 15605760
files 0
3) Sending 'R' two times. After the first 'R', the devices quickly responds with a '>', but nothing happens. After the second 'R', the device sends 'Init Record'. At this point the device seems to freeze. Some times I also got the message 'CallEncoders', but usually not. Even when the recording starts, the process can still fail as it seems sending 'E' is ignored most of the time.

If I reset the device and wait for a minute or two, I'm also not able to program it anymore. So it almost seems like it just crashes after a few minutes, regardless of what happens.

If I disable USE_PRINTABLE_OUTPUT (which I have to do in order to be able to enable COMPAT_KEYS), I get no output over UART at all. Pressing the switches doesn't seem to do anything.

Post Reply