cancel
Showing results for 
Search instead for 
Did you mean: 

Error 200 and error 801 Validate on target on STM32F4291-DISCO

LMart.12
Associate II

Hello,

I'm a newcomer in the STM32 machine learning world and I tried to make a AI model work on my STM32F429I-DISCO. Unfortunately the "Validate on target" option does not work... Errors are E200 and E801. Here is my thought process :

Iinstall a ftdi to my board to send data trough serial port : 0693W00000NstnmQAB.jpgThen I launch stm32cube mx, select the board STM32F429I-DISC1 and start project without initialize all peripheral with their default mode. Then :

0693W00000NsttGQAR.png0693W00000NsttWQAR.png0693W00000NstXlQAJ.png0693W00000NstxmQAB.pngAnd finally :

0693W00000NstzxQAB.pngI also tried validate on target on my other COM (COM4) and with communication port on the target : USART 1.

Each time I get the same result :

0693W00000Nsu2NQAR.pngI don't know what to do, can someone know the solution of my problem ?

Thank in advance !

Best regards,

Martin

20 REPLIES 20

If you see the message at reset then the validation on target should work.

Tell the validation on target the COM port you where using with MobaXterm and make sure you close MobaXterm before to launch the validation on target (on windows you can have only one process accessing a COM port)

Regards

Daniel


In order 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.

Even by using the same COM port "validate on target" doesn't work (same errors as before) but MobaXtermn telling me that there is no problem :0693W00000Nsxy5QAB.pngDo you know the origin of the problem ? IS this the X-Cube-AI version that is too recent ?

Do you think that coding a python script with the python module 'ai_runner' will be able to replace "validate on target"

Best regards,

Martin

You can first try to launch validation on target without the build as the board is already flashed with the correct code.

One possibility is that you have a hard fault when running the inference. It may be due to the stack or heap size being to small, it must be at least 0x800 but you can increase it to 0x1000 or even 0x2000. You can do that in the project tab or in the generated project if you change it in the ld script

Regards

Daniel


In order 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.

I changed the stack and heap, generated code with stmcubeMX, flash the board on CubeIDE but the validate on target without the build still doesn't work. I used a keras model, a tflite model...

Regards,

Martin

Do you have a hard fault in the debugger ?

Are you using external RAM or Flash ?

Regards

Daniel


In order 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.

Sorry but how do you detect a hard fault ? And I'lm not using any external flash and RAM.

Thank you for your time.

Regards,

Martin

fauvarque.daniel
ST Employee

To detect a hard fault you need to flash and debug the validation application using your favorite IDE (for example STM32CubeIDE). The hard fault handler is located in stm32f4xx_it.c file (void HardFault_Handler(void)), just put a breakpoint in this function.

You may also want to verify that the CRC IP is enabled. Normally it is done automatically by X-Cube-AI.

Regards

Daniel


In order 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.

Hello,

I add breakpoint and nothing happen, I assume this is because there is no hard fault. ANd the CRP is enabled in main.c, I don't see any issues here (Even so I may be wrong).

Regards,

Martin

fauvarque.daniel
ST Employee

I'm running out of ideas 🙂 but still 2 more, maybe linked to your ftdi

  • can you put a breakpoint in aiPbMgr,c function aiPbMgrWaitAndProcess the line after if (pb_decode_delimited... or after the pb_io_flush_istream

this is to make sure you are receiving the commands from the PC

  • If you receive something from the PC you may want to lower the baud rate of the USART because maybe you are losing packets as there is no flow control

Regards

Daniel


In order 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.
fauvarque.daniel
ST Employee

If you can, it will be helpful to write a simple echo program that will loop receiving on the USART from the host and sending it back to the host.

At least we'll know that the communication is working both ways


In order 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.