2024-04-26 02:02 AM
Hi everyone.
I'm trying to use a NUCLEO-F401RE, a X-NUCLEO-IKS02A1, and a STEVAL-MKI197v1 and the following software: v3.2.0.4544 AlgoBuilder, v1.25.1.11665 Unicleo-GUI, v1.15.0 STM32CubeIDE, v6.11.0 STM32CubeMX and the X-CUBE-ALGOBUILD and x-CUBE-MEMS1 software packages (everything running on windows 11).
First I didnt use AlgoBuider
I selected every sensor each board has on the x-cube-mems1 (package) and build it using CubeIDE (no error or warnings), but the Unicleo-GUI shows only the X-NUCLEO sensors, being unable to switch between (for example) the different Gyr/Acc sensors.
If i dont select the board extension IKS02A1 CubeIDE gives no trouble (0 error and warnings) but the Unicleo-GUI doesnt recognice my board and i get stuck here:
(note: If i select to list all coms it appears, but shows nothing and cannot start)
When I try to create a custom firmware for AlgoBuilder, if I select the Algo custom aplication option without the MEMS IKS board extension. I copy the project into the path /STMicroelectronics/AlgoBuilder/FirmwareTemplate but it doesnt show up on the AlgoBuilders Target display. and I cannot even choose the option of just the IKS02A1 alone as a template.
(Note: I downloaded an already made custom firmware for a different board as a test and it appears, so its the correct path)
Any help on both this problems would be so greatly appreciated,
thanks in advance
Solved! Go to Solution.
2024-05-16 04:30 AM
Sorry, I was testing some new unofficial CubeMX version and it modified the ioc. Unfortunately I have to say there is most likely some regression in CubeMX v6.11.1. After some modifications the project works but only in v6.11.0 and in unofficial v6.12.x.
Please completely uninstall v6.11.1 and then install v6.11.0 from st.com. Attached is the suitable ioc. Here is what I've changed to compile with 0 errors 0 warnings but maybe in 6.11.0 it could work without the changes, I didn't try.
There is also warning (in X-CUBE-ALGOBUILD v1.3.0) which points out that in demo_serial.c file in void Report_Error(uint32_t err) function the uint8_t buffer[24]; array has to be actually uint8_t buffer[260];. After fixing that you should generate correct FW. This has been fixed in v1.4.0 already.
Please let me know...
2024-05-17 04:18 AM
Sorry for the late reply, the code compile and the custom firmware now shows up on the algobuilder, mems studio and unicleo (if uploaded to the board from STM32IDE), but there is a new issue.
I added the LSM6DSO sensor to the project to get the data from it, setting it to VDD and the LSM6DSOX to GND.
When I try to compile an AlgoBuilder project with the following configuration:
it gives me this errors:
I tried to use MEMS Studio and with the same input gives the error:
I also tried switching the sensors (setting the ISK gyr to GND and de DIL to VDD) but keeps with the same issue.
2024-05-17 05:05 AM
Have you updated capabilities.json/xml files to reflect your HW? Get the inspiration in example Projects in X-CUBE-ALGOBUILD package. Then you could try to migrate X-CUBE-ALGOBUILD to v1.4.0 in CubeMX before project generation (if not done already).
2024-05-17 05:10 AM
2024-05-20 01:38 AM
On Algobuilder if I use the "firmware_template" path the target does not appear, using "FirmwareTemplate" appears giving the previous error, if i add wrongly on purpose the capabilities it gives me the MEMS Studio error of not supported, and if i add it right gives the same error than before, so the capabilities on algobuilder are correct.
On the other side, using MEMS Studio with the custom firmware on the "firmware_template" path, if I manually add the custom capabilities, I can generate the C code but when building gives the same error shown on the last post.
2024-05-20 04:30 AM
I'm also trying an easier code, instead of "Sensor hub / Rotation Vector 6x / Graph" I tried "Sensor hub / Acceleration / Graph" and the code compiles, but when i execute it, it just takes one measurement equal to zero and nothing else.
2024-05-23 11:21 PM
@aesteban it's hard to say without having it. Please share both your generated firmware template which you copied into the firmware_template MEMS Studio directory (including ioc) and also your complete AlgoBuilder project.
2024-05-24 03:47 AM
2024-06-05 07:09 AM
First problem was that your timers should be switched, TIMER2 have to support Capture Compare functionality and you have the timer with this functionality (TIM1) in TIMER1 (I understand that it was logical choice to use TIM1 as TIMER1 but...).
Second problem was that you need to implement the BSP_SENSOR_XXX_GetOrientation functions in custom_mems_control_ex.c file. Here is the example of implementation for LSM6DSO which is onboard on IKS01A3:
2024-06-14 12:11 AM
Switching the TIMs was the keypoint, the accelerometer, gyro and magnetometer give now the RAW data correctly, but the rotation block in MEMS Studio gives NaN measurements, what may be happening?