Always getting ERROR when reading MLX90393 data.
Hi,
I try to use MLX90393 with my STM32-F4 DISC board on SPI2.
I can communicate with it, read and write non volatile memory, he responds to me.
The steps that I'm doing are:
- Go to Single Measurment mode ( 0x3F )
- Send Read Measurment command ( 0x4F)
- Read measurments and go back to step 1.
After SM command I get 0x23 status, which means that:
- I got into SM mode
- I have all bytes of data to receive
After RM command I get 0x33 status:
- I am in SM mode
- I GOT AN ERROR
- I have all bytes of data to receive
Then I tried exiting and reseting, which helps with an error bit, but then after writing RM command i again get an error.
Basically, I always get an error after RM command.
Here is what i have in registers of non volatile memory:
- REGISTER, 15-8 bit, 7-0 bit
- 0x00, 0x72, 0x7C
- 0x01, 0xC0, 0x00
- 0x02, 0x00, 0x05
- registers from 0x03 to 0x09 have 0x0000.
What am I doing wrong? What is causing this error?
My baud rate od SP2 is 562.5 KBits/s so I assume that it's not the high speed.
Here is a picture of what I get.
Maybe it looks normal, but the error bit worries me and data doesn't change when I manipulate with magnet.
Thanks for your help :).
