Hi, I am trying to deploy a Keras model that fits in the board STMH743XI-E02. In order to do so, I've created the model, and loaded it into the project according to the current documentation.
I've tried to use several USART ports to enable communications with the board, and I've tested the USART communications with an example project that correctly send the data to my terminal. Meaning, that my configuration is correct, at least on the board to use the USART.
But when it comes to use STM32CUBEMX and the AI additional package, after analyzing the model, and validate it on desktop, the following error appears to me, once and again:
LOAD ERROR: STM32 - no connected board(s), invalid firmware or the board should be re-started
My questions are:
Attached, project.ioc, the STMCUBEMX project and the model I've used along with the validation data.
Thank you very much for your time.
on this board there are some jumpers to put in the right place to have the USART1 sent to the ST-Link
and the USART1 is connected on PB14 and PB15
You should be able to use the automatic validation on the target specifying explicitly USART1 and PB14/PB15 for the ports
Otherwise you can always add the validation AI component to your project, enable USART1 in asynchronous mode, then in AI configure the Platform Settings to USART1, generate the code, flash it on the board then go back to MX to launch the validation on the target without auto generation
I've seen on some boards, after a first connection on the PC there is a need to do a reset by hand for the validation to work correctly.
A good practice is to configure the USART to run at 115200 Bauds, this is the default value taken by the underlying command line for validation.
Thank you for your response on such short notice.
> I've seen on some boards, after a first connection on the PC there is a need to do a reset by hand for the validation to work correctly.
What do you mean by this?
Just that a first validation on the target failed after flash, hitting the reset button and restarting the validation made it work. I didn't see this behavior on this specific board actually.
To move forward on the debugging of your issue, you can launch a pseudo tty on the COM port on the PC and press the reset button on the board. Normally you should see some text displayed.
You can also verify that your main.c looks like that:
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
and in app_x-cube-ai.c you have something like:
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
I've tried to do the debug with TeraTerm but it just doesn't show anything with this program. When debugging with the UART example that is provided for this board I can see the printf in the TeraTerm but not with this one. After reset the board 3 times with the AI program, a character is ploted in the PuTTY term.
Maybe this is helpful,
After generating the code without validating the model, and debuging it, it stops in these lines, in stm32h7xx_haluart.c:
> /* Wait until flag is set */
> while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status)
> /* Check for the Timeout */
> if (Timeout != HAL_MAX_DELAY)
If you see some strange characters it may be due to the mismatch between the USART configuration and the TeraTerm configuration.
Both should be at the same baud rate (115200 by default) 8 bit word length, no parity, 1 stop bit.
Just tried a project with STM32CubeMX 5.4, X-Cube-AI 4.1.0, IAR EWARM and it worked fine on that board
Here is what I did
start from the STM32CubeMX board selector and select STM32H743I-EVAL
answer no to initialize peripherals to their default values
add X-Cube-AI 4.1.0 Core and Validation
enable USART1 Asynchonous (it will go to the right pins)
In X-Cube-AI enter the platform settings (USART1) and enter your network
In Project Manager, give a name for the project and in the Code Generator section check "Copy only the necessary library files"
generate the code, compile and flash it.
then go back in X-Cube-AI and launch the validation on the target.
I used the default board configuration (clock at 64Mhz). If you change the D1CPRE clock to 480Mhz you need to also change the RCC Power regulator voltage scale to "Power Regulator Voltage Scale 0"
Hope it helps