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.

DRV8308: programming DRV8308 by spi

Part Number: DRV8308

Dear TI,

Thanks  for your reading very much.

Could you help me about  programming DRV8308  by spi?

I would like to know if i want to program DRV8308 only,which pins should i used?

Now ,I used VM(12 V),ENA(HIGH),RST(LOW),SCLK,SCS,SDATAI,SDATAO,SMODE(LOW).

But,what confused me is when i read registers,is alway returns 0x0000.

Thanks for your reading again.

I will appreciate if you can replay you .

Thank you.

Zky

email:zky@xeltek-cn.com

  • Hi Zky,

    Do you have an external pullup on SDATAO?

    Have you checked to the VCP, VREG, and VINT voltages?

    Please focus on reading register 0x2A first. The defaults of all other registers is 0x0000.

    The most common causes for SPI trouble are:
    1) setup/hold on SDATAI vs SCLK
    2) lack of pullup of SDATAO
    3) SCLK to fast with respect to the SDATAO pullup
    4) SCS incorrectly framing of the transaction. Refer to section 7.5.2 for correct framing 

    If you do not read 0x0018 in register 0x2A, please provide a scope capture of the transaction. 

  • Hi Rick Duncan

    Thanks for your help .
    Now i read reigster 0x2A, the value is 0x19,not 0x18,very confusing,
    and i tested the VCP,VREG AND VINT, it seems they are right all.


    and another question ,how can i program the OPT,just like below?

    Write_Register(0x2d,0x1234);
    Write_Register(0x2d,0x1415);
    Write_Register(0x2d,0x1617);
    Write_Register(0x2d,0x1819);
    Write_Register(0x39,0x0002);
    DelayMs(100);
    Write_Register(0x2d,0x0edd);// not clearly on datasheet 0EDD???
    DelayMs(500);

    but it does not work.

    Thanks .
  • Hi Rick Duncan,
    Did you have chance to see my last replay?
    Now, i read register 0x2a,the value is 0x18,but i do not know how to write all registers to OTP.
    now i am trying as below,

    Write_Register(0x2d,0x1234);
    Write_Register(0x2d,0x1415);
    Write_Register(0x2d,0x1617);
    Write_Register(0x2d,0x1819);
    Write_Register(0x39,0x0002);
    DelayMs(100);
    Write_Register(0x2d,0x0edd);// not clearly on datasheet 0EDD???
    DelayMs(500);

    but it does not work.

    I wil be always waiting for your reply.
  • Hi user5007464,

    Sorry for the delay. We are researching this issue now, but it may take until mid next week.

  • Hi user5007464,

    To write the OTP registers, perform the following steps:

    1) Determine the desired values for registers 0x0 through 0xB by tuning the motor
    2) Be sure VM is >11V
    3) Set ENABLE to a logic high
    4) Write the desired values in registers 0x0 through 0xB
    5) Perform the steps described in section 7.5.3
    The first four writes enters OTP programming mode
    The write to 0x39 performs the OTP write
    The last write exits OTP programming mode

    At this point the OTP bits are programmed. Cycle the ENABLE pin and re-read the registers. The default values read in registers 0X0 through 0xB should match what was programmed.

    Please note this is one time process. If the incorrect values are loaded or something goes wrong during the write process, there is no recovery. The register values can still be changed via the SPI.
  • Hi Rick Duncan,

    Thanks very much.

    Your reply is very helpful! 

    Thank you.

  • Hi Rick Duncan:

    By the way ,if there are some ways to check if OTP bits have been programmed?
  • Hi user5007464,

    Once programmed, registers 0x0 through 0xB should read the OTP values as the new defaults.
  • Hi Rick Duncan:

    If i write 0X00 to registers 0x0 through 0xb,and then write OPT,Could i Write OTP again?
  • Hi user5007464,

    Once the OTP (one time programmed) registers are set, they cannot be changed.