cancel
Showing results for 
Search instead for 
Did you mean: 

Editing a .bin file to increase max speed of BLDC

ANCN
Associate

I hope I have put this in the right forum. Will move it if not!

I have a finished product so all peripherals are already selected and configured. I need to increase the max motor speed by 10%.
It is a STM32F0 with single FOC and a matched BLDC.

I don't have an ST-Link, but I do have a proprietary tool to flash the board with the required 64KB .bin file. This tool can't read back anything from the MCU.

As some background, an earlier iteration of the product used the same family of MCU and had three available .bin files. We could flash one or the other onto the MCU to change the max speed. Let's call those A090.bin, A100.bin and A110.bin, where A110 would increase the motor max speed by 10% compared with A100, and A090.bin would decrease the motor max speed by 10%.

For my current iteration of the product, I have just one .bin file, let's call it B100.bin - I need to change parameters in the bin file to make my own B110.bin (I don't need to decrease max motor speed, i.e I don't need a B090.bin)

I've opened each file with ST Cube Programmer tool, but is there a simpler and more direct way to achieve my mission?

Hex from the first address line in Cube is:
655A4D2C 0CF188A4 534F2A24 36843BC1

ARM64 output after online conversion is
ldnp s5, s22, [x19, #0x68]
.BYTE 0x0c, 0xf1, 0x88, 0xa4
.BYTE 0x53, 0x4f, 0x2a, 0x24
.BYTE 0x36, 0x84, 0x3b, 0xc1

ARM converts to
.BYTE 0x65, 0x5a, 0x4d, 0x2c
strge pc, [r8], #0x10c
strths r4, [sl], #-0xf53
teqgt fp, r6, lsr r4

In the converted ARM64 output above, the first line is indecipherable to me. The other 3 lines look like addresses for a table. Where do I go from here?

 

Thanks in advance from a real newbie at this!

2 REPLIES 2
LCE
Principal

That some shady re-engineering or what?

Honestly, why digging in the bin files?
If that is your company's product, you should have access to the source code and either compile some extra versions with other speed settings, or even make it an accessible variable.

 

Sorry if it wasn’t clear. We didn’t develop it, hence we don’t have source code. There’s no ethical issue here, and engineering for better compatibility in a given application is anything but shady. While the vendor did give me A110.bin originally, I infer they don’t have the resources to develop B110 for me. Mine is a small market and these kinds of challenges are common. I do appreciate any input that will help me achieve it