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

4 REPLIES 4
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

Amel NASRI
ST Employee

Hi @Dor_RH & @Andrew Neil ,

I assume that the question is related to X-CUBE-CLASSB - Class B 60730-1 and 60335-1 Functional Safety Package with software expansion for STM32Cube.

I will check with our Functional Safety expert to bring required help for this request.

-Amel

 

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.

Petr Sladecek
ST Employee

Hello,

the Fail Safe handler procedure is entered when execution of any STL test module finds a problem. The fail code input parameter should help you to identify it. If you inspect call stack, you should even identify the STL procedure calling the fail handler. The code shows problem with Flash integrity check. Great probably, your code modification is not completed by adequate change of the CRC field modification or parametrization of the test (see user param structures handling) and so the Flash content integrity check simply fails.

Best regards,

Petr