cancel
Showing results for 
Search instead for 
Did you mean: 

Motor Pilot HSO Hardware Config Write Error

rms_st
Associate II

Hello,

I am having an issue writing the Hardware Config in the HSO Motor Pilot. I was able to do this with my previous set up, but recently upgraded from Windows 10 to Windows 11. Along with the OS upgrade, I also installed the latest releases for all the ST software so MC Workbench went from V6.3.2 to 6.4.1. I am wondering if this is a Win 11 issue or a MC Workbench issue, or possibly a debugger setting issue?

Components Used:

MC Workbench V6.4.1

STM32CubeMX V6.15.0

STM32CubeIDE V1.19.0

B-G473E-ZEST1S Control Board

STEVAL-LVLP01 Power Board

Process:

Generate project in MCWB (Sensorless HSO option) - if errors finish generating in CubeMX - Open in CubeIDE - Build / Flash with default debugger settings via USB to onboard USB STLINK - Connect to MotorPilot (Connects fine, can tune, edit values) - Select Hardware Config (either Read / Fill from UI / Import, all with same result) - Click "Write" then the board doesn't reconnect.

The errors I get in the connection bar either say "Port Open and try to configure the board" or "Port Open but no answer from board".

I have attached the log from one such session to this post. 

I have not yet tried reverting to a previous version of any software yet. Would prefer to avoid that. Any help would be appreciated.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Gael A
ST Employee

Hello rms_st,

 

This is a known issue that will be fixed in the MCSDK's next release. In the meantime, you can change the following lines in sync_registers.c (inside):

#if defined (FLASH_OPTR_DBANK)
  flashEraseInit.Page = ((uint32_t)&flashParams-FLASH_BASE) /(FLASH_PAGE_SIZE_128_BITS);
#else
  flashEraseInit.Page = ((uint32_t)&flashParams-FLASH_BASE) /(FLASH_PAGE_SIZE);
#endif 

into :

#if defined (FLASH_OPTR_DBANK)
  if (READ_BIT(FLASH->OPTR, FLASH_OPTR_DBANK) != 0U)
  {
    flashEraseInit.Page = ((uint32_t)&flashParams-FLASH_BASE) /(FLASH_PAGE_SIZE);
  }
  else
  {
    flashEraseInit.Page = ((uint32_t)&flashParams-FLASH_BASE) /(FLASH_PAGE_SIZE_128_BITS);
  }
#else
  flashEraseInit.Page = ((uint32_t)&flashParams-FLASH_BASE) /(FLASH_PAGE_SIZE);
#endif

Another solution would be to revert to MCSDK 6.3.2.
We apologise for the inconvenience.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

View solution in original post

3 REPLIES 3
rms_st
Associate II

Hello,

Checking if there is any update to this request.

Thanks

Gael A
ST Employee

Hello rms_st,

 

This is a known issue that will be fixed in the MCSDK's next release. In the meantime, you can change the following lines in sync_registers.c (inside):

#if defined (FLASH_OPTR_DBANK)
  flashEraseInit.Page = ((uint32_t)&flashParams-FLASH_BASE) /(FLASH_PAGE_SIZE_128_BITS);
#else
  flashEraseInit.Page = ((uint32_t)&flashParams-FLASH_BASE) /(FLASH_PAGE_SIZE);
#endif 

into :

#if defined (FLASH_OPTR_DBANK)
  if (READ_BIT(FLASH->OPTR, FLASH_OPTR_DBANK) != 0U)
  {
    flashEraseInit.Page = ((uint32_t)&flashParams-FLASH_BASE) /(FLASH_PAGE_SIZE);
  }
  else
  {
    flashEraseInit.Page = ((uint32_t)&flashParams-FLASH_BASE) /(FLASH_PAGE_SIZE_128_BITS);
  }
#else
  flashEraseInit.Page = ((uint32_t)&flashParams-FLASH_BASE) /(FLASH_PAGE_SIZE);
#endif

Another solution would be to revert to MCSDK 6.3.2.
We apologise for the inconvenience.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

Hi Gael A,

This worked, thank you. I will keep a look out for the next release. 

Thanks