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=1than 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 always11 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.
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.).
Motor Drive Solutions
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Wang5577:
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 whilewith 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=1but when I stall the motor I don't see nFAULT pin going to zeroand STALL bit in DIAG Status 2 register going to 1.Where's my problem ?Bye and thank you for your help.Lorenzo
In reply to Lori 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=0I read back CTRL6:Write 5000h=0101 0000 0000 0000 and read back C004h=1100 0000 0000 0100 so STALL_TH=4And Status bits remains all at zero.What tests can I do ?Bye and thank you.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 whilewith 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 youLorenzo
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.
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.
I've made a lot of tests in this period.
The stall is not reported on nFAULT pin either if I keepDRV enable or not among various movements.
Now I've modified my software on MSP so that duringmovement to EOT (i.e.stall detection) I read continuouslyCTRL7 = TRQ_COUNT and when I find it lower thanSTALL_TH I stop motor movement by software.In other words my software does the job that DRVshould do automatically.
Obviously this software check is a little slow and probablyless performing than the one as made by DRV.
As I've said you I don't have EVM because with thesame 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
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.