Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Boot2Qt and CAN or SPI communication
Forum Updated to NodeBB v4.3 + New Features

Boot2Qt and CAN or SPI communication

Scheduled Pinned Locked Moved Solved Mobile and Embedded
8 Posts 3 Posters 493 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Damian7546
    wrote on 13 Dec 2024, 15:13 last edited by Damian7546
    #1

    I am testing Boot2Qt module together with STM32MP157F-DK2.
    I prepared my first GUI in Qt Design Studio and deploy my application to target device

    Now I would like to establish communication with CAN device slaves, but I have no idea where to start.

    While analyzing the STM32MP157F-DK2 diagram, I noticed that I had an SPI interface available, so I logged to target device by ssh and listed SPI devices bo nothing found.

    root@b2qt-stm32mp15-disco:~# ls -1 /dev/spi*
    ls: /dev/spi*: No such file or directory
    

    Can you give me any idea how add SPI or CAN driver to Boot2Qt system ?

    Maybe simple question, how control GPIO from qt ?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      Damian7546
      wrote on 22 Dec 2024, 16:46 last edited by Damian7546
      #8

      @jsulm
      @mrdebug
      I probably found appropriate knowledge about approach to programming STM32MP1.
      The STM32MP1 series is based on Cortex-A7 and Cortex-M4 cores architecture.

      First Way:
      First of those (Cortex-A7) is required to create GUI (ex. Boot2Qt) .
      But second one (Cortex-M4) is required to communicate with STM32 peripheral (ex. by STM32CubeProgrammer).
      Data processed in Cortex-M4 can be send to GUI (Cortex-M7) over the “Inter processor Communications” (IPC) virtual UART.

      Second Way:
      All programing by userspace Linux . In case OpenSTLinux ad STM32MP157f-DK2 , necessery is to turn on CAN0 by editind device tree.
      Device tree is generated by STM32CubeMX.
      Just make sure to install the appropriate version of the STM32Cube* tools - supplied with the Ecosystem version you are using.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mrdebug
        wrote on 15 Dec 2024, 20:05 last edited by
        #2

        Hi, this is not related to Qt. I suggest you to ask in ST forums related to your mcu.
        Have you installed STM32CubeMX? Maybe you have got a sub folder with examples about gpio usage.

        Need programmers to hire?
        www.labcsp.com
        www.denisgottardello.it
        GMT+1
        Skype: mrdebug

        1 Reply Last reply
        0
        • D Offline
          D Offline
          Damian7546
          wrote on 19 Dec 2024, 13:23 last edited by
          #3

          So, the logic , for example control DI DO , I need STM32CubeMX to programing in? , not form C++ , qt ?

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mrdebug
            wrote on 19 Dec 2024, 13:32 last edited by
            #4

            I haven't got experience with your device.
            I the past I made a project for raspberry pi where the gui was made in Qt.
            To manage the GPIOs and the spi I used a specified library for raspberry pi.
            I think your device is similar.
            I think that Qt can't support each device that has got a spi, i2c or gpio interfaces.
            Have you check in the stm forums?

            Need programmers to hire?
            www.labcsp.com
            www.denisgottardello.it
            GMT+1
            Skype: mrdebug

            1 Reply Last reply
            0
            • D Offline
              D Offline
              Damian7546
              wrote on 20 Dec 2024, 06:45 last edited by Damian7546
              #5

              So, you included library for raspberry pi (ex. "wiringPi") to qt creator and controled GPIO from the qt level?

              J 1 Reply Last reply 20 Dec 2024, 10:15
              0
              • D Damian7546
                20 Dec 2024, 06:45

                So, you included library for raspberry pi (ex. "wiringPi") to qt creator and controled GPIO from the qt level?

                J Offline
                J Offline
                jsulm
                Lifetime Qt Champion
                wrote on 20 Dec 2024, 10:15 last edited by
                #6

                @Damian7546 You don't include a library "to QtCreator", you link the library to your application and use it like any other.
                "controled GPIO from the qt level" - this has nothing to do with Qt, you use that library in your C++ code.

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  Damian7546
                  wrote on 20 Dec 2024, 10:42 last edited by Damian7546
                  #7

                  So, on my host machine (where I have qt and qtCreator) additionaly I should install SDK (STM32MP1 OpenSTLinux Developer Package Sources) to my STM32 and link downloaded library to my project in qt Creator ?
                  [https://www.st.com/en/embedded-software/stm32mp1dev.html#get-software](link url)

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    Damian7546
                    wrote on 22 Dec 2024, 16:46 last edited by Damian7546
                    #8

                    @jsulm
                    @mrdebug
                    I probably found appropriate knowledge about approach to programming STM32MP1.
                    The STM32MP1 series is based on Cortex-A7 and Cortex-M4 cores architecture.

                    First Way:
                    First of those (Cortex-A7) is required to create GUI (ex. Boot2Qt) .
                    But second one (Cortex-M4) is required to communicate with STM32 peripheral (ex. by STM32CubeProgrammer).
                    Data processed in Cortex-M4 can be send to GUI (Cortex-M7) over the “Inter processor Communications” (IPC) virtual UART.

                    Second Way:
                    All programing by userspace Linux . In case OpenSTLinux ad STM32MP157f-DK2 , necessery is to turn on CAN0 by editind device tree.
                    Device tree is generated by STM32CubeMX.
                    Just make sure to install the appropriate version of the STM32Cube* tools - supplied with the Ecosystem version you are using.

                    1 Reply Last reply
                    0
                    • D Damian7546 has marked this topic as solved on 22 Dec 2024, 17:37

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved