cancel
Showing results for 
Search instead for 
Did you mean: 

Control multiple STM32 simultaneusly

ATZ99
Associate II

Goodmorning,

I am tying to understand the following case:

I've got two STM32F4 both connected to a usb hub, this hub is then connected to my pc. Is there a way to select the micro in which I need to load my firmware? I am not able to solve this out.

Thank you!

18 REPLIES 18

Thru the ROM's System Loader, or your own USB DEVICE firmware?

Could you use the Serial Number?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ATZ99
Associate II

I am firstly trying to uploaded it by means of the st-link, so i've got two board with st-link and STM32F446RE (<- is this you mean by "serial number", isn't it?)

No,

The USB Descriptor with the Serial Number, perhaps derived from the STM32's UNIQUE ID

https://www.beyondlogic.org/usbnutshell/usb5.shtml

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ATZ99
Associate II

ok got it, but I don't get how it can be usefull.

I mean, when the all system is connected to the pc, and I open the IDECubeMX, or Keil-uVision or whatever IDE, there is a way to chose which one micros use? and the serial number can be usefull?

The ST-LINK have unique serial numbers.

As USB Devices each can have a serial number that Windows can use to have different registry entries, so it doesn't instantiate another device if the port it is attached to changes..If you want a USB Device to be identifiable you need to ensure your code implements a sufficiently unique serial number.

How a debug pod recognizes individual STM32, honestly don't know. It's technically feasible, not sure the tools vendors are set up that way, typically they identify the pod and expect you not to keep switching them around.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

@ATZ99​ You can connect the boards with embedded ST-LINKs or separate ST-LINKs to a computer, one by one, and record their USB "serial numbers". Put these numbers on stickers and stick them on the boards.

ATZ99
Associate II

I'll answer to both @Pavel A.​ and @Community member​ here, I got your messages, but I don't want to give up, so I ask you this: Is there a way in your opinion to deal with multiple STM32F4 with or without the ST-Link? escluding the hub way which based on your considerations it is not followable.

Perhaps you can use a Filter Driver, IOCTL, or URB's ?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

The filter driver seems a good way to do it, I don't find anything on the internet about URB's what are them?