cancel
Showing results for 
Search instead for 
Did you mean: 

Project for B-G431B-ESC1

I need some working project for B-G431B-ESC1. I was trying to use MotorControl Workbench (X-CUBE-MCSDK). There is a project for the target but it creates an absolutely useless project. Some non-existing header files, no main file included in the project.

I see what is the problem - I have to install STM32CubeMX. But I don't want to use HAL layer, I work with bare metal drivers (CMSIS).

When I try to compile the project I get - Fatal Error[Pe035]: #error directive: "Unknown target."

In the devices list (in IAR7 and IAR8) I see no STM32G4xx family.

Well. I compiled the project with V8.4.

But how to work with it?

while (1)
  {
    /* USER CODE END WHILE */
 
    /* USER CODE BEGIN 3 */
    /* Main routine for Electronic Speed Controller (STEVAL-ESC001V1) */
    esc_pwm_control(&ESC_M1); 
 
  }

 where is the documentation?

4 REPLIES 4
Claudio Lorini
Associate

On the release notes it says:

....

"Motor Control Projects configurations using an STM32L4 device do not work if generated using the LL drivers. Using the HAL ones is OK."

....

cedric H
ST Employee

Hello,

The documentation can be find here :

https://www.st.com/content/ccc/resource/technical/document/user_manual/group1/86/3f/45/e0/12/18/47/85/DM00564746/files/DM00564746.pdf/jcr:content/translations/en.DM00564746.pdf

>But I don't want to use HAL layer, I work with bare metal drivers (CMSIS).

Our MCSDK is based on Low level drivers that are part of STM32Cube delivery. STM32Cube delivery contains both LL and HAL drivers.

The tool generator allow you to generate the project for Low Level driver for the initialization code (main.c)

If you do not want to use Low Level driver (that are pretty close to CMSIS by the way), we do not have solutions as our library will not compiled without LL headers.

As the main usage we do with LL is to access peripheral registers, you can substitute each call to LL function by the CMSIS equivalent. But as the function are static inline, you will not save any MIPS nor memory footprint.

Regards

Cedric

As I understand I should apply PWM signals on the corresponding pin in order to run a motor. And how do I do it in the code, without an external PWM signals?

Laurent Ca...
Lead II

The question has been set only to the "STM32 Motor Control" topic (the question is only about the STM32 MC SDK). 

Best regards