VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board
Re: VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board
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.
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
Re: VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board
Sorry...

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
Re: VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board
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)
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
Re: VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board
Yes!!!

But...

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
Re: VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board
Try adding the prototype for SetPLL(), the function should be available in ROM.
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.
Code: Select all
void SetPLL(u_int16 n);
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
Re: VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board
Yes!
I have x64 so I change copy to xcopy in Prepost build Command
Now I see:
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.
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.
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.

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.
Re: VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board
Does the SPDIF TX pin toggle?
I think it should be doing something if you configure it as peripheral and start the SPDIF transmitter.
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
Re: VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board
No, SPDIF OUT is zero. 
Dear pasi,
Maybe I did something wrong?
Please see my solution.

Dear pasi,
Maybe I did something wrong?
Please see my solution.
Last edited by George on Sat 2022-02-12 18:08, edited 4 times in total.
Re: VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board
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.)
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
Re: VS1010 Ultra low cost LCD FM radio + USB DAC + SD/USB MP3 Player demo board
Code: Select all
ioresult main (char *params) {
void ToslinkInit(void);
printf("Hello, World!\n");
return S_OK;
}
