-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EEPROM write issue #41
Comments
You didn't mention if you defined |
Also if you look at exapmle code for extended mode in readme, you have the |
Hi. I deleted start_measurement() function and the problem is the same. The return value of read_temp_raw_extended is -116. I think it is 116 so it should be ETIMEOUT. And I didnt define BITS_PER_LONG = 32 as a compiler flag. I just define it in mlx90632.h library #define BITS_PER_LONG 32. I dont know how to do it in esp-idf framework but when it is needed to add a flag for bits per long I will try to find out how. Thanks. |
And is it necessary to add BITS_PER_LONG = 32 compiler flag? And is it needed only for source files in melexis component (mlx90632.c and mlx90632_extended_meas.c)? Thanks. |
Added BITS_PER_LONG = 32 as compiler flag didnt help. I have got pull-up resistors for I2C wires with value of 10 kOhm (integrated in PCB) and in datasheet there is pull-up resistors value of 1 kOhm. Can be this an issue? |
I don't think so, your communication should be fine at least you wrote above you received register values. How about making a longer delay with that |
Any updates on this? I hope you solved the issue meanwhile... |
Hello, I'm having similar problems, mlx90632_read_temp_raw_extended() is also returning ret<0, also it seems that measurement type does not get set correctly, i call mlx90632_get_meas_type() and it seems it is still set to default even though i set it to mlx90632_set_meas_type(MLX90632_MTYP_EXTENDED) beforehand. I set the BITS_PER_LONG to 32 for my system. I don't think there is a problem with my i2c functions since i can read good temperature values in normal mode from the chip as well as calibration constants. |
Your write function has correct endianness for the sensor? Are you able to check stuff with scope? Based on your comment it seems write is not working. |
It does have correct endiannes, I mean as I said, measuring in standard mode works good for me. I can try checking what happens with scope. Can you confirm that eeprom version number 0x8505 supports extended mode? |
Yes, I also assume Init function also returns ERANGE right? |
Hi. I have an issue with EEPROM writing with sensor MLX90632SLD-DCB-000-SP. I am using framework ESP-IDF and microcontroller ESP32.
The first think I want to say is I think I am 100% able to read EEPROM memory from sensor. The normal mode program is working well and i2c_read and i2c_read32 functions dont return ret<0. Also my sensor should be supporting Extended mode because function mlx90632_init() returns ERANGE.
The problem is when I am trying to use MEDICAL mode or EXTENDED mode with appropiate code, Function mlx90632_read_temp_raw_extended() is returning ret<0. As I know in normal mode there is no need to write to EEPROM memory so the code is working.... But in other modes there is so I assume this can be an issue.
For I2C write I am using this code
and I think I am doing everything what is said in datasheet, erasing memory before write and then write to memory.
Code which I am using to implement extended mode is:
I think no function is missing to successfully execute extended measurement. The return value of object and ambient variables is "nan". Also it is taking a long time to get this output (I mean "nan"). And when I want to execute new code with normal mode measurement I need to reset power supply of external PCB board with MLX90632 and after that sensor is producing good data of temperature. I was also looking at example code available here: https://github.com/melexis/mlx90632-example and there is no special implementation of mlx90632_i2c_write function.
If there is someone who can help to solve this problem or had a similar problem and was able to solve it I would be happy for any help. Thanks.
The text was updated successfully, but these errors were encountered: