VLSI1063 hangs during MP3 encoding

Writing software for systems that use VLSI Solution's devices as slave codecs to a host microcontroller.
User avatar
Panu
VLSI Staff
Posts: 2674
Joined: Tue 2010-06-22 13:43

Re: VLSI1063 hangs during MP3 encoding

Post by Panu » Mon 2018-01-08 16:26

Hi!

I don't think that your problems are electrical, but you could still read the Ground layout and PCB design guidelines at: viewtopic.php?f=2&t=1101

From IC operation standpoint the main problem probably is that your analog and digital grounds are separate. You should generally only have one ground for the VS1063 (and basically for any IC ... one substrate - one ground...). I can also discuss analog performance at lengths if you like. But in any case, you could just short the DGND and AGND together to see if it makes any difference, although I don't think that is the problem. Please continue with Pasi to debug the SPI data traffic..

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

KtroniX
User
Posts: 6
Joined: Tue 2017-01-31 12:44

Re: VLSI1063 hangs during MP3 encoding

Post by KtroniX » Tue 2018-01-09 9:23

Hi,
Digital and Analog Grounds are shorted together with 0R resistor under IC.
GND_GNDA.png
gnda_gndd
GND_GNDA.png (143.92 KiB) Viewed 1334 times

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

Re: VLSI1063 hangs during MP3 encoding

Post by pasi » Tue 2018-01-09 13:10

Could you zoom in on one byte transfer?

If the patch upload can get stuck like that, the issue is probably in the SPI transfers.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

lauba1
User
Posts: 17
Joined: Wed 2017-01-11 9:26

Re: VLSI1063 hangs during MP3 encoding

Post by lauba1 » Fri 2018-01-12 9:03

Send020A.jpg
Send020A.jpg (69.69 KiB) Viewed 1314 times

lauba1
User
Posts: 17
Joined: Wed 2017-01-11 9:26

Re: VLSI1063 hangs during MP3 encoding

Post by lauba1 » Fri 2018-01-12 11:15

Here is setting for SPI.
So the first question is. If we are using VLSI as recoreder in MP3 format so frnakly sepaking we are using only SCI, so SDI is not using?
we should have all time pin xDCS set to 1? and toggling only XCS?

Here is setting the SPI.
CLK polarity LOW and send data in the first edge -> rising.

Code: Select all

void MX_SPI2_Init(uint32_t u32BaudRatePresc)
{

  hspi2.Instance = SPI2;
  hspi2.Init.Mode = SPI_MODE_MASTER;
  hspi2.Init.Direction = SPI_DIRECTION_2LINES;
  hspi2.Init.DataSize = SPI_DATASIZE_8BIT;
  hspi2.Init.CLKPolarity = SPI_POLARITY_LOW;
  hspi2.Init.CLKPhase = SPI_PHASE_1EDGE;
  hspi2.Init.NSS = SPI_NSS_SOFT;
  hspi2.Init.BaudRatePrescaler = u32BaudRatePresc;
  hspi2.Init.FirstBit = SPI_FIRSTBIT_MSB;
  hspi2.Init.TIMode = SPI_TIMODE_DISABLE;
  hspi2.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
  hspi2.Init.CRCPolynomial = 7;
  hspi2.Init.CRCLength = SPI_CRC_LENGTH_DATASIZE;
  hspi2.Init.NSSPMode = SPI_NSS_PULSE_DISABLE;
  if (HAL_SPI_Init(&hspi2) != HAL_OK)
  {
    _Error_Handler(__FILE__, __LINE__);
  }

}

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

Re: VLSI1063 hangs during MP3 encoding

Post by pasi » Mon 2018-01-15 12:33

The data and clock seem good.

xDCS should have a pull-up resistor even when you are not using it.

Also double-check that xTEST is pulled high or connected directly to IOVDD.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

lauba1
User
Posts: 17
Joined: Wed 2017-01-11 9:26

Re: VLSI1063 hangs during MP3 encoding

Post by lauba1 » Mon 2018-01-15 12:50

all is done and still the same, in some situation the dreq stopped to work....
without plugin is the same situation.
So maybe we forgot about some setting in vlsi?

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

Re: VLSI1063 hangs during MP3 encoding

Post by pasi » Mon 2018-01-15 17:12

There is very little you should need to do. My normal startup sequence is:
1) Wait for DREQ to raise
2) Write 0x4c00 to SCI_MODE (our setup needs shared mode)
3) Write a suitable value to SCI_CLOCKF, (wait for DREQ to raise)
4) Send the patches package, which includes a write to AIADDR to start it, wait for DREQ to raise.
Then use appropriately...

I think I previously checked that your SPI speed is low enough, but you could try adding a bit of delay after each write to SCI_WRAMADDR (when loading the patch).
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

lauba1
User
Posts: 17
Joined: Wed 2017-01-11 9:26

Re: VLSI1063 hangs during MP3 encoding

Post by lauba1 » Mon 2018-01-15 17:49

ok we will write simple software only do this operations and then I will describe step by set here how is looking.

lauba1
User
Posts: 17
Joined: Wed 2017-01-11 9:26

Re: VLSI1063 hangs during MP3 encoding

Post by lauba1 » Thu 2018-01-18 8:39

I have question, if we are in the loop and all time asking the register SCI_RECWORDS it can cause the problem in VLSI side? maybe we should asking the register in some interval time?

Post Reply