0

MAX98357A on Feather M0 Wifi Not Working
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

MAX98357A on Feather M0 Wifi Not Working

by scott14468 on Sun Aug 18, 2019 1:34 pm

Hi,
I am running a MAX98357A I2S amp from a Adafruit Feather M0 Wifi and having issues. I have several questions about the Adafruit Zero I2S library that doesn't seem to be doing what it should.

First, for all modes BCLK and word select (WS) have the correct relationship in that there are 8, 16 or 32 BCLK positive pulses for each state of WS. For 16 and 32 bit modes the WS frequency matches my target value (established in the i2s.begin() call. I am running at 8 KHz for compatibility with the MAX98357A. In 8-bit mode however, selecting a 8 KHz output rate produces 25.2 KHz, not the 8 KHz I expect. Why?

Second, and more importantly, I only see the I2S serial output (on pin 9) high for negative sample values, never for positive (samples). As I understand it, the values I'm supplying to i2s.write( i, i ) should be output bit-for-bit (MSB first) in binary. This isn't what I see. What am I doing wrong?

I am using the Arduino Adafruit Zero I2S library 1.1.2 (updated yesterday), and similarly have updated all installed libraries.

I have attached an Arduino sketch that initialized the i2s interface, and loads an array with ramp waveform values ranging from -110 to 7999-110. I am generating an oscilloscope frame trigger on pin 6 (shown in green). The other traces are blue (word select WS), yellow BCLK, and I2S data out. I have verified (using Arduino's serial plotter) that the values in soundbuf[] range from -110 to 7999-110 as expected.

Thanks for your help,
Scott
Attachments
wave2.png
wave2.png (36.83 KiB) Viewed 50 times
wave.png
wave.png (44.2 KiB) Viewed 50 times
arduino_spi_i2s.ino
(1.31 KiB) Downloaded 3 times

scott14468
 
Posts: 5
Joined: Mon Mar 28, 2016 8:02 pm

Re: MAX98357A on Feather M0 Wifi Not Working

by scott14468 on Tue Aug 20, 2019 8:34 am

Any thoughts on what's happening?
Thanks,
Scott

scott14468
 
Posts: 5
Joined: Mon Mar 28, 2016 8:02 pm

Please be positive and constructive with your questions and comments.