Page 1 of 1

SAMV71 Xplained - USB Audio

Posted: Thu May 14, 2015 4:08 pm
by Marek_Skalski
Hello All!
I try to switch from Cortex-M4 (from ST) to Cortex-M7, to have more computational power for signal processing. It's brand new SAMV71 Xplained Ultra board from Digi-Key. I tried to build the device example: 'usb_audio_speaker'. There were 2 errors caused by improper declaration of arguments (unsigned char type iso uint8_t) in source files, but this had been solved and finally project built and downloaded.
I feel very dissapointed with the quality of the audio signal. It's noisy, sounds like strongly overdriven with 10% vol set at host side, and I can hear that it skips some data blocks every few seconds. Did any of you try to use this example? Did you find the same issue? I suspect some problems with DMA (discontinous/interrupted transfers) and wrong mode settings (I2S or codec), but I'm new with Atmel Studio and Atmel's MCUs.
I also expected this firmware to be tested before. Was it?

Re: SAMV71 Xplained - USB Audio

Posted: Thu May 14, 2015 5:27 pm
by yun
Sounds like improper clocking... check that first. I haven't used the M7 series but with the M3 the DMA is glitchy/hard to work with audio with so maybe Atmel hasn't properly fixed that? Maybe someone else can tell me I'm wrong. But I suggest checking the MCLKs and BCLKs for the SSC peripheral first.

Re: SAMV71 Xplained - USB Audio

Posted: Thu May 14, 2015 7:54 pm
by Marek_Skalski
Thanks yun,
you were right!
What I found until now, Fs is set to 48kHz, but it varies from 47.1kHz to 47.6kHz; measured at PB00. It's not stable, and there is no Reference Clock for CS2100 (PD21), so PLL is not in use; no signal at PA22. This seems to be the reason for skipping some samples due to buffer overflow.
Every 1128us there is a break in data transmission for ~135us. This is a typical DMA issue.
I'll search for the root cause in software.

Re: SAMV71 Xplained - USB Audio

Posted: Fri May 15, 2015 8:43 pm
by yun
Yes... it seems like Atmel writes their ASF files (at least the ones with SSC and DMAC) with multiple issues. Hope you work it out! I am also interested in seeing a solution