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.

DRV2605: Procedure to control haptic vibrator

Part Number: DRV2605

Hi team,

We are working with DRV2605 haptic driver on linux kernel 5.15.60 with IMX8MP processor

Driver path : drivers/input/misc/drv260x.c

We observed some vibrations when the driver gets invoked during bootup. But after bootup we are unable to test the haptic vibrator.

observations:

$ fftest /dev/input/event1
Force feedback test program.
HOLD FIRMLY YOUR WHEEL OR JOYSTICK TO PREVENT DAMAGES

Device /dev/input/event1 opened
Features:
* Absolute axes:
[00 00 00 00 00 00 00 00 ]
* Relative axes:
[00 00 ]
* Force feedback effects types: Periodic, Rumble, Gain,
Force feedback periodic effects: Square, Triangle, Sine,
[00 00 00 00 00 00 00 00 00 00 03 07 01 00 00 00 ]
* Number of simultaneous effects: 16

Setting master gain to 75% ... OK
Uploading effect #0 (Periodic sinusoidal) ... OK (id 0)
Uploading effect #1 (Constant) ... Error: Invalid argument
Uploading effect #2 (Spring) ... Error: Invalid argument
Uploading effect #3 (Damper) ... Error: Invalid argument
Uploading effect #4 (Strong rumble, with heavy motor) ... OK (id 1)
Uploading effect #5 (Weak rumble, with light motor) ... OK (id 2)
Enter effect number, -1 to exit
0
Now Playing: Sine vibration
Enter effect number, -1 to exit
4
Now Playing: Strong Rumble
Enter effect number, -1 to exit
5
Now Playing: Weak Rumble
Enter effect number, -1 to exit
-1
Stopping effects

But we didn't observed any vibrations when fftest was used.

Could you help us on how to control the haptic vibrator after bootup ?

Regards,

Deepika

  • HI Deepika,

    What are the register settings that you are programming into DRV2605?

    Regards,
    Arthur

  • Hi Arthur Brown,

    Thanks for you reply. Below is my register settings

    # i2cdump -y -f 2 0x5a
    No size specified (using byte-data access)
                                               0   1   2   3  4    5   6   7   8   9   a   b   c   d   e   f   
    register address 0x00: 60 47 00 01 01 00 00 00 00 00 00 00 00 00 00 00 
    register address 0x10: 00 05 19 64 19 ff 3f 89 02 7d 27 80 25 60 20 00 
    register address 0x20: 00 98 02 00 00 00 00 00 00 00 00 00 00 00 00 00 
    register address 0x30: 00 88 c1 5a d7 00 00 00 64 02 00 01 11 00 00 00 

    Regards,

    Deepika

  • Hi Deepika, 

    Arthur is out of office for the next week, please be patient as I have assigned another haptics expert to comment.

    Regards,

  • Thanks ,

    Will wait for the expert comment.

    Regards,

    Deepika

  • Hi Deepika,

    Your register setting for the MODE (0x01) is set to auto-calibration (bits 2-0) = 7. Are you trying to run calibration or should the mode be set to Internal Trigger = 0, in order to play waveforms from memory. Try changing register 0x01 to 0x40.  

  • Thanks

    As you suggested, we tried changing the register 0x01 to 0x40 instead of 0x47.

    # i2cdump -y -f 2 0x5a
    No size specified (using byte-data access)
                                             0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
    register address 0x00: 60 40 00 01 01 00 00 00 00 00 00 00 00 00 00 00 
    register address 0x10: 00 05 19 64 19 ff 3f 89 0d 6d 26 80 25 60 20 00 
    register address 0x20: 00 98 20 00 00 00 00 00 00 00 00 00 00 00 00 00 
    register address 0x30: 00 78 c1 5a d7 00 00 00 62 02 00 01 11 00 00 00 

    But we observed still the same behaviour. No vibrations were observed when fftest was issued.

    Regards,

    Deepika

  • Hi, I'm not sure what your play sequence is. There is also bit 6 of register 0x01, which puts the device in Software Standby. Are you changing this bit in your play sequence? I should have said to set register 0x01 - 0x00. Run the system using the GO bit in register 0x0C = 0x01. This GO bit will self-clear after playing the waveform.

    Similarly, if you are using the calibration routine first, you should set register 0x01 = 0x07 and run the system using the GO bit in register 0x0C = 0x01.

  • Thanks

    As you suggested  setting 0x01 register to value 0x00 and setting GO bit to 0x01, we are able to observe vibration.

    In our design INT/TRIG is connected to ground.

    We would like to control the intensity of vibration. Could you point to the register which should be written to control the vibration intensity.

    Regards,

    Deepika

  • Hi,

    Our audio experts are out of office for the holiday and will return the week of 11/28. Please be patient as responses are delayed.

    Thanks,

  • Hi Deepika,

    Are you familiar with the DRV2605EVM-CT and Haptic Control Console? These were developed to help set up the device.

    Additionally, refer to section 7.5 of the datasheet. There are a few settings for changing the vibration intensity, such as RATED_VOLTAGE (0x3F), OD_CLAMP (0x89), and finally RTP_INPUT (0x00). When using internal waveforms, change the rated voltage and overdrive clamp (OD_CLAMP) settings. You should perform calibration after these settings are updated. RTP_INPUT is used if you are RTP mode (0x01 = 0x05). 

  • Thanks for your support

    Regards

    Deepika