简体   繁体   English

如何使用我的 owm 软件更新自定义 stm32 板

[英]How to update with custom stm32 board with my owm software

I'am working with nucleo board since a while.一段时间以来,我一直在与 nucleo 板合作。 Now I'd like to create my own board build with an stm32, but I'd like my clients to be able to update it's own board.现在我想用 stm32 创建我自己的电路板版本,但我希望我的客户能够更新它自己的电路板。 So let me explain my idea, first of all I create a software for my client (c++) this software will just update the board with a small GUI very simple.所以让我解释一下我的想法,首先我为我的客户端(c++)创建了一个软件,这个软件只会用一个非常简单的小图形用户界面更新电路板。 My idea is to provide at my clients from a website this software with a new binary file for the board.我的想法是从网站上为我的客户提供该软件的新二进制文件。

So my question is, is it possible to update stm32, I've never done that... I'd like to use my program, where my client choose new binary and clik on a button update, the board will be plug in usb.所以我的问题是,是否可以更新 stm32,我从来没有这样做过......我想使用我的程序,我的客户选择新的二进制文件并点击按钮更新,板子将插入 USB .

After some researches I found DFU coming from ST to update firmware is it what I have to use?经过一些研究,我发现来自 ST 的 DFU 更新固件是我必须使用的吗? Can I update my board just with USB without st-link, maybe should I use uart?我可以在没有 st-link 的情况下仅使用 USB 更新我的电路板,也许我应该使用 uart?

If I'm not mistaken, STM32 parts with USB hardware have system bootloader supporting DFU mode, except the very old models like STM32F103.如果我没记错的话,带有 USB 硬件的 STM32 部件具有支持 DFU 模式的系统引导加载程序,除了像 STM32F103 这样的非常老的型号。

Please see AN2606 from ST and inspect the flow charts related with your STM32 device.请参阅 ST 的AN2606并检查与您的 STM32 设备相关的流程图。 For STM32F4 series, HSE needs to be present for USB bootloader (not sure if they are all same).对于 STM32F4 系列,USB 引导加载程序需要存在 HSE(不确定它们是否都相同)。 Some series like STM32F04 don't need it.像STM32F04这样的一些系列不需要它。

AFAIK, all STM32 models have system bootloader supporting USART. AFAIK,所有 STM32 型号都有支持 USART 的系统引导加载程序。 So in worst case, your clients can update firmware using USB-USART converters.因此,在最坏的情况下,您的客户端可以使用 USB-USART 转换器更新固件。

ST provides some example utility programs for firmware update using DFU or USART. ST 提供了一些使用 DFU 或 USART 进行固件更新的示例实用程序。 USB DFU is a standard protocol. USB DFU 是标准协议。 It's also possible to find third-party utility programs.也可以找到第三方实用程序。 You don't need to write your own.你不需要自己写。

Clients may need to push a button or replace a jumper to enter the bootloader mode.客户可能需要按下按钮或更换跳线才能进入引导加载程序模式。 I'm not sure if it's possible to activate bootloader without such an action.我不确定是否可以在没有这样操作的情况下激活引导加载程序。

Of course, you need to be aware that system bootloader provided by ST has no security or encryption functionality.当然,您需要注意 ST 提供的系统引导加载程序没有安全或加密功能。 So, when you give .hex file to your clients, they can use it to make more copies of your product.因此,当您将 .hex 文件提供给您的客户时,他们可以使用它来制作您产品的更多副本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM