2021-10-11 02:34 AM
I'm using a NUCLEO-L476RG with a STEVAL-MKI197V1, connected in SPI mode without any expansion board. My setup works: I successfully used the LSM6DSOX low-level driver to read sensor data.
But my attempts to use the high level libraries, such as MotionAC and MotionGC, have failed:
I think I've followed the setup instructions, including adding the CRC module, but obviously there's something I'm doing wrong. Any idea?
Solved! Go to Solution.
2021-10-11 06:25 AM
Everything is working fine now.
For those landing here, here are the mistakes I made:
@Miroslav BATEK , thanks a lot for your time on this. The fact that you could generate and run my own project file on your side freed my mind and unlocked everything. You might want to report the wrong "API flow chart" diagrams in MotionAC and MotionGC docs (and maybe in other libs as well).
2021-10-11 02:47 AM
Would you please share your project so we can check it?
2021-10-11 02:52 AM
2021-10-11 05:07 AM
Unfortunately I don't the sensor at hand but If I debug the generated project from your .ioc file on NUCLEO-L476RG board I able to pass the MotionGC_Initialize() function and the GetLibVersion() function returns correctly the library version.
The only change I did was that I uncheck "Generate Under Root" but I don't think this the root cause.
Would you please try it again and maybe increase the stack size.
2021-10-11 05:37 AM
@Miroslav BATEK , thanks a lot for looking into this.
I doubled the stack size with no success.
I noticed the MotionGC_GetLibVersion() function fails at its very beginning, after a single test. See here:
If you have access to the library source code, this might give a clue.
2021-10-11 05:56 AM
@Miroslav BATEK, I found my error regarding MotionGC_GetLibVersion(). I was calling it *before* the lib initialization, and it seems it's wrong, despite what's described in UM2181 chapter 2.2.3 diagram. So now MotionGC_GetLibVersion() works.
2021-10-11 06:25 AM
Everything is working fine now.
For those landing here, here are the mistakes I made:
@Miroslav BATEK , thanks a lot for your time on this. The fact that you could generate and run my own project file on your side freed my mind and unlocked everything. You might want to report the wrong "API flow chart" diagrams in MotionAC and MotionGC docs (and maybe in other libs as well).