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.

DRV8889-Q1: Stall Threshold Learning Process doesn't works

Part Number: DRV8889-Q1

Hi,
I write in CTRL5=00 00111 0 00111000b (addr 0x07) that sould be STL_LRN=1, EN_STL=1 and STL_REP=1
than I move motor for 600steps (3turns) and lock it during move.
After these 600 steps I read DIAG Status 2 Register (addr 0x02)
writing  01 00010 0 00000000b on DRV8889 SDI and I read back always
11 000000 00000000b where bit4=STL_LRN_OK is 0 and not 1 as I expect.
The DRV works in smart tune Ripple Control decay mode and 100% Full Step mode as for default.
Where is my mistake ?
Bye and thank you for your help.

  • Lori,

    If the DRV8889-Q1 cannot get a clear Torque_count gap between the normal speed and stall condition, DRV8889-Q1 cannot have a learn result.

    Please monitor the Torque_count test point to find out why DRV8889-Q1 cannot learn the stall detection threshold. The onboard MCU convert Torque_count register value to an analog output which is shown on Torque_count test point (each Torque_count LSB is converted to 12.9mV on that test point.).

  • Thank you for your hint.
    I don't use EVB but my own board so I cannot do your test.
    Anyway during motor free run I read TRQ_COUNT values of 7 while
    with motor locked I read TRQ_COUNT=0.
    So I write STALL_TH=3 than I write:
    mov.w #0000111000011000b,&DRVtx ;Set to Write CTRL5 at Addr=0x07 EN_STL=1, STL_REP=1
    but when I stall the motor I don't see nFAULT pin going to zero
    and STALL bit in DIAG Status 2 register going to 1.
    Where's my problem ?
    Bye and thank you for your help.
    Lorenzo

  • Lorenzo,

    How about STL_LRN bit when you wrote STALL_TH=3?

    If STL_LRN is still "1", you can not see nFault pin goes low because it is still trying the learn the Torque_count.

  • Hi,
    I read back CTRL5:
    Write 4E00h=0100 1110 0000 0000 and read back C018h=1100 0000 0001 1000 so STL_REP=1, EN_STL=1 and STL_LRN=0
    I read back CTRL6:
    Write 5000h=0101 0000 0000 0000 and read back C004h=1100 0000 0000 0100 so STALL_TH=4
    And Status bits remains all at zero.

    What tests can I do ?

    Bye and thank you.
    Lorenzo

  • Lorenzo,

    The setting looks correct. Please also read CTRL7 TRQ_COUNT register value, to make sure TRQ_COUNT value cross the STALL_TH after set CTRL5 and CTRL6. 

  • Hi Wang,
    During motor free run I read TRQ_COUNT values of 6 or 7 while
    with motor locked I read TRQ_COUNT=1 or 0. For this reason I set
    STALL_TH=4 that is midway among these values.
    If you think usefull I could send you a video of board behaviour.
    Let me know how I can do this, just in case.
    Bye and thank you
    Lorenzo

  • Lorenzo,

    In that case, the nFault pin should be pulled low and stall detection status should report the stall condition. Yes. Yan can send me a video. Also, an EVM could help us understand it.

  • Hi Wang, I've attached a video of my application.
    I hope this explain well what I'm doing.
    Let me know if you need it in better quality or tell my your ideas.
    Bye and thank you.

  • Lorenzo,

    I didn't find any setting issue for the video. DRV8889 should report the stall condition.

    Two things may help us debug this issue.

    a. Please check after 2000 steps, do you disable the DRV8889? If possible, can you keep the DRV8889 enable after stall until DRV8889 report stall?

    b. Can you try the same setting on an EVM? DRV8889-Q1EVM has a Torque_count test point (one LSB Torque_count register is equivalent to 12.9mV on Torque_count test point). Also, MSP430 gives another test point to show Torque_count register value and STL_TH value comparison result.

  • Hi Wang,

    I've made a lot of tests in this period.

    The stall is not reported on nFAULT pin either if I keep
    DRV enable or not among various movements.

    Now I've modified my software on MSP so that during
    movement to EOT (i.e.stall detection) I read continuously
    CTRL7 = TRQ_COUNT and when I find it lower than
    STALL_TH I stop motor movement  by software.
    In other words my software does the job that DRV
    should do automatically.

    Obviously this software check is a little slow and probably
    less performing than the one as made by DRV.

    As I've said you I don't have EVM because with the
    same cost of EVM and time to use it I've build my final
    board with my application software.

    I'll test on other boards if the behaviour will be the same.

    I'll let you know.

    Bye and thank you

    Lorenzo 

  • Lorenzo,

    It is a good to find a workaround solution. If you have an EVM, we may find the root cause.

    Thank you for your update.