how to really get started

Viewing 5 reply threads
  • Author
    Posts
    • #13870
      Marco SartoreMarco Sartore
      Participant

      Hello,

      I have purchased your OSD32MP1-BRK evaluation board and successfully run your Getting Started instructions found here. I happily switched on and off the onboard LEDs. So far, so good.

      Then your tutorial ends with some links to resources and that’s it. I got immediately lost. Even the terminology used in the links is unintelligible for me.

      Probably this product is too far from my capabilities, but I regularly work with STM32 MCUs and purchased your evaluation board with the optimistic idea to take advantage of its interface to the DDR memory, hopefully with simple memcpy() calls inside a regular STM32 “C” program (as I do when I program the STM32 MCUs).

      My final dream was to acquire data via the ADCs and store them in the big RAM available, but I don’t even know how to switch on and off an LED onboard WRITING AND USING MY CODE and not your pre-built command: sudo echo 255 > /sys/class/leds/LED1_GRN/brightness.

      Your tutorial is nice to show that the unit is working and that I can in principle log in and play with it. But it does not explain how to get started programming it.

      Should I abandon your product or do you have a real “getting started” resource where one coming from CubeIDE C programming of STM32 MCUs can hope to understand a bit and start developing on his own ?

      Thanks in advance,

      Marco

    • #13875
      Neeraj Dantu
      Moderator

      Hey Marco,

      The Getting Started Guide provides an introduction to the hardware and how to bring-up the board. As you said, it is a good starting point, but not a comprehensive guide to all functionality.

      Having said that, the goal of the MP1 family from both ST and Octavo perspective is to provide a good path to customers such as yourself to MPU and Embedded Linux. There is a lot of support documentation to achieve this. I will try to provide some useful info below:

      1. Start here on ST’s Wiki that talks about basic platform functionality and features of the SoC: https://wiki.st.com/stm32mpu/wiki/STM32MP15_microprocessor

      2. https://wiki.st.com/stm32mpu-ecosystem-v3/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2 provides a little more detailed guide on how to write applications for A7 and M4 cores. Most of the procedure should be applicable for the BRK as well.

      3. https://wiki.st.com/stm32mpu-ecosystem-v3/wiki/Category:How_to links to a number of pages that explain how to do a specific task.

      4. https://wiki.st.com/stm32mpu-ecosystem-v3/wiki/Category:Linux_Operating_System provides information on almost all peripherals, their drivers and how to use them: https://wiki.st.com/stm32mpu-ecosystem-v3/wiki/Category:Linux_Operating_System

      For example, please see https://wiki.st.com/stm32mpu-ecosystem-v3/wiki/How_to_control_a_GPIO_in_userspace for the user space program to control GPIOs that you are looking for.

      I would also advise you on learning a little more about Linux and SYSFS. A lot of how you do things in Linux is by way of writing to virtual device “files” like /dev/gpiochip0 or using command line to execute individual commands or shell scripts that set configuration and ask the kernel to execute system calls.

      Octavo provides Debian SDK(https://github.com/octavosystems/osd32mp1-debian) and OpenSTLinux layer(https://github.com/octavosystems/meta-octavo-osd32mp1) to add support for Octavo dev boards on top of ST’s ecosystem.

      Best,

      Neeraj

    • #13876
      Marco SartoreMarco Sartore
      Participant

      Hi Neeraj,

      many thanks for your detailed answer that switches on some light on the issue.

      I have quickly read among the indicated links that I can easily write a program and add to the embedded Linux (I’ve run your getting started, for example, on your Debian). Is it possible to do so also for addressing the AD converters and the DDR memory ? If yes, do you have any examples or starting code to suggest ?

      Final goal is to acquire data from the ADC and store in the DDR memory, then once it is full, download its content into a computer.

      Thanks again,

      Marco

    • #13878
      Neeraj Dantu
      Moderator

      Marco,

      Assuming the ADC has an I2C interface, BRK has a number of I2C devices available. Please see https://octavosystems.com/octavosystems.com/wp-content/uploads/2020/05/Default-Pin-Mapping.pdf for pin-mux details. These I2C interfaces are exposed as /dev/i2cX, which you can use to communicate over. See for example: https://elinux.org/Interfacing_with_I2C_Devices, where several system calls are used to communicate over the I2C bus.

      You can also enable the Linux Kernel driver available for the ADC using device tree: https://wiki.st.com/stm32mpu-ecosystem-v3/wiki/I2C_device_tree_configuration. You will need to recompile your device tree and boot the board with the new device tree. The driver will provide several virtual files in the file system in /sys/class/i2c/ to configure the ADC as well as measure ADC inputs. See https://wiki.st.com/stm32mpu-ecosystem-v3/wiki/How_to_compile_the_device_tree_with_the_Developer_Package for a software SDK that ST provides for compiling device tree.

      Best,

      Neeraj

    • #13879
      Marco SartoreMarco Sartore
      Participant

      Dear Neeraj,

      many thanks for these further info. I am sure that a similar approach is available for SPI as well.

      Since you are so nice and skilled, could you please also advice on how to take advantage of the big DDR memory to store custom data (as for example the ADC samples) ?

      Thanks for your patience,

      Marco

    • #13880
      Neeraj Dantu
      Moderator

      Marco,

      The Linux kernel is already configured to use the DDR as needed. See https://github.com/STMicroelectronics/linux/blob/v6.1-stm32mp/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi#L20 for the device tree configuration of the DDR. Memory can be allocated and freed accordingly in your application.

      Best,

      Neeraj

Viewing 5 reply threads
  • You must be logged in to reply to this topic.