cancel
Showing results for 
Search instead for 
Did you mean: 

Motor on STEVAL-SPIN3201 board does not run at all

Max Schachtschabel
Associate II
Posted on October 11, 2017 at 16:38

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:

https://community.st.com/external-link.jspa?url=https%3A%2F%2Fde.nanotec.com%2Ffileadmin%2Ffiles%2FDatenblaetter%2FBLDC%2FDB87%2FDB87L01-S_neu.pdf

Many thanks in advance!

-M

#foc-sdk-4.3 #steval-spin3201 #mc_foc_duration
15 REPLIES 15
alex benn
Associate II
Posted on October 23, 2017 at 07:27

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.

Max Schachtschabel
Associate II
Posted on October 23, 2017 at 09:15

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, with

the 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...
Posted on October 23, 2017 at 09:52

Hi Max, thank you for your reply.

I will try your suggestion tomorrow and hopefully that works.

Posted on October 24, 2017 at 01:32

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.

Posted on October 24, 2017 at 09:03

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.
Enrico Poli
ST Employee
Posted on October 27, 2017 at 15:03

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=false

STEVAL-SPIN3201.hex.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyLY&d=%2Fa%2F0X0000000b6I%2FUeReH2fzszJM1iNQfk09P9QlJYlwBhTLtNDo2.yOi8o&asPdf=false
Posted on October 30, 2017 at 09:30

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

Posted on October 30, 2017 at 10:09

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).

0690X00000608o3QAA.png
Posted on October 30, 2017 at 15:17

By the way... the attachments are not visible in the forum stream, you must open the

https://community.st.com/0D50X00009XkXBLSA3

.