Other Parts Discussed in Thread: DRV8320,
Hi Team,
I would like to know if we have some guide about this code?
(About how to run the motor use this code? My customer don't want to use GUI to run the motor)
Thanks
Jenson
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.
Hi Jenson,
This code is now in MotorControl SDK version 3.03.00: https://www.ti.com/tool/C2000WARE-MOTORCONTROL-SDK
You can read the documentation from the SDK to figure how to use the code and run different labs for different FOC controls.
Thanks,
Aaron
Hi Aaron,
Are you referring to universal_motorcontrol_lab? I saw in the guide that he was using DRV8316+280025C. And my current customer is using DRV8316+280049C.
Can you specify which project file uses DRV8316+280049?
Thanks
Jenson
Hi Jenson,
I'll double check to see if it's in the SDK.
Regardless, I have an E2E FAQ that shows how to integrate DRV8316+280049 into MotorControl SDK version 3.01.00 here: e2e.ti.com/.../faq-drv8316revm-drv8316revm-source-code-for-motorcontrol-sdk
Thanks,
Aaron
Hi Aaron,
I have checked the SDK, I found this code in the "boostxl_drv8320rs"
Can I think the code from DRV8320 can be used in DRV8316?
Thanks
Jenson
Hi Jenson,
Some of our team members are currently out for travel
But we will review your questions and aim to provide a response soon
Best Regards,
Andrew
Hi Jenson,
If you click on the E2E FAQ that Aaron shared, you can find the DRV8316REVM code for download on step 3 of the FAQ. If you follow those steps that should be sufficient to allow the customer to run the EVM from CCS instead of using the GUI. Let us know if the customer runs into any problems!
Regards,
Anthony Lodi
Hi Team,
I have check the code in the CCS, but I have some question about this code.
I want to confirm, is this code used in DRV8316T? (because I can't see the call about SPI)
I can see drv8316.c and hal.c, But I don't see any calls in mian such as HAL_enableDRV, HAL_setupDRVSPI, HAL_writeDRVData. I can't find where these functions are used.
Is it something I misunderstood about this code?
Is it possible that we can run DRV8316 without reading SPI data and register setting? (runs in default configuration)
Do you have any comments on this please let me know.
Thanks!

Jenson
Hi Jenson,
Could you provide a screenshot showing the entirety of your project explorer panel so I can better understand what projects you opened up?
Regards,
Anthony Lodi
Hi Jenson,
Thanks for the screenshot! I am similarly seeing that in the is07_speed_control_coff project I don't see any SPI reads or writes. I believe the code should work with the default register settings.
If you want to change register settings you could try adding a HAL_enableDRV(halHandle) function call in the main() function in the is07_speed_control.c file and add DRV8316_writeSPI() function calls in the HAL_enableDRV() function to setup the registers as desired. Let me know if you run into any issues. The one thing that may be problematic to change is the gain setting, since the gain setting in the code may be hard coded for the lowest gain setting which would result in inaccurate current calculations if you changed the gain setting to a higher setting.
Regards,
Anthony Lodi