LyraT crashing when Volume reaches 0.6 #2222
-
|
This is a LyraT 4.3 board, the code is basically the hls-buffer-i2s.ino example modified to include a volume control controlled by an IR receiver. I get the stream okay through the speakers, and IR codes are received fine. I'm starting the volume at 0.3 and incrementing (or decrementing) it by 0.1, min of 0, max of 1. The volume does increase (or decrease) but the board crashes and reboots when the volume reaches 0.6. It does this every time. If I uncomment vcfg.allow_boost = true; and run the program the board crashes and reboots straight away. I hope I have the code right: Any ideas and/or guidance much appreciated. I've had trouble getting log information, as recommended I've been running it at Warning, and there is an awful lot of output at Info level. If I set AudioToolsLogLevel::Info the sound breaks up but I can raise the Volume further (to a point).
|
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 1 reply
-
|
A couple of hints:
Try to remove the Task writeTask("write", 1024 * 8, 10, 0); to double check that this is not your source of trouble... |
Beta Was this translation helpful? Give feedback.
-
|
Ah, thanks... I have no idea how to do either of those things, so a-googling I go! |
Beta Was this translation helpful? Give feedback.
-
|
Actually it is not just Volume but after a number of any keys that I'm translating pressed on the IR remote control. RAM seems fine, and there is no backtrace - the board just reboots. I think this might just be the strange character and usage of Pin 12. So... I'm trying Pin 13 (with DIP switch 4 ON this maps to the JTAG header MTCK). As per the Espressif Hardware Ref, this pin is used for
I can switch off the SD integration with sd_active = false; - thanks for the tip! Is it possible to switch off button integration? Presumably you have the Audio Vol- (TP) button already mapped to Pin 13 on the LyraT 4.3, which could be why I'm getting
(I can use the IR receiver fine on Pin 13 in a simple program). |
Beta Was this translation helpful? Give feedback.
-
|
Did you try if you can reproduce the issue w/o using tasks ? |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the reply Phil. I hope this is what you meant, I slowly added in lines of code until the error happened, it is the line
the error is
here is code |
Beta Was this translation helpful? Give feedback.
-
|
I am getting these errors as well: this has no impact and can be ignored... |
Beta Was this translation helpful? Give feedback.
-
|
Ah, many thanks, I2SCodecStream might be what I need then. |
Beta Was this translation helpful? Give feedback.
-
|
Unfortunately using I2SCodecStream doesn't make any difference - pin 13 still won't work. To recap, on the LyraT 4.3 board, with DIP switch 4 ON (Pin 13 maps to the MTCK JTAG header pin) I can use Pin 13 successfully to blink an LED or read from the IR Receiver (without your code). (When I was trying to use Pin 12 along with your code the IR Receiver worked - before it reset the board. So the IR Receiver code is okay). I have sd_active = false; set as you recommended. There must be something still using (or blocking) Pin 13 though? I see Pin 13 (on the LyraT 4.3) in DriverPIns.h: and Pin 13 is also referenced in ESP32PinsSD (as per addSPI(ESP32PinsSD);) Could either of these be causing the problem? Is there a way to see whether Pin 13 is still being used in your code (and by what)? Sorry to keep on about this but the LyraT board offers very little in the way of 'user' pins, it would be great if at least one could be used with your code! |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the reply Phil. Moving the IR Receiver setup call to after out.begin() made Pin 13 work! Oddly, the board resets if the Volume is more than 0.7... This happens whether I hard code the value, or use the IR Receiver handset +/-. So maxVolume will be coded as 0.7 The other buttons on the handset seem to be fine (they weren't using Pin 12). Once again, many thanks for your help - and your patience ! |
Beta Was this translation helpful? Give feedback.
A couple of hints:
Try to remove the Task writeTask("write", 1024 * 8, 10, 0); to double check that this is not your source of trouble...