‎2023-02-21 07:24 AM
‎2023-02-22 05:16 AM
Figured out the problem - the STM32C0116-DK when connected to USB must not be opened by any host app or MCU will detect onboard programmer and hard faults. My shame ;)
‎2023-02-21 07:30 AM
Hi,
[ ... deleted... ]
Issue is that STLink must not be opened by any host app, see below
‎2023-02-22 01:31 AM
I'm having two STM32C0116-DK boards. So I've made the simple experiment, unpacked the second board that is shipped with _stock_ LED blinking project and locked it to RDP 1 with :
STM32_Programmer_CLI -c port=SWD freq=4000 -ob RDP=0xBB
Repowered it and guess what ? It stopped blinking exactly as my simple project above. I guess there is real problem with STM32C0 series concerning this issue.
‎2023-02-22 02:00 AM
Made the same experiment with STM32C0316-DK and all is working as expected - RDP 1 do not crash the firmware. Seems like problem is related at least to STM32C0116
‎2023-02-22 05:08 AM
Hello @BRusl.1​ ,
I did the test with the C011DK, C031DK and NUCLEO, I never observed the issue. I changes the RDP with cube programmer and then after a POR the LED MCU is working fine (LED blinking with HAL delay of 100ms).
Which product revision are you using ? And did you do the POR after changing the RDP ?
BR,
Simon
‎2023-02-22 05:16 AM
Figured out the problem - the STM32C0116-DK when connected to USB must not be opened by any host app or MCU will detect onboard programmer and hard faults. My shame ;)
‎2023-02-22 05:23 AM
Mistakes are there to be learned from. ;)
Thank you for finding this and reporting it back here!
Regards
/Peter