Open dwetchells opened 4 months ago
@dwetchells If you reduce the program to something like the below, does it still crash? I have removed all the display and control peripheral code. Does it crash on pretty much any MP3 file?
# ... appropriate import statements
# SD Card setup
sd_cs = board.D13
sdcard = sdcardio.SDCard(spi, sd_cs)
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")
mp3_filename = "something.mp3" # your first filename
mp3_file = open(mp3_filename, "rb")
mp3stream = audiomp3.MP3Decoder(mp3_file)
Yes. I tried everything I could think of came to the conclusion that the library was not compatible. If I went back to 8.x it recognized the sd card. Totally repeatable.
Sent from Mars
From: Dan Halbert @.> Sent: Monday, June 3, 2024 2:43:40 PM To: adafruit/circuitpython @.> Cc: ThinMan @.>; Mention @.> Subject: Re: [adafruit/circuitpython] Walkmp3rson learn guide does not work with CP 9.x Freezes and displays USB not recognizable on PC Windows (Issue #9211)
@dwetchellshttps://github.com/dwetchells If you reduce the program to something like the below, does it still crash? I have removed all the display and control peripheral code. Does it crash on pretty much any MP3 file?
sd_cs = board.D13 sdcard = sdcardio.SDCard(spi, sd_cs) vfs = storage.VfsFat(sdcard) storage.mount(vfs, "/sd")
mp3_filename = "something.mp3" # your first filename
mp3_file = open(mp3_filename, "rb") mp3stream = audiomp3.MP3Decoder(mp3_file)
— Reply to this email directly, view it on GitHubhttps://github.com/adafruit/circuitpython/issues/9211#issuecomment-2146087748, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJTJEZE5ANBGVL2PYRKPWMLZFTIPZAVCNFSM6AAAAABG3NW6E6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBWGA4DONZUHA. You are receiving this because you were mentioned.Message ID: @.***>
One other thing. It tried it using a nRF52480 and it works with cp 9. I thinks it a rp2040 issue if that helps.
Sent from Mars
From: Dan Halbert @.> Sent: Monday, June 3, 2024 2:43:40 PM To: adafruit/circuitpython @.> Cc: ThinMan @.>; Mention @.> Subject: Re: [adafruit/circuitpython] Walkmp3rson learn guide does not work with CP 9.x Freezes and displays USB not recognizable on PC Windows (Issue #9211)
@dwetchellshttps://github.com/dwetchells If you reduce the program to something like the below, does it still crash? I have removed all the display and control peripheral code. Does it crash on pretty much any MP3 file?
sd_cs = board.D13 sdcard = sdcardio.SDCard(spi, sd_cs) vfs = storage.VfsFat(sdcard) storage.mount(vfs, "/sd")
mp3_filename = "something.mp3" # your first filename
mp3_file = open(mp3_filename, "rb") mp3stream = audiomp3.MP3Decoder(mp3_file)
— Reply to this email directly, view it on GitHubhttps://github.com/adafruit/circuitpython/issues/9211#issuecomment-2146087748, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJTJEZE5ANBGVL2PYRKPWMLZFTIPZAVCNFSM6AAAAABG3NW6E6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBWGA4DONZUHA. You are receiving this because you were mentioned.Message ID: @.***>
I tried the code you have above, only changing some pin assignments to use a TFT FeatherWing with an SD card socket. I am using an Adafruit Feather RP2040. I do not see the hard crash you see after mp3stream = audiomp3.MP3Decoder(mp3_file)
. I am using a generic Micro Center 16GB SD card.
I am using the two low-bit rateMP3 files from here: https://github.com/adafruit/Adafruit_Learning_System_Guides/tree/main/MP3_Playback_RP2040/Pico_Multi_File
If you have an MP3 file that causes a crash, could you point to it or drop it here? You may need to .zip it up. Or if you can't do that, could you give me details about the MP3 bit rate, etc.?
Huh. I will tear it down and restart. What pin assignment did you choose. Right now it just crashes the moment it read the SD card. I am using 9.0.2 so maybe it got fixed in 9.0 5. Fingers crossed. Thanks for looking into this. Not sure why the RP2040 is causing the problem for me and the other MC boards are working
Sent from Mars
From: Dan Halbert @.> Sent: Monday, June 3, 2024 7:50:06 PM To: adafruit/circuitpython @.> Cc: ThinMan @.>; Mention @.> Subject: Re: [adafruit/circuitpython] Walkmp3rson learn guide does not work with CP 9.x Freezes and displays USB not recognizable on PC Windows (Issue #9211)
I tried the code you have above, only changing some pin assignments to use a TFT FeatherWing with an SD card socket. I am using an Adafruit Feather RP2040. I do not see the hard crash you see after mp3stream = audiomp3.MP3Decoder(mp3_file). I am using a generic Micro Center 16GB SD card.
I am using the two low-bit rateMP3 files from here: https://github.com/adafruit/Adafruit_Learning_System_Guides/tree/main/MP3_Playback_RP2040/Pico_Multi_File
If you have an MP3 file that causes a crash, could you point to it or drop it here? You may need to .zip it up. Or if you can't do that, could you give me details about the MP3 bit rate, etc.?
— Reply to this email directly, view it on GitHubhttps://github.com/adafruit/circuitpython/issues/9211#issuecomment-2146414506, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJTJEZBYNTYL7XIUGVACRUDZFUMM5AVCNFSM6AAAAABG3NW6E6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBWGQYTINJQGY. You are receiving this because you were mentioned.Message ID: @.***>
I was using a couple of different TFT FeatherWings: https://www.adafruit.com/search?q=tft+featherwing. These don't actually have the correct display (it shows up as a mirror image), but that doesn't matter -- it's not going to affect the operation of the program, because these displays are write-only. But the TFT FeatherWings have an SD socket too, so that provided the SD card for me without having to wire it up. If you have an SD card FeatherWing or similar, you could try that. Else try to make the connections as short as possible.
Try 9.0.5 or 9.1.0-beta.3, but this sounds more like an SD card problem than a version problem. Also try the .mp3's I pointed to above. It may be an MP3 problem of some kind.
I tested again with a 320kb bitrate MP3 and did not see a crash. I'm going to take this issue off the 9.1.0 milestone for now, but happy to keep debugging.
Hi Dan, So We picked a new RP2040 Feather board and installed 9.1.3 beta an the required 9.0 libraries. Using all of what John Parks hardware it still fails. attached is a photo and the code I am using. If I go back to CP 8 and its libraries. It works just fine. If I use other MCUs they all work except the RP2040. Just so odd I haven't tried a different SD socket yet since it works with CP 8.0x just so odd. I tried serveral SD Cards as well for alot of vendors including what Adafruit sells. I've event tried creating a SD directory on the SD card.
Thanks again for your time. Dale Etchells aka Thinman
Once it runs the last line of code below it crashes
sd_cs = board.D13 sdcard = sdcardio.SDCard(spi, sd_cs) vfs = storage.VfsFat(sdcard) storage.mount(vfs, "/sd")
From: Dan Halbert @.> Sent: Tuesday, June 4, 2024 8:27 AM To: adafruit/circuitpython @.> Cc: ThinMan @.>; Mention @.> Subject: Re: [adafruit/circuitpython] Walkmp3rson learn guide does not work with CP 9.x Freezes and displays USB not recognizable on PC Windows (Issue #9211)
I tested again with a 320kb bitrate MP3 and did not see a crash. I'm going to take this issue of this 9.1.0 milestone for now, but happy to keep debugging.
— Reply to this email directly, view it on GitHubhttps://github.com/adafruit/circuitpython/issues/9211#issuecomment-2147680360, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJTJEZFRE6CPNB77KSLWG2TZFXFELAVCNFSM6AAAAABG3NW6E6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBXGY4DAMZWGA. You are receiving this because you were mentioned.Message ID: @.***>
Hey Dan, Still testing. I have JP project working on a nRF52840 with the sound files from JP project. Still no luck with using an RP2040. Waiting on some other feathers to try when they come in. Thats what I get when I use the US Postal system. but it gets here. UPS has lost to many of my orders. Thank again. I'll try changing the bit rate down. I would not have thought it would stop the directory display of the SD card but what do I know. Have a super week..
Dale
From: Dan Halbert @.> Sent: Tuesday, June 4, 2024 8:27 AM To: adafruit/circuitpython @.> Cc: ThinMan @.>; Mention @.> Subject: Re: [adafruit/circuitpython] Walkmp3rson learn guide does not work with CP 9.x Freezes and displays USB not recognizable on PC Windows (Issue #9211)
I tested again with a 320kb bitrate MP3 and did not see a crash. I'm going to take this issue of this 9.1.0 milestone for now, but happy to keep debugging.
— Reply to this email directly, view it on GitHubhttps://github.com/adafruit/circuitpython/issues/9211#issuecomment-2147680360, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJTJEZFRE6CPNB77KSLWG2TZFXFELAVCNFSM6AAAAABG3NW6E6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBXGY4DAMZWGA. You are receiving this because you were mentioned.Message ID: @.***>
Hi Dan, Question. Which feather board did you use in your testing. Did you try a RP2040 board. I ordered Adafruit's latest RP2040 Logger board to see if I get the same non-responsive results. Thanks again. I know you guys are all very busy. Dale Etchells
From: Dan Halbert @.> Sent: Tuesday, June 4, 2024 8:27 AM To: adafruit/circuitpython @.> Cc: ThinMan @.>; Mention @.> Subject: Re: [adafruit/circuitpython] Walkmp3rson learn guide does not work with CP 9.x Freezes and displays USB not recognizable on PC Windows (Issue #9211)
I tested again with a 320kb bitrate MP3 and did not see a crash. I'm going to take this issue of this 9.1.0 milestone for now, but happy to keep debugging.
- Reply to this email directly, view it on GitHubhttps://github.com/adafruit/circuitpython/issues/9211#issuecomment-2147680360, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJTJEZFRE6CPNB77KSLWG2TZFXFELAVCNFSM6AAAAABG3NW6E6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBXGY4DAMZWGA. You are receiving this because you were mentioned.Message ID: @.**@.>>
@dwetchells I was using an Adafruit Feather RP2040. The RP2040 Adalogger should be essentially the same
CircuitPython version
Code/REPL
Behavior
Walkmp3rson program crashes. Does not display anything on TFT display. If connected to Windows PC, I get a Windows error message stating the USB drive is not recognizable and disconnect the CIRCUITPY drive from my PC. If I comment the line >>> mp3stream = audiomp3.MP3Decoder(mp3_file) <<< then the program continue for until the next error which is mp3stream not defined, naturally.
Thank you for all your help and understanding. ThinMan
Description
on a RP2040 Feather used in JP Learn guide Walkmp3rson. Used all parts described in guide. Works fine using CP version 8.12. Found issue with module audiomp3 in CP 9.x. Here below is the example I used to cause the crash. If I comment out the last line the program continues on. The code is the same as JP guide.
Additional information
When this line is commented out the program continues mp3stream = audiomp3.MP3Decoder(mp3_file)