This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DRV2624: DRV2624: Example code for waveform effects

Part Number: DRV2624

Hi,

I'm working with the DRV2624 driver for an ERM device; I'm facing with the problem of create new waveforms to  load in RAM and I'm wondering  if there are some example codes with these waveforms. Please, could anyone tell me if there is a library like this ?

Regards

Davide Urbano

  • Hi Davide,

    Are you using Haptic Control Console (HCC) and the DRV2624EVM for evaluation? I recommend using the RAM Manager in HCC for loading waveforms. There is not an example library due to legalities around waveform creation. The waveforms are stored as voltage-time pairs. Here are a few ways that will help you create your waveform.
    Method 1: Building a waveform in HCC RAM Manager
    1. Open the RAM Manager (Connect to the EVM if you want to test it out)
    2. Right click in the white space and select "add"
    3. Fill in the effect information.
    a. Repeat is typically 0
    b. Volt in HEX is 3F for full scale. This means 3F will play the 100% of the Rated_Voltage. There will also automatically be an overdrive at the beginning of the waveform.
    c. The "time" is multiplied by the Playback_Interval. By default this is 5ms, but it can be changed to 1ms for higher resolution.
    4. Write RAM; Open the DRV2624 Console Window and go to the "Waveform Sequence" work mode. Select "effect 1" and click start. In this work mode, you can change the 5ms/1ms resolution.
    With this method, you can now look at what has been created. You can also export this to an XML document. The header and data sections are described in the datasheet under section 8.6.9.2.

    Method 2:
    Study the exported XML document and write your own waveform in XML. Some key things are the "offset" which is the place the waveform is stored in the RAM memory and the "length" which is the number of data bytes in the waveform. Each data point is a voltage-time pair, so the length will always be an even number. The "duration" is FYI and will be adjusted when loaded into the RAM manager if the value is incorrect.

    Let me know if you have any follow-up questions.
  • Thank you very much for your support; with your help I found solution for my problem.

    Regards