Skip to main content
Visitor II
July 7, 2021
Solved

lis3mdl and libiio buffered mode doesn't work

  • July 7, 2021
  • 3 replies
  • 1806 views

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?

    This topic has been closed for replies.
    Best answer by Eleon BORLINI

    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

    3 replies

    ST Employee
    July 20, 2021

    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

    axel101Author
    Visitor II
    December 24, 2021

    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?

    ST Employee
    January 4, 2022

    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

    axel101Author
    Visitor II
    January 24, 2022

    This repo already contains buffered mode driver, thanks

    axel101Author
    Visitor II
    January 24, 2022

    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.

    ST Employee
    January 24, 2022

    Hi @axel101​ ,

    thank you for sharing your solution!

    Good community approach!

    -Eleon