6 years, 5 months ago.

Can I use mbed with the STM32F303CBT7 microcontroller on the STEVAL-ESC001 BLDC motor driver?

Hi everyone,

I just got a STEVAL-ESC001 board that I am hoping to use to drive a brushless motor (BLDC) for position control with an encoder. I got lost in the pdf-hell of the ST website without getting anywhere, so I am wondering how feasible is it to load mbed firmware and use that instead.

The reason why I think this is possible is because the STM32-ESC001 board is based on the STM32F303CBT7 microcontroller, and mbed already supports two other STM32F303 microcontrollers (i.e. the NUCLEO-F303RE and the NUCLEO-F303K8. Here is a link to the user manual and the schematic diagram of the STEVAL-ESC001.

Can you think of any reason why this might not work? Maybe I would need to tweak the pinmap or some other parameters?

2 Answers

6 years, 4 months ago.

Often ST MCUs in the same line are binary compatible, this should be noted in the datasheet. If that's the case, then you can create a new board based on the NUCLEO-F303RE, and should only require changing pin names, peripherals and clock configuration.

Just for clarity, this cannot be done in the online compiler, only offline.

More information is in the porting guide.

Accepted Answer
6 years, 5 months ago.

I have not done it, but I think adding a new board to mbed would be quite challenging. It would require a full understanding of your target micro, understanding of an existing micro you will use to base your code on and an understanding of how the mbed stack is put together. It is certainly possible, but it is not a project I would take on lightly. Starting point would be the Target folder for STM32F3.

https://github.com/ARMmbed/mbed-os/tree/master/targets/TARGET_STM/TARGET_STM32F3

Your target device, STM32F303xB shares a datasheet with STM32F303xC so I would think the files for the xC device would be your starting point. You basically have to go through each one and make sure it works for your target. I'm not sure if you can use a new target like that with the online compiler there may be some baked in assumptions about the devboard you are using.