Skip to main content
pdematteis
Associate
November 20, 2024
Question

STM32PRGFW-UTIL not working in CP_Serial_boot with USB DFU interface

  • November 20, 2024
  • 1 reply
  • 754 views

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!

1 reply

Olivier GALLIEN
Technical Moderator
November 22, 2024

Hi @pdematteis 

 

Can you specify which product/board ? 

 

Thanks

 

Olivier 

Olivier GALLIEN In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
pdematteis
Associate
November 22, 2024

Hi,

it's a custom board using STM32MP157F processor.

Regards,

Paolo