2023-10-18 02:30 PM - edited 2023-10-18 02:42 PM
Hello,
I am trying to evaluate the DRP USB C solution ST has to offer.
I have available to me a NUCLEO-G0B1RE and an X-NUCLEO-DRP1M1.
I understand that the code written in the DRP1M1_DRP example was written for the NUCLEO-G071RB, but I cannot find any reason this code wouldn't run on the NUCLEO-G0B1RE. Pinouts seem fine, Capabilities seem fine, and the readme.md file in this example says it should work on STM32G0XX devices.
However, when I debug this code on the board it enters a hard fault loop while trying to run MX_USBPD_Init(). Digging further down, it seems as though it fails to validate that the GUI area hasnt been corrupted. Specifically, at line 80 in "bsp_gui.c":
if ((0xFFFFFFFFu != *((uint32_t *)_addr)) && (MagicNumber != *((uint64_t *)_addr)))
The call stack looks like this:
Are there things I need to adjust to get this code working on the NUCLEO-G0B1RE rather than the NUCLEO-G071RB?
Thanks,
Nate
Solved! Go to Solution.
2023-10-19 11:56 PM - edited 2023-10-23 12:06 AM
Currently STM32CubeIDE doesn't support the feature to switch project from one MCU to another.
You can generate your project with STM32CubeMX as a stand alone tool and select STM32CubeIDE as target IDE.
For more details, please have a look at this article: MCU1 to MCU2 migration option within STM32CubeIDE.
Please note that we also have a wiki on how to build a DRP here. You could also follow it for a G0B1 target.
Best regards
2023-10-19 02:54 AM
Hello,
You are right, G0B1 + DRP1M1 is possible, but you cannot use the G071 project "as is" or you will encounter this behavior.
In fact flash size are not the same between G0B1 and G071 and I suspect you did not modified the project accordingly, which leads to the hardfault because you are compiling G071 system files for a G0B1:
Best regards
2023-10-19 12:16 PM
Thank you for the response,
It seems that the device setting in the project configuration is greyed out and cannot be changed:
Is there a different place I should be looking to change the device?
Nate
2023-10-19 11:56 PM - edited 2023-10-23 12:06 AM
Currently STM32CubeIDE doesn't support the feature to switch project from one MCU to another.
You can generate your project with STM32CubeMX as a stand alone tool and select STM32CubeIDE as target IDE.
For more details, please have a look at this article: MCU1 to MCU2 migration option within STM32CubeIDE.
Please note that we also have a wiki on how to build a DRP here. You could also follow it for a G0B1 target.
Best regards
2023-10-20 09:23 AM
Thank you, that guide is exactly what I needed.
Nate