Post Go back to editing

RE: Usage of wav player module on EVAL-ADAU1452

Hello,

I have tried the procedure with the file wav.zip from 
But it does not work on my ADA1452 Eval. 
When I download FlashProgrammer.dspproj  , and then verify target memory I get : "Verify Failed: readback timed out"
And I downloaded  WavPlayer.dspproj and I get no sound.

Parents
  • Hello stmoeller60,

    I split off this reply from the old thread you replied to. We have made some bug fixes and changes to some of these modules so I think it is best to treat this as a new issue. 

    Can you explain what you are trying to do? Then attach some of the needed files like the sound files and an example project file? 

    I have a good idea what you are trying to do but I do not want to make assumptions. 

    Dave T

  • That's ok Dave !


    I'd like to play a short stereo wav file on a ADAU1467 by the touch of a push button ( GPIO )

  • Hello stmoeller60,

    Please find the attached projects and try that in your board.

    Refer the config for both projects.

    Flash programmer setting.

    wav player setting

    I have used a 440Hz beep sound like file (wav) and tested the project. The file is also attached along with the projects. It's outputting correct frequency and I have verified it with a scope.

    Change the GPIO pin to whichever pin you want to connect to your push buttons and configure it properly!

    wavplayer.zip

    Kindly do reply if you have further questions.

    Regards,

    Harish

  • Thank you very much Harish. Your project works fine.

    Now:

    I tried to load a different wav file, and it makes some click-noise at the end.

    But I checked the wav file with a media player and it doesnt make noise at the end.

     

  • Hello,

    The gdrive link that you uploaded here asks for a permission. so, can you please upload the files here in the forum?

    Below is how you can upload a file.

    1) You can drag and drop the file directly from the file location to this reply box (text window)

    2)  Or You can follow the below.

    Regards,

    Harish

  • wavplayer.dspproj

  • Hello stmoeller60,

    I am going to chime in here and make one comment. I have not downloaded your file but I did have an issue in the past with the sound file having some metadata that our routines do not strip off. The issue I had run across made a noise at the start not the end but it makes me wonder if this might be the issue. I had to go into the file with a hex editor and strip off the metadata header and footer and then figure out the size of the file. I feel this is something I think SigmaStudio should take care of but at the moment this is a low priority for bug fixes. This is a perfect place for a Python routine to do this... 

    Dave T

  • Hello Dave, 

    i will try to strip off the header . Thanks for rhe hint. 

    best regards 

    Stephan

Reply Children
  • Unfortunatly I did not succeed to strip the header.

    Also I tried to load the wav in matlab and save it as a txt file, it didn't succeed lto flahprogram: exception and crash of sigmastudio 4.6

  • Hello,

    Also I tried to load the wav in matlab and save it as a txt file, it didn't succeed lto flahprogram: exception and crash of sigmastudio 4.6

    While writing text files, please note that there should not be an empty space left out in the text file. If there is a space like in the below screenshot, then the exception error and the sigma studio crash will happen.

    Please remove the space and make it like below.

    Please find that flash programmer setting as well for writing text files.

    You can read and verify the written data by using SPI read like modules in the master control port.

    I will check with your wav file in the meanwhile.

    Regards,

    Harish

  • I checked my txt file, and there was not  an empty space left out in the text file, or lines.
    kick.txt

    The SigmaStudio crashed when I download flash_prog with it 

  • Hello,

    Your samples are in scientific e notation, the module doesn't accept it. You can change that to real numbers like below. I uploaded those 3 samples into my EEPROM and reading back the data. 

    Once you uploaded the samples in the EEPROM then you can play it back from the EEPROM by using wav player module by selecting 'Audio sample in 8.24 format' option.

    Regards,

    Harish

  • 5481.kick.txt

    flash_prog is still crashing.

    Is stereo allowed ? Which delimter must I use ?

  • I succeeded now with a wav file

    Flash_Prog works only with mono wav file

    and it needs to be int32

    in Matlab : 

    audiowrite( [dir,FileOut],cast(y * 2^31,'int32'),Fs,'BitsPerSample',32);

     

    Stereo Wav File won't work with flash_prog

  • The remaining problem I have that when I make a selboot download to my ADAU1452 it won't work anymore. The flash program gets "damaged". 

    flash_prog_1452.dspproj1452_wavplayer.dspproj

  • If someone has an idea it would be very helpful 

  • Hello stmoeller60,

    Sorry for the delayed reply.

    You can't use the same EEPROM to store the WAV file and self-boot. When writing a self-boot program to an EEPROM, previously written data will be overwritten by the new program. You can also see that Sigma Studio performs an erase operation on the EEPROM before writing the self-boot program.

    You have to use another SPI EEPROM for storing your Wav file, The SCLK, MISO, and MOSI pins will be shared between two EEPROMs from the master control port. you can use any MP pins as a slave select for that WAV file storing EEPROM.

    You MUST use the SS_M pin as a slave select for self-booting which is already connected to your Eval board (onboard EEPROM). self-boot can be only done by using the main latch (SS_M).

    So, use your onboard EEPROM (SS_M as CS) as a self-boot EEPROM and another EEPROM (any MP pins as a CS) for your writing/reading your WAV file.

    You can find two projects below, one is to write the WAV file to your EEPROM (MP8 as CS) by flash programmer and another project is reading the WAV file using wav player module (MP8 as a CS)

    In the below example, I have used MP8 as a slave select for my second EEPROM (WAV file), and respective register settings are configured in both projects.

    1)store the WAV file in your 2nd EEPROM using the Flash programmer project. (SPI configs are all set in the window)

    2) write the WAV player project to your self-boot EEPROM. (SPI configs are already set in the wav player module to read wav file from the 2nd EEPROM)

    3) Trigger the self-boot, once the program self-boots from the onboard self-boot EEPROM and the wav player project starts running, it will read the WAV file from the 2nd EEPROM and play in your output.

    wav_player R_W.zip

    Hope this helps.

    Regards,

    Harish