I have an interesting problem. I tried to port the driver onto STM32 board. I rewrote the mlx90640_i2c_driver.
With my code, I can dump calibration data, then extract the parameters, and them seem correct. But the "MLX90640_GetFrameData" always stuck in a while loop, because the status register's data ready bit will never be 1.
paramsMLX90640 sensor_params;
static uint16_t eeData[832];
static uint16_t mlx90640Frame[834];
static float32_t pixels[768];
HAL_Delay(5000);
//Tried with another resolution, refresh-rate too
MLX90640_DumpEE(MLX90640_ADDR,eeData);
MLX90640_ExtractParameters(eeData,&sensor_params);
MLX90640_GetFrameData(MLX90640_ADDR,mlx90640Frame); // stuck here
MLX90640_CalculateTo(mlx90640Frame,&sensor_params,1,1,pixels);
In debug mode I can clearly see that the status register is always 0x0900.
I tried to solve it with direct register writings:
I noticed another interesting thing, if I write the control register, I can read back the correct value (e.g. 0x1901), so I think I2C communication is OK. But if I write the status register (e.g. 0x0930), I always read back 0x0900.
I have two senors, but both produce this (error).
Do you have any idea?
Thanks
Edit:
If I write 0x0901 to control register, i read out 0x0800 from the status register, I don't write to the status register, but new data never comes.
Hello!
I have an interesting problem. I tried to port the driver onto STM32 board. I rewrote the mlx90640_i2c_driver.
With my code, I can dump calibration data, then extract the parameters, and them seem correct. But the "MLX90640_GetFrameData" always stuck in a while loop, because the status register's data ready bit will never be 1.
In debug mode I can clearly see that the status register is always 0x0900.
I tried to solve it with direct register writings:
I noticed another interesting thing, if I write the control register, I can read back the correct value (e.g. 0x1901), so I think I2C communication is OK. But if I write the status register (e.g. 0x0930), I always read back 0x0900. I have two senors, but both produce this (error). Do you have any idea? Thanks
Edit: If I write 0x0901 to control register, i read out 0x0800 from the status register, I don't write to the status register, but new data never comes.