Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: AudioPlaySerialflashRaw and Multiple Flash Chips

  1. #1
    Junior Member
    Join Date
    Dec 2018
    Location
    Perth, Australia
    Posts
    3

    AudioPlaySerialflashRaw and Multiple Flash Chips

    Hi,
    I am building a Drum Module and I have a large list of samples that I need to store on the Flash Memory. Since I already have a few S25FL512S available I am planning on using them but I would need about 3 or 4 chips to store all the samples. The problem I am facing is that the AudioPlaySerialflashRaw seems to only read from one Flash Chip, and not multiple. Is that correct or am I missing something here? If that is correct, would I have to modify the existing audio library to define multiple chips? In time, does any knows any other Flash Memory that could store at least 264Mbytes and that is "cost efficient"?

  2. #2
    Senior Member
    Join Date
    Feb 2017
    Posts
    272
    Why not play off the SD card?

  3. #3
    Junior Member
    Join Date
    Dec 2018
    Location
    Perth, Australia
    Posts
    3
    Drum samples are 2-3 seconds long and are continously accessed by the processor. I need at least a 12 sounds polyphony and I can achieve way more than that with a flash chip. A class 10 SD card is not fast enough to allow more than 4 samples to be played at the same time.

  4. #4
    Senior Member
    Join Date
    Feb 2017
    Posts
    272
    Ah. OK, looking at the Audio Board schematics I see that the serial flash is just a SPI device with its own CS. I don't see any reason, in theory, that you couldn't hang more devices off the SPI bus with individual CS outputs from the Teensy. You specify the CS pin in the call to the SerialFlash.begin() method.

    It looks like the Audio Library code only uses the global SerialFlash object. Actually, I don't know if you can instantiate more. Obviously, you can't accesses multiple flash chips at the same time. So, I imagine that you'd need to group all the drum samples that you would want to play simultaneously all on the same chip. You'd specify that chip's CS in the call to begin(). You'd switch chips to other drum samples sets by calling begin() again with a new CS.

    Caveat: all of the above conjecture is based only upon spending 10 minutes looking at the applicable code.

  5. #5
    Junior Member
    Join Date
    Dec 2018
    Location
    Perth, Australia
    Posts
    3
    I need to do some further testing on a real practical situation but it only takes 10 microseconds to initialize the SerialFlash (SeriaFlash.begin()), so initializing the Flash chip everytime I'm playing a sample could work. Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •