cancel
Showing results for 
Search instead for 
Did you mean: 

STM32C031C6 ClassB Example Code

Embedded_Class
Associate

Hi Community,
I came a cross with a strange error that I can not understand the reason.
As I search the read me file of the example project which is shared by ST.
It is written as below.

2. load the image into the target3. Execute the code
- LED4 toggles regularly : all the tests are executed correctly (each toggle signalizes flash test completion)
- LED4 single short flash appears once per 2 seconds: one of the tests FAILED (FailSafe_Handler keeps fail code)
- LED4 single short flash appears once per 4 seconds: one of the tests FAILED by defense programming.

When I run the code without changing any part of code. Led blink as section 1 (Toggle regularly). 
But the funny thing is so strange.
When I even only define a variable in main file like as 
uint16_t Error_Code;
The led blinks like section 2 (LED4 single short flash appears once per 2 seconds.)
And when I try to debug Error_Code shows 0(like it restart itself )when I stop the debugging it turns error code 13(TMF_ERR_CODE).
I could not understand the main reason if this error. Just defining a variable should not cause a error like Flash error etc.
Embedded_Class_0-1733854797496.png

2 REPLIES 2
Dor_RH
ST Employee

Hello @Embedded_Class,

Could you please specify the hardware product you are using? Additionally, mention the package used and the name of the project you worked on in STM32CubeC0, so we can analyze and assist you more effectively.

Best Regards,

Dor_RH


@Embedded_Class wrote:

 I search the read me file of the example project which is shared by ST.


ST share hundreds (maybe even thousands) of example projects - which one, specifically, are you referring to?

How to write your question to maximize your chances to find a solution