cancel
Showing results for 
Search instead for 
Did you mean: 

lis3mdl and libiio buffered mode doesn't work

axel101
Associate III

I am using lis3mdl and try to use libiio in my programm.

In my programm I enabling chanels and try to create buffer with iio_device_create_buffer function. It fails with error "Operation not permitted".

Also "WARNING: High-speed mode not enabled" message prints in terminal (I assume this message is printed by libiio)

What should I do? Should I turn on this high-speed mode in device tree or what?

1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

Hi @axel101​ ,

sorry for the late reply.

Are you using these drivers on Github in your project, especially this st_mag3d_buffer.c?

If so, what I suggest you is to open an issue directly on Github (LINK), so that the expert can directly receive a notification of the issue and can reply faster to you.

Let me update in case of any progress.

-Eleon

View solution in original post

6 REPLIES 6
Eleon BORLINI
ST Employee

Hi @axel101​ ,

sorry for the late reply.

Are you using these drivers on Github in your project, especially this st_mag3d_buffer.c?

If so, what I suggest you is to open an issue directly on Github (LINK), so that the expert can directly receive a notification of the issue and can reply faster to you.

Let me update in case of any progress.

-Eleon

axel101
Associate III

Sorry for late answer.

No, I'm using intree drivers from https://github.com/STMicroelectronics/linux/tree/v5.10-stm32mp linux kernel.

Your link refers to another linux kernel, but there is only 4.19 kernel version. Any plans to include these drivers in linux v5?

Hi @axel101​ ,

I don't thins so, but I suggest you to try on Github, to get a direct link with ST sensors Linux expert.

-Eleon

This repo already contains buffered mode driver, thanks

axel101
Associate III

The issue was different. I using STM32MP157-ev1 board and configured SPI interface with NSS pin. But I found out that NSS is not enabled in STM32MP1 SPI driver at all. Driver doesn't setup SPI controller for NSS usage. Magnetometer driver successfully read WhoAmI register, but since NSS didn't switched after register reading, SPI doesn't work anymore. I set up SPI with software NSS via GPIO and all works fine.

Hi @axel101​ ,

thank you for sharing your solution!

Good community approach!

-Eleon