<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[M5Stack speaker not working]]></title><description><![CDATA[<p dir="auto">When I call the M5.Speaker.begin or M5.Speaker.tone functions it just crashes and reboots.<br />
I'm coding from the Arduino IDE, and even the example Speaker sketch causes the same behaviour.<br />
Is my M5Stack broken? I got the thing today, and I'm certain it was making sounds when it booted up the first time.</p>
]]></description><link>https://community.m5stack.com/topic/3894/m5stack-speaker-not-working</link><generator>RSS for Node</generator><lastBuildDate>Mon, 16 Mar 2026 08:21:49 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3894.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 04 Jan 2022 19:41:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to M5Stack speaker not working on Sun, 03 Jul 2022 07:05:36 GMT]]></title><description><![CDATA[<p dir="auto">Hello guys</p>
<p dir="auto">The issue is a divide by zero, caused by the <code>ledcSetup(TON_PIN_CHANNEL, 0, 13);</code> function call found by <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/22338">@a4x4kiwi</a> (thanks for that).</p>
<p dir="auto">I found that the outcome is different depending on the Arduino version used:</p>
<ul>
<li>Arduino 1.0.6 - no error, no crash</li>
<li>Arduino 2.0.1 - no error, no crash</li>
<li>Arduino 2.0.2 - crash</li>
<li>Arduino 2.0.3 - error, no crash</li>
</ul>
<pre><code>E (4532) ledc: freq_hz=0 duty_resolution=13
[  4537][E][esp32-hal-ledc.c:75] ledcSetup(): ledc setup failed!
</code></pre>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/17891</link><guid isPermaLink="true">https://community.m5stack.com/post/17891</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sun, 03 Jul 2022 07:05:36 GMT</pubDate></item><item><title><![CDATA[Reply to M5Stack speaker not working on Sun, 03 Jul 2022 02:45:52 GMT]]></title><description><![CDATA[<p dir="auto">I resolved the crash problem in a hacky way.</p>
<p dir="auto">Within the library, edit the file Speaker.cpp</p>
<p dir="auto">Edit line 12 to read :<br />
ledcSetup(TONE_PIN_CHANNEL, 1000, 13);</p>
<p dir="auto">I changed the 0 in the second parameter to a 1000.<br />
This is a frequency setting. I don't know what it does.</p>
<p dir="auto">It prevents the crash, allows a beep to be played, but the beep duration is wrong.</p>
]]></description><link>https://community.m5stack.com/post/17889</link><guid isPermaLink="true">https://community.m5stack.com/post/17889</guid><dc:creator><![CDATA[a4x4kiwi]]></dc:creator><pubDate>Sun, 03 Jul 2022 02:45:52 GMT</pubDate></item><item><title><![CDATA[Reply to M5Stack speaker not working on Sat, 28 May 2022 22:12:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/343">@petero</a> I have to correct myself: The issue with the speaker is appearing with old M5Stack Core 1 versions as well, after I have used the new driver "CH34XSER_MAC". Very Strange!</p>
]]></description><link>https://community.m5stack.com/post/17603</link><guid isPermaLink="true">https://community.m5stack.com/post/17603</guid><dc:creator><![CDATA[PeterO]]></dc:creator><pubDate>Sat, 28 May 2022 22:12:32 GMT</pubDate></item><item><title><![CDATA[Reply to M5Stack speaker not working on Sat, 28 May 2022 20:18:49 GMT]]></title><description><![CDATA[<p dir="auto">hello All,<br />
I have the same issue, it started with this new version 2021-0907 V2.61. M5Stack changed the driver that was the first unexpected issue. Ok I managed it and then I have found that SD card reading and writing is not possible, when I load a test Sketch. The factory test which is on a new device is working fine, that means the M5Stack is ok, but the library or my installation need an update. Have done that, but no luck.<br />
Today I have found that I am getting a Guru Meditation error, which goes away when I disable the //  M5.Speaker.tone(1200);<br />
speaker command.</p>
<p dir="auto">Sorry that I do not have a fix yet, I need to investigate more and I would be happy if someone has an idea how to solve that issue.</p>
<p dir="auto">best regards<br />
Peter</p>
<p dir="auto">E (53174) ledc: freq_hz=0 duty_resolution=13<br />
Guru Meditation Error: Core  1 panic'ed (IntegerDivideByZero). Exception was unhandled.</p>
<p dir="auto">Core  1 register dump:<br />
PC      : 0x4000d099  PS      : 0x00060730  A0      : 0x800e89f2  A1      : 0x3ffb26c0<br />
A2      : 0x0f424000  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x00000000<br />
A6      : 0x00060720  A7      : 0x00000001  A8      : 0x00000001  A9      : 0x00000000<br />
A10     : 0x00000000  A11     : 0x0f424000  A12     : 0x00060720  A13     : 0x3ffb26c0<br />
A14     : 0x007be1a8  A15     : 0x003fffff  SAR     : 0x00000001  EXCCAUSE: 0x00000006<br />
EXCVADDR: 0x00000000  LBEG    : 0x40087571  LEND    : 0x40087581  LCOUNT  : 0xffffffff</p>
<p dir="auto">Backtrace:0x4000d096:0x3ffb26c00x400e89ef:0x3ffb26e0 0x400e4119:0x3ffb2720 0x400e0d9e:0x3ffb2760 0x400e0dc5:0x3ffb2780 0x400d5c5d:0x3ffb27a0 0x400dd723:0x3ffb2800 0x400e614d:0x3ffb2820</p>
]]></description><link>https://community.m5stack.com/post/17602</link><guid isPermaLink="true">https://community.m5stack.com/post/17602</guid><dc:creator><![CDATA[PeterO]]></dc:creator><pubDate>Sat, 28 May 2022 20:18:49 GMT</pubDate></item><item><title><![CDATA[Reply to M5Stack speaker not working on Sun, 17 Apr 2022 05:13:36 GMT]]></title><description><![CDATA[<p dir="auto">The same phenomenon occurs in my Basic and Gray.<br />
Execute the sample sketch [Speaker] and press the A or B button to reset the CPU.</p>
<p dir="auto">It does not occur when the board definition is returned to Ver2.0.1.<br />
I am confident that there is a problem with the board definition Ver2.0.2.</p>
]]></description><link>https://community.m5stack.com/post/17205</link><guid isPermaLink="true">https://community.m5stack.com/post/17205</guid><dc:creator><![CDATA[moyane]]></dc:creator><pubDate>Sun, 17 Apr 2022 05:13:36 GMT</pubDate></item><item><title><![CDATA[Reply to M5Stack speaker not working on Tue, 29 Mar 2022 13:53:06 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">The same happens to me.<br />
I have re-installed Arduino IDE and M5Stack libraries, but no change.</p>
<p dir="auto">M5Stack staff please help!</p>
<p dir="auto">Thanks<br />
Ingo</p>
]]></description><link>https://community.m5stack.com/post/17048</link><guid isPermaLink="true">https://community.m5stack.com/post/17048</guid><dc:creator><![CDATA[kiki]]></dc:creator><pubDate>Tue, 29 Mar 2022 13:53:06 GMT</pubDate></item><item><title><![CDATA[Reply to M5Stack speaker not working on Fri, 07 Jan 2022 01:47:18 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/15642">@nexusdk</a></p>
<p dir="auto">thank you for the information - that all sound correct. And since you have a sketch running, albeit w/o using the speaker; I am out of ideas at this point in time. Sorry.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/16095</link><guid isPermaLink="true">https://community.m5stack.com/post/16095</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Fri, 07 Jan 2022 01:47:18 GMT</pubDate></item><item><title><![CDATA[Reply to M5Stack speaker not working on Thu, 06 Jan 2022 18:18:09 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a>,</p>
<p dir="auto">I believe it's the M5Stack Core. The sticker on the top reads 2AN3WM5Stack-CORE. It was purchased from here:<br />
<a href="https://www.tinytronics.nl/shop/en/platforms-and-systems/m5stack/m5core/m5core/m5stack-esp32-basic-development-kit" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.tinytronics.nl/shop/en/platforms-and-systems/m5stack/m5core/m5core/m5stack-esp32-basic-development-kit</a></p>
<p dir="auto">My current sketch connects to my wifi, gets time via NTP and shows a little game of Pong on the screen. All of this works fine on the device.</p>
<p dir="auto">The board selected in Arduino IDE is M5Stack-Core-ESP32</p>
]]></description><link>https://community.m5stack.com/post/16090</link><guid isPermaLink="true">https://community.m5stack.com/post/16090</guid><dc:creator><![CDATA[nexusdk]]></dc:creator><pubDate>Thu, 06 Jan 2022 18:18:09 GMT</pubDate></item><item><title><![CDATA[Reply to M5Stack speaker not working on Thu, 06 Jan 2022 03:59:32 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/15642">@nexusdk</a></p>
<p dir="auto">thank you for sharing. That is strange. I cannot provoke that 'divide by 0' error in my setup.</p>
<p dir="auto">Exactly which M5Stack device are you using? M5Stack (Base, Gray, Fire) or M5Core2?</p>
<p dir="auto">In Arduino IDE which board have you chosen under <code>Tools</code> - <code>Board</code>?</p>
<p dir="auto">Can you compile and run a basic sketch like <code>Hello World</code>?</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/16083</link><guid isPermaLink="true">https://community.m5stack.com/post/16083</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Thu, 06 Jan 2022 03:59:32 GMT</pubDate></item><item><title><![CDATA[Reply to M5Stack speaker not working on Wed, 05 Jan 2022 20:38:15 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a>,</p>
<p dir="auto">Thanks for the response. This is the crash log:</p>
<pre><code>M5Stack initializing...OK
E (14534) ledc: freq_hz=0 duty_resolution=13
Guru Meditation Error: Core  1 panic'ed (IntegerDivideByZero). Exception was unhandled.

Core  1 register dump:
PC      : 0x4000d099  PS      : 0x00060830  A0      : 0x800ddc9e  A1      : 0x3ffb2720  
A2      : 0x0f424000  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x00000000  
A6      : 0x00060820  A7      : 0x00000001  A8      : 0x00000001  A9      : 0x00000000  
A10     : 0x00000000  A11     : 0x0f424000  A12     : 0x00060820  A13     : 0x3ffb2720  
A14     : 0x007bdc94  A15     : 0x003fffff  SAR     : 0x00000001  EXCCAUSE: 0x00000006  
EXCVADDR: 0x00000000  LBEG    : 0x4008b5a5  LEND    : 0x4008b5b5  LCOUNT  : 0xfffffffe  


Backtrace:0x4000d096:0x3ffb27200x400ddc9b:0x3ffb2740 0x400d90b1:0x3ffb2780 0x400d572e:0x3ffb27c0 0x400d5755:0x3ffb27e0 0x400d29b9:0x3ffb2800 0x400dab9a:0x3ffb2820 




ELF file SHA256: 0000000000000000

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1324
ho 0 tail 12 room 4
load:0x40078000,len:13508
load:0x40080400,len:3604
entry 0x400805f0
</code></pre>
<p dir="auto">When calling M5.Speaker.begin() I also get the IntegerDivideByZero.<br />
I actually did not know there was a crash log like this, so thanks for that!</p>
<p dir="auto">Burning the UIFlow firmware and using the speaker via <a href="https://flow.m5stack.com/" target="_blank" rel="noopener noreferrer nofollow ugc">https://flow.m5stack.com/</a> does work, so it must be something I am doing wrong. I am relieved that the device itself is not broken.</p>
]]></description><link>https://community.m5stack.com/post/16076</link><guid isPermaLink="true">https://community.m5stack.com/post/16076</guid><dc:creator><![CDATA[nexusdk]]></dc:creator><pubDate>Wed, 05 Jan 2022 20:38:15 GMT</pubDate></item><item><title><![CDATA[Reply to M5Stack speaker not working on Wed, 05 Jan 2022 08:00:29 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/15642">@nexusdk</a></p>
<p dir="auto">I've just tested the Speaker sketch on my M5Stack Fire myself and the tones work just fine - no crash.</p>
<p dir="auto">Posting the crash log might be helpful to figure out what going on.</p>
<p dir="auto">Also as a test, could you try to install UIFlow firmware and check if the speaker works then?</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/16062</link><guid isPermaLink="true">https://community.m5stack.com/post/16062</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Wed, 05 Jan 2022 08:00:29 GMT</pubDate></item></channel></rss>