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 )

  • 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

  • Hello Harish , thank you very much for your very comprehensive answer ! 

    best regards 

    Stephan

  • Hello Harish,

    I do not know if it is something I have done wrong? I downloaded the zipped files, unzipped it and the two project files are 0kb. 

    I have not had time to look into this so thanks for doing this. I do have one question. Have you tried to do something like this?

    Step 1 to program the EEPROM through the DSP as normal. While this is happening watch the capture window and see what address is the end of the program.

    Step 2: Then set the Flash Programmer to a start address well above the end of the program and parameters. Of course the EEPROM size has to be large enough to hold all of this. Then load the wave file into the EEPROM at an address above the program. Then of course set the wave player to load in the wave file from the correct location. 

    The downside you did point out is that should you ever change the program the entire EEPROM will be erased so you will have to reload the wav file after updating the selfboot program. 

    I think this might work but I just have not had time to look into this. 

    Dave T

  • Hello Stephen and Dave,

    Initially I said to use two EEPROMs. One for storing the self-boot program and another one for the WAV file. We can use a single EEPROM to do this. Please give it a try as explained below.

    The thing is the self-boot routine and the flash programmer module both will erase the external memory before writing a new data into it. Either if we write the self-boot program (using self-boot procedure) or wav file (using flash programmer) first, the latter operation will erase the previously written data. So, try this method to write to both operations.

    While trying this, Initially I used a wav file, and it was successful. However, I observed a very tiny glitch at the end of the audio. So, I decided to use audio samples and it comes out well. You can try with a wav file or an audio samples text file. Please get back to us with your results.

    Step1:  write the audio sample text file/ wav file to the upper memory of the EEPROM. In the onboard EEPROM of the eval board, the starting address of the sector 2 is 65536. Please refer below.

    The text file that I used is, samples of only two cycles of a 3KHz wave sampled at 48KHz. 16 samples for a cycle. Below screenshots show a text file for a mono and stereo channel.

    After writing those sample file to the above-mentioned address using the flash programmer project, go to the wav player project.

    Step 2: Just verify the address to read the samples from and the data formats, then compile the project. Initiate the trigger. I gave 264 bytes as a length. since that file contains 66 samples, each sample is a word (4 bytes), hence 264 bytes.

    please refer below.

    You can hear the 3KHz tone or you can probe and see the outputs. So far, it's good.

    Step 3: when you try to write this wav player project to the self-boot EEPROM, you have to be careful because if you follow the usual self-boot procedure then it will erase the existing wav file at the sector 0. So, follow the self-boot procedure until the EEPROM properties window appear.

    'C7' is the erasing command for this chip, so change that value to some random value and proceed further. Please refer below.

    It will fail to erase the memory and will start writing the self-boot program into the EEPROM. Once the self-boot procedure is successfully completed. Turn OFF and ON the board, turn ON self-boot button and trigger the wav player using the GPIO pin and see whether it outputs the expected signal. I believe you will be able to get the expected outputs. Please find the attachments.

    wavplayer (2).zip

    Regards,

    Harish

  • Hello Harish,
    thanks for the explanation of this new option with one EEPROM.
    Allthough I couldn't make it work with having two wavesounds.
    Each wavefile has a length of 57.626 bytes  ( 28000 Samples ) .

    Regards
    Stephan

Reply
  • Hello Harish,
    thanks for the explanation of this new option with one EEPROM.
    Allthough I couldn't make it work with having two wavesounds.
    Each wavefile has a length of 57.626 bytes  ( 28000 Samples ) .

    Regards
    Stephan

Children
No Data