[En-Nut-Discussion] speed/frequency much too low for MediaNut 1.1 on Ethernut 2.1b

llsoft at quantentunnel.de llsoft at quantentunnel.de
Sun Sep 5 20:41:38 CEST 2010


Hi,

I have a problem with the speed/frequency settings for the VS1001k.

Based on ethernut21b.conf I wrote a configuration for my MediaNut 1.1
mounted on an Ethernut 2.1b. Then I compiled the nutpiper application
with some minor changes (no DHCP, no EEPROM, no LCD). The application
produces a much too slow sound.

The steps I did are:

1.
creating the configuration file 'ethernut21b-mn1.conf'
(based on ethernut21b.conf):

PLATFORM = "ETHERNUT2"
AVR_GCC = ""
MCU_ATMEGA128 = ""
SPPI0_CS1_AVRPORT = "AVRPORTB"
SPPI0_CS1_BIT = "4"
SPPI0_RST1_AVRPORT = "AVRPORTB"
SPPI0_RST1_BIT = "7"
NUTMEM_START = "0x100"
NUTMEM_RESERVED = "64"
NUTXMEM_SIZE = "28416"
NUTXMEM_START = "0x1100"
NUTBANK_COUNT = "30"
NUTBANK_START = "0x8000"
NUTBANK_SIZE = "0x4000"
NUTBANK_SR = "0xFF00"
AUDIO_VS1001K = ""
VS10XX_SIGNAL_IRQ = "INT6"
VS10XX_SCI_SPI0_DEVICE = "1"
VS10XX_SDI_SPI0_DEVICE = "1"
VS10XX_XCS_PORT = "AVRPORTB"
VS10XX_XCS_BIT = "4"
VS10XX_BSYNC_PORT = "AVRPORTB"
VS10XX_BSYNC_BIT = "5"
VS10XX_HWRST_RECOVER = "2"
VS10XX_SWRST_RECOVER = "1"

2.
I applied the patch http://sourceforge.net/support/tracker.php?aid=3059633
and changed line 61 of nutpiper/player.c from
#include <dev/vs1001k.h>
to
#include <dev/vs10xx.h>

3.
calling nutconfigure with the configuration from 1.
cd nutbld && make clean && make install

4.
cd nutpiper
make

5.
I flashed the application and the beep and an audio stream can be heared. However, the sound is much too slow.

6.
I already checked the initialization sequence:
The following code lines from VsPlayerReset(...) (vs10xx.c) are definitely compiled:

#if VS10XX_FREQ < 20000000UL
    VsRegWrite(VS_CLOCKF_REG, (uint16_t)(VS_CF_DOUBLER | (VS10XX_FREQ / 2000UL)));
#else
...
#endif

#if defined(AUDIO_VS1001K)
    /* Force frequency change (see datasheet). */
    VsRegWrite(VS_INT_FCTLH_REG, 0x8008);
    //VsRegRead(VS_CLOCKF_REG);
#endif



My questions are now:

1.
What else can be the reason for the much to slow sound?
What should I have to check for?

2.
I didn't find any notice in the VS1001 data-sheet about forcing the frequency change in a way which is used in vs10xx.c:
#if defined(AUDIO_VS1001K)
    /* Force frequency change (see datasheet). */
    VsRegWrite(VS_INT_FCTLH_REG, 0x8008);
    //VsRegRead(VS_CLOCKF_REG);
#endif

Contrarily, it is written that INT_FCTLH must not be set
(citation: "internal register, never use").

And on http://www.vlsi.fi/en/support/faq.html#c656 one can read the following:

==== begin citation ====
Symptom: Always wrong playback speed, but not exactly 1/3 of correct speed 

If you are always getting consistently wrong playback speed, check if you have successfully written a correct value to the CLOCKF register by first writing to the register and then reading your value.
==== end citation ====

How do you interpret this?
a) Reread the value to check if its correctly written?
b) Rereading the value forces the frequency change?


Best regards,

Jan

-- 
GMX DSL SOMMER-SPECIAL: Surf & Phone Flat 16.000 für nur 19,99 Euro/mtl.!*
http://portal.gmx.net/de/go/dsl



More information about the En-Nut-Discussion mailing list