cancel
Showing results for 
Search instead for 
Did you mean: 

https://wiki.st.com/stm32mcu/wiki/AI:How_to_perform_motion_sensing_on_STM32L4_IoTnode I'm using X-CUBE_AI 7.1.0 but having trouble compiling this example project for motion detection.

RBenf.11
Associate

ai_input[0].n_batches = 1;

'ai_buffer' {aka 'struct ai_buffer_'} has no member named 'n_batches'

network.h

AI_DEPRECATED

#define AI_NETWORK_IN \

 ai_network_inputs_get(AI_HANDLE_NULL, NULL)

This comes up invalid initializer error.

Any ideas? The initial code compiled ok with the acc data apart from a bug in cubemx where the lsm6dsl.h could not be found.

5 REPLIES 5
Umahe.1
Associate II

I got the similar error as I were using the reference code from 7.0.0 and found that with upgradation of Software pack from 7.0.0 to 7.1.0. There is a new way of assigning the input and getting the output. You can check that if that's the mistake if you're doing too.

AC.7
Associate II

Any answer for this question? I'm facing the same issue

KK.10
Associate II

See my answer below.

KK.10
Associate II

X-CUBE-AI 7.0 code example doesn't work with later versions. In my case 7.3.0.

Completely disregard example code for 7.0 version and use code from ST example: "How to perform motion sensing on STM32L4 IoTnode".

Section 6: "Create an STM32Cube.AI application using X-CUBE-AI".

thanks you