2017-10-11 07:38 AM
Greetings!
I am having trouble with the STEVAL-SPIN3201 board in combination with a DB87L01-S BLDC motor from Nanotec.
I connected the board to the three phases, the internal hall sensors, to the external DC and to the PC and flashed the SPIN3270 with the FOC SDK 4.3 using the SW4STM32 IDE.The parameters of the motor (pole pairs, resistance, inductivity etc.) were inserted using the ST Motor Workbench. Building and flashing the demo project was no problem; however, the motor makes no intention to run after running the code. By stepping through the code I figured out that 'MC_FOC_DURATION' error code is set almost immediately after pushing the 'START_STOP' button on the board. The header file lists this error with the short explanation 'FOC rate too high', so I choose the lowest PWM rate possible in combination with the execution rate (4500Hz), still with the same result.Debugging the code further to find the origin of this error led to no satisfying conclusion (apparently something about a bit in the PWM timer register 'TIM1->SR' that has not been reseted correctly?), so I am freshly out of ideas what the problem could be here. Does anyone have any suggestions where to look or what parameters may also need further adjustments?Here you can also see the short datasheet of the used motor:
Many thanks in advance!
-M
#foc-sdk-4.3 #steval-spin3201 #mc_foc_duration2017-10-22 10:27 PM
I have this same problem, out of the box the STEVAL-SPIN3201 kit does not spin any of my motors with the stock firmware. It doesn't even attempt to after pressing start, no extra current is drawn from my power supply, the board immediately goes into FOC_DURATION fault. Crazy.
2017-10-23 12:15 AM
In the meantime, I found a (somewhat strange) workaround to be able to get the SDK up and running:
Out of curiosity, I tried the microVision IDE from Keil to build and flash the software instead of the SW4STM32 IDE, withthe suprising result that everything seems to work quite well! I almost immediately got the motor responding, and with changing a few parameters I even got to run it smoothly; aside from that, I did not alter the firmware in any way to get there. I guess that it has something to do with the corresponding compiler within the STM-Eclipse IDE...2017-10-23 02:52 AM
Hi Max, thank you for your reply.
I will try your suggestion tomorrow and hopefully that works.
2017-10-23 06:32 PM
Hi Max, I have a question for you. Did the workspace compile successfully with the free version of the Keil uVision IDE or do you have the paid version. I am getting compilation errors.
2017-10-24 02:03 AM
Hey Alex,
If I remember correctly, I also had some issues regarding the maximum size of the flash image, which is limited to 32kB in the free version of Keil.
Look at the project options under the tab 'C/C++' and you will find some options regarding code generation; when I use Optimization level 3 (-O3) and enable 'Optimize for Time', I was able to build and flash the (basically unchanged) firmware correctly.2017-10-27 06:03 AM
Hi,
I tried to build the STSW-SPIN3201 firmware using uVision 5.24 (free license for STM32F0/L0) and the attached MC workbench setup (I used the motor datasheet as reference, but not 100% sure I didn't made some error in the ke calculation).
The resulting code give me no FOC duration failure, could you check? (no need to connect it to the motor I think).
The onlyexplanation I have is some optimization error during the compilation.
Enrico
________________ Attachments : SDK43x-STEVAL-SPIN3201-Nanotec_DB87L01-S.stmcx.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hy9K&d=%2Fa%2F0X0000000b6L%2FfKyr24vOR2_KmXqsh98BOZFo2kt6z4_Hy4jB9KyIdEc&asPdf=falseSTEVAL-SPIN3201.hex.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyLY&d=%2Fa%2F0X0000000b6I%2FUeReH2fzszJM1iNQfk09P9QlJYlwBhTLtNDo2.yOi8o&asPdf=false2017-10-30 02:30 AM
and the attached MC workbench Setup
Sorry, but i could not find any attachement in your reply (how DO you upload something in a post here?)...
could you send it to me via E-Mail?-M
2017-10-30 03:09 AM
Hi,
The attachments should be visible in the bottom of my reply.
You can upload attachments using the advanced editor (upper right corner in the reply box).
2017-10-30 08:17 AM
By the way... the attachments are not visible in the forum stream, you must open the
.