Skip to main content
Tejashree
Associate III
October 8, 2021
Question

Hi ,I am new to STM32 Motor control.I want to control BLDC Motor via B-G431B-ESC1.Also want to use CAN communication.

  • October 8, 2021
  • 3 replies
  • 1080 views

I used the example from Motor control work bench(ElectronicspeedControl),configured CAN in CubeMX and imported generated code in STMCubeIDE.Now I don't know what should be next step?

This topic has been closed for replies.

3 replies

cedric H
Technical Moderator
October 8, 2021

Hello @Tejashree​ 

The communication protocol over CAN is not supported yet.

So for the time being, you can use only the UART.

Regards

Cedric

Tejashree
TejashreeAuthor
Associate III
October 8, 2021

Hi Cedric,The datesheet says it support CAN? I am using B-g431B-ESC1 discovery kit.0693W00000FBrNeQAL.pngAlso 120ohm resistor on board(r26).Do we have to pull CAN_TERM pin high to start the CAN cOMMINUCATION ?

0693W00000FBrOIQA1.png

cedric H
Technical Moderator
October 8, 2021

Yes, the board support the CAN bus. But the software part is missing.

Cedric

Tejashree
TejashreeAuthor
Associate III
October 8, 2021

So, the functions from HAL driver ,example below won't work if implemented?

if (HAL_FDCAN_GetRxMessage(&hfdcan1, FDCAN_RX_FIFO0, &RxHeader, RxData) == HAL_OK)

or can there be any other alternative to implement CAN ?