2022-01-31 04:38 PM
Board: Custom STSPIN32G4
Debug port: external STLINK V3
MC-SDK 5.Y.4
CubeMX 6.4
Firmware: STM32 FW V1.5.0
Drive Type: HAL
Target Toolchain: ST STM32CubeIDE 1.8.0
I designed a custom inverter using an STSPIN32G4, with the same topology of EVSPIN32G4, and so that is how I initiate the project in Motor Control Workbench.
I set it up for speed control and hall effect sensors feedback as the primary and only speed sensor. I have used this setup many times before in earlier versions with no issues.
During code generation, I get the following error:
“The ST intranet updater server is unknown: mcucrosselector.codex.cro.st.com�?
and also,
“Completed with errors�?
In the main log, I get:
“Generation failed�?
The code seems to compile fine in CubeIDE 1.8.0 with no errors.
I run the program on the board using ST-LINK, Connect under different modes: reset, hardware reset, software reset and often I get a tab in CubeIDE saying:
“Break at address "0x1fff4bc4" with no debug information available, or outside of program code.�?
In the console, I get the normal “Download verified successfully�?
The board does connect with Motor Pilot about 50% of the times I try, but immediately I get the following errors.
Finally, from the main dashboard I get an over current fault, but if I click on Acknowledge Fault, nothing happens.
I then run the same process with CubeMX 6.3, I don’t get any error message during code generation, but I get the same error message in Motor Pilot.
Going over the MC-SDK 5.Y.4 release notes, I go in CubeMX, MotorControl Middleware, and set DBG_MCU_LOAD_MEAS, but code will not compile with that option set.
Any suggestions, please?
Solved! Go to Solution.
2022-02-04 03:35 PM
Here is what I measured, with my power source set at 24V and spinning motor freely with no load:
At start with motor still:
0.08A -> 1.92W
Motor spinning at 570 rpm:
0.12A -> 2.88W
Motor spinning at 1002 rpm
0.15A -> 3.60W
After motor stop:
initial conditions are met
0.08A -> 1.92W
The MCU always feels very hot though, as mentioned above, around 60 or 70 Celsius. Yes, I am putting my finger on it, sorry for the ESD transgression...
I see that STSPIN32G4 work in a range of temperature up to 125 Celsius, so I is it safe to assume that I am experiencing an expected temperature for this MCU?
2022-02-04 03:48 PM
I played enough with the UART and concluded that mine is running reliably at 1843200. Thanks for the explanation though about why it is setup up that way.
What was really throwing me off all this time, was that one of the HALL sensors which is connected to the BOOT0 PB8 pin, and depending on the position of the motor, the hall sensor would drive that pin high, and the system would not boot at all. This became clear when I was running the motor from the power source, and then I noticed that the MCU was not running the user code, even though it was pulling a bit of current, it was also not getting hot.
So I put two and two together, which was hard since this has been an intermittent problem, but measuring the signal on the Hall sensor low, the system would run. So I wrote code to bypass BOOT0 on pin PB8 and to use nBOOT0 instead, by clearing up bit nSWBOOT0 of FLASH_OPTR register, based on RM0440 Rev 6 2.6.1 and 3.4.2 and it works like a charm.
This is something that maybe you want to add to the MC Workbench, if PB8 is being used by a Hall sensor, to change system to boot from nBOOT0 in the flash memory.
2022-03-24 04:10 AM
@PCama.1
Hi,
I'm also getting same error. But my board is EVSPIN32G4NH and Cube IDE v1.9.0.
Board: EVSTSPIN32G4NH
Debug port: Internal ST link
MC-SDK 5.Y.4
CubeMX 6.4
Firmware: STM32 FW V1.5.0
Drive Type: HAL
Target Toolchain: ST STM32CubeIDE 1.9.0
I've gone through the all answers for your question. But I don't get it.
So what need to done to remove this error?
Kindly help with this.
2022-03-25 04:26 PM
Hi SE D.1
If you are getting the same "Generation Failed" error when generating the code, that I refer to in my original post, what Cedric said is that that error could be disregarded, at least in my case given the screenshot I provided. I recommend you reading again his answer to my post.
He also mentioned that ST will probably fix it, but the code generated should work just fine. Once I realized that I could just ignore this error, I ran it and it worked for me.
Assuming that is the error you are referring to, try to run the generated code in CubeIDE and it should work for you too.
Best,
Paulo
2022-03-26 09:51 PM
Thank you PCama.1 for your reply, this'll help me to proceed further. I'll upload the code & test and then I'll let you know.
I've some more question, asked below:
Kindly, answer these questions that'll be great help for me.
Thanks and regards
2022-03-31 09:20 AM
Good luck!
2022-03-31 08:48 PM
Thank you so much, @PCama.1 .