6 years, 7 months ago.

HelloWorld_IKS01A1 works without any changes?

Hi

I got this board yesterday and I tried to make it work with STM32F401. I could got temperature and humidity data, but gyro, accelerometer and magnetometer with Teraterm. Do I have to change the sample code to read those data?

The sample outputs only like the following: - Starting new run - HTS221 humidity & temperature = 0xBC

When I removed the codes except for the codes related to humidity, the sample read it repeatedly.

I used Sensors_reader sample, but Gyroscope | Motion Sensor ID = UNKOWN (0x0 | 0x0). Is my expansion board broken?

Best regards

Question relating to:

1 Answer

6 years, 7 months ago.

Actually, it seems as if something is wrong with your X-NUCLEO-IKS01A1 expansion board.
Unfortunately, it's very difficult to guess from remote what could be the cause of this misbehavior, but you might want to check/try the following:

  • check if the four jumpers JP1 - JP4 are all fit on your expansion board
  • try to update the programs and all used libraries to the latest versions and recompile

Hi, Wolfgang Betz. Thank you for your reply. I checked and tried the two things, however there were no differences. For your information, I found LPS25H_IO_Read tried to return PRESSURE_ERROR. Why can't I read the data? Additionally, why does the program stop without calling printf after pressure_sensor->read_id method? I couldn't understand that. Best regards

posted by yu ishikawa 12 Sep 2017

What do you mean by

yuki fukuhara wrote:

LPS25H_IO_Read tried to return PRESSURE_ERROR

posted by Wolfgang Betz 12 Sep 2017

Hi, yuki fukuhara. I mean the LPS25H_IO_Read probably returns PRESSURE_ERROR, but I can't receive the return value with the following code:

  int val = pressure_sensor->read_id(&id);
  printf("%d\n", val);

The printf after read_id wasn't called. So, I expressed 'tried'. 'Tries' is more suitable. I'm sorry for that.

posted by yu ishikawa 12 Sep 2017

The X-NUCLEO-IKS01A1 library is written in a way that it initializes each single component on the expansion board. In case an initialization for a components fails, its component pointer will be set to NULL. So I assume that in your case pressure_sensor is equal to NULL and this is most likely the reason why the program execution stops. Unfortunately, the HelloWorld_IKS01A1 application does not check for these situations as it is intended to be kept as small and simple as possible.

posted by Wolfgang Betz 12 Sep 2017

Hi, Wolfgang Betz. Thank you for your reply and I'm sorry for my late reply. So, unless I success in initializing the expansion board, HelloWorld_IKS01A1 program stops, doesn't it? Why doesn't my expansion board work? Must I edit code of HelloWorld_IKS01A1? Is the probability that my expansion board is initial failure high? Best regards

posted by yu ishikawa 13 Sep 2017

yuki fukuhara wrote:

So, unless I success in initializing the expansion board, HelloWorld_IKS01A1 program stops, doesn't it?

Correct!

yuki fukuhara wrote:

Why doesn't my expansion board work?

Most likely your board is broken as you suspected from the beginning.
The maybe easiest way to check this would be if you could get hold of another X-NUCLEO-IKS01A1 and test if you have the same problems or not.

yuki fukuhara wrote:

Must I edit code of HelloWorld_IKS01A1?

Not for a correctly working X-NUCLEO-IKS01A1 expansion board.

yuki fukuhara wrote:

Is the probability that my expansion board is initial failure high?

Not sure what you mean?

posted by Wolfgang Betz 14 Sep 2017