Repository navigation
[WIP] [HELP NEEDED] Fix QMC6309 on LSM6DSO over SPIM - #166
meganukebmp wants to merge 2 commits into
Conversation
…0_numop, which specifies the number of read operations. Its valid field values are 0–7.
|
It seems like the imu and mag are not communicating properly and that the actual setup of the mag isn't working right. Specifically I am wondering if the nack flag is getting set on the sensorhub status reg, since I do see the write communications timing out (which your code changes try to address and also you are aware of with the sensor data rate not working). Some high value logs to add would just be to log the latest I did review the DSO datasheet and everything does look to be the same for the sensorhub registers/implementation as the DSV, so I am unsure why it wouldn't be working. I can try to take a deeper look tomorrow if it's helpful, but it is difficult to diagnose what is happening since I don't have the same hardware in front of me. |
|
What sensor module are you using, and how is it connected to the NRF? It could even be something like a bad data line between the imu and mag on sdx or scx. The main thing that makes me question if it is a hardware issue is the inconsistency in the sensor detection, like when you mention that it takes multiple cycles for the mag to be detected. Does the IMU get detected consistently and it is just the communication between imu and mag? |
Its a standard stacked smol with a Mumo board from Deyta. The IMU has zero issues, its only the magnetometer. The magnetometer is properly connected as far as I'm aware and all of my (20) slimes exhibit this. Its definitely a software issue. Prior to this patch it would not communicate with the magnetometer at all due to logic issues. Its very likely that the timings and error handling are wrong among other things. A lot of the current code seems to be fire and forget without delays or checks. The initial discovery likely fails because of all of this as well. |
The LSM6DSO driver was evidently just a find and replace job of the LSM6DSV driver and thus had some inconsistencies and things that were plain out wrong.
Most importantly that it never actually ran the while loop since
statuswas initialized to 0.Currently this sort of works but is not really properly functional
It appears the whole thing times out during initial scan and subsequent scans and only after rescanning a few times do the stars align for detection (which prior to this never happened). The data rate I believe never gets set so we get low frequency on the QMC6309 while trying to poll at a substantially higher rate.
I am requesting for help since I simply don't have the time to work on this fully.