sparkfun / SparkFun_ICM-20948_ArduinoLibrary

Arduino support for ICM_20948 w/ portable C backbone
Other
168 stars 72 forks source link

initializeDMP freezes on ESP32S3 (Example 6) #132

Closed michajas closed 1 year ago

michajas commented 1 year ago

Subject of the issue

Hey! Thank you for this great library! I'm trying to use DMP feature of ICM with this lib. For now I'm able to read raw values for Acc/Gyro/Mag without a problem. But when I try going through the Example 6 the code freezes in initializeDMP function (I'm using the override from example 10).

It's stuck in this area:

// Configure Accel scaling to DMP // The DMP scales accel raw data internally to align 1g as 2^25 // In order to align internal accel raw data 2^25 = 1g write 0x04000000 when FSR is 4g const unsigned char accScale[4] = {0x04, 0x00, 0x00, 0x00}; result = writeDMPmems(ACC_SCALE, 4, &accScale[0]); if (result > worstResult) worstResult = result; // Write accScale to ACC_SCALE DMP register // In order to output hardware unit data as configured FSR write 0x00040000 when FSR is 4g

I believe that this might be some issue with platform (esp)? Thank you for any help!

Your workbench

Steps to reproduce

I'm just using the sample code.

michajas commented 1 year ago

Sorry it was not so obvious error in my code :( (I was running 2 tasks and one of them tried to read the data when ICM were in initializing state)