2024-11-20 05:46 AM
As reported in the GitHub page, STM32PRGFW-UTIL should work with boards with USB DFU or UART serial interface.
It works properly with UART, but it doesn't with USB DFU, showing the following error:
Download in Progress:
██████████████████████████████████████████████████ 100%
File download complete
Time elapsed during download operation: 00:00:00.681
RUNNING Program ...
PartID: :0x01
Error:
Unable to reconnect the target device: time out expired
Error: Start operation failed at partition 0x01
Error: TSV flashing service failed
The code seems to ignore USB requests, since GetCommandOpcode is not defined:
static OPENBL_OpsTypeDef USART_Ops =
{
OPENBL_USART_Configuration,
NULL,
OPENBL_USART_ProtocolDetection,
OPENBL_USART_GetCommandOpcode,
OPENBL_USART_SendByte
};
static OPENBL_OpsTypeDef USB_Ops =
{
OPENBL_USB_Configuration,
NULL,
OPENBL_USB_ProtocolDetection,
NULL,
NULL
};
void OPENBL_CommandProcess(void)
{
uint8_t command_opcode;
/* Get the user command opcode */
if (p_Interface->p_Ops->GetCommandOpcode != NULL)
{
command_opcode = p_Interface->p_Ops->GetCommandOpcode();
switch (command_opcode)
{
case CMD_GET_COMMAND:
if (p_Interface->p_Cmd->GetCommand != NULL)
{
p_Interface->p_Cmd->GetCommand();
}
break;
Does somebody know how to get it working properly?
Thanks!