cancel
Showing results for 
Search instead for 
Did you mean: 

Always getting ERROR when reading MLX90393 data.

bmak
Senior

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:

  1. Go to Single Measurment mode ( 0x3F )
  2. Send Read Measurment command ( 0x4F)
  3. 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 :).

0693W00000FAAykQAH.jpg 

1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

Hi @Maria Bąk​ ,

please note that the MLX90393 device is a Melexis (not ST) sensor, so I suggest you to refer to Melexis support.

If otherwise the issue is related to STM32 configuration, I added the related topics for getting more help.

-Eleon

View solution in original post

3 REPLIES 3
Eleon BORLINI
ST Employee

Hi @Maria Bąk​ ,

please note that the MLX90393 device is a Melexis (not ST) sensor, so I suggest you to refer to Melexis support.

If otherwise the issue is related to STM32 configuration, I added the related topics for getting more help.

-Eleon

Eleon BORLINI
ST Employee

Hi @Maria Bąk​ ,

were you able to solve the issue?

-Eleon

Sorry, but I didn't have time to sit back to it again. When I solve this, I will post my solution :)