VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board

Designing hardware and software for systems that use the VS1010 MP3 Audio DSP Microcontroller.
User avatar
pasi
VLSI Staff
Posts: 2102
Joined: Thu 2010-07-15 16:04

Re: VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board

Post by pasi »

It should be easy to integrate the spdif transmitter ( viewtopic.php?f=15&t=2839 ) into a player, as it's pretty standalone:
1) Add toslinktransmitasm.s to the project.
2) Add toslink.c to your project and change main() to ToslinkInit() and call that from your main.
3) Make sure you're not changing the core clock (call to SetPLL() or SetVCO()) in your player. Changing it from 5.0x would cause a mismatch between the SRC and SPDIF TX rates, producing crappy sound.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook
George
Senior User
Posts: 76
Joined: Fri 2021-12-03 11:03

Re: VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board

Post by George »

Sorry... :oops:

Code: Select all

C:\.......\FMRadio_RC0\SourceCode\solutions\lcdmp3\toslinktransmitasm.s(32): ERROR: syntax error.
  near: .end **ERR**
*** ERROR: Compilation failed, total source errors 1!
C:\VSIDE\bin\make.exe: *** [Emulation-Debug\toslinktransmitasm.o] Error 1
User avatar
pasi
VLSI Staff
Posts: 2102
Joined: Thu 2010-07-15 16:04

Re: VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board

Post by pasi »

Maybe the final newline missing?

Removing the line with ".end" should just produce a warning, provided you added the file to ASM files and not C files... (not enough context in your report to determine if make used vsa to compile the asm file)
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook
George
Senior User
Posts: 76
Joined: Fri 2021-12-03 11:03

Re: VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board

Post by George »

pasi wrote: Fri 2022-02-11 16:35 Maybe the final newline missing?
Yes!!! :D

But... :oops:

Code: Select all

C:\...\FMRadio_RC0\SourceCode\solutions\lcdmp3\toslink.c (6) ERROR 9: undefined identifier 'SetPLL'
C:\...\FMRadio_RC0\SourceCode\solutions\lcdmp3\toslink.c (6) ERROR 130: function call without a prototype
Compilation failed with 2 errors and 0 warnings.
C:\VSIDE\bin\make.exe: *** [Emulation-Debug\toslink.o] Error 2

C:\...\FMRadio_RC0\SourceCode\solutions\lcdmp3\toslink.c (6) ERROR 9: undefined identifier 'SetPLL'
C:\...\FMRadio_RC0\SourceCode\solutions\lcdmp3\toslink.c (6) ERROR 130: function call without a prototype
Compilation failed with 2 errors and 0 warnings.
C:\VSIDE\bin\make.exe: *** [Emulation-Debug\toslink.o] Error 2
333.JPG
333.JPG (148.2 KiB) Viewed 2403 times
User avatar
pasi
VLSI Staff
Posts: 2102
Joined: Thu 2010-07-15 16:04

Re: VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board

Post by pasi »

Try adding the prototype for SetPLL(), the function should be available in ROM.

Code: Select all

void SetPLL(u_int16 n);
It's pretty simple function, so it could be re-implemented too.

AFAIK, vs1010 should also run at 5.0x12.288MHz clock by default (but not in USB modes), so you could also comment out the call and see if the spdif output works correctly.

Edit: Seems that if GPIO1_1 is low, vs1010 starts with 1.0x clock. But that would also mean 1.8V IOVDD. Also in this case 5.0x clock is configured later before checking SD.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook
George
Senior User
Posts: 76
Joined: Fri 2021-12-03 11:03

Re: VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board

Post by George »

Yes!
I have x64 so I change copy to xcopy in Prepost build Command
Now I see:

Code: Select all

Total words: I 3270, X 3403, Y 11257.
xcopy loadable.ap3 LCDMP3.dlx /y
—â® ®§­ ç ¥â LCDMP3.dlx:
¨¬ï ä ©«  ¨«¨ ª â «®£ 
(F = ä ©«, D = ª â «®£)? 


I self copied the file loadable.ap3 to S:/sys and renamed it as LCDMP3.dlx, but there is still no any signal on the output of SPDIF. :cry:

It is possible that this problem is related to another, namely: POWER OFF does not work. The player starts with the PWR button, but does not respond to the repeated pressing. Both short time and long time.
User avatar
pasi
VLSI Staff
Posts: 2102
Joined: Thu 2010-07-15 16:04

Re: VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board

Post by pasi »

Does the SPDIF TX pin toggle?

I think it should be doing something if you configure it as peripheral and start the SPDIF transmitter.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook
George
Senior User
Posts: 76
Joined: Fri 2021-12-03 11:03

Re: VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board

Post by George »

No, SPDIF OUT is zero. :(

Dear pasi,
Maybe I did something wrong?
Please see my solution.
lcdmp3.rar
(209.62 KiB) Downloaded 177 times
Last edited by George on Sat 2022-02-12 18:08, edited 4 times in total.
User avatar
pasi
VLSI Staff
Posts: 2102
Joined: Thu 2010-07-15 16:04

Re: VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board

Post by pasi »

Did you call ToslinkInit() ? I only see the prototype in main.c, but no call to it.

Also, I'm not familiar with the program/app structure. You have to make sure the toslink routines stay resident in memory and do not get unloaded. (Maybe Hannu can pipe in.)
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook
George
Senior User
Posts: 76
Joined: Fri 2021-12-03 11:03

Re: VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board

Post by George »

Code: Select all

ioresult main (char *params) {
	void ToslinkInit(void);
	printf("Hello, World!\n");
	return S_OK;
}
:(
Locked