Skip to main content
Explorer II
October 3, 2023
Question

Start development using OSD32MP1-BRK board.

  • October 3, 2023
  • 4 replies
  • 3094 views

Hello @everyone

I have a OSD32MP1-BRK mpu board. I want to test maximum gpio toggle speed. Currently i used libgpio and using this code i achieved 4.1 us (microsecond) between rising and falling edge of pulses.This is too slow as per our requirement.  I need in nano second.

I have attached waveform. In rpi getting approx 15ns.

Thanks and regards

Kundan Jha

    This topic has been closed for replies.

    4 replies

    Super User
    October 4, 2023

    Write directly to the GPIOx->BSRR registers to achieve the best speed. Tens of ns are possible. But a code that just toggles pins isn't very useful, there are typically better ways to achieve tight timing than flipping pins with the cpu.

    Technical Moderator
    October 4, 2023

    Hi @kundanJha 

    GPIO toggling speed is an old school way to measure some MCUs performances.
    It does not make any sense on complex MPU products using Linux libraries which are far from real time.
    I doubt that Rpi with similar Linux library would acheive 15ns.


    If you are expecting to use GPIO bit banding to control external components which are not supported by existing IP (e.g. SPI, UART, SAI, I2C, etc...), it is still possible to use Cortex-M4 which is available inside STM32MP15. Running at 208MHz I think it could achieve some tens of ns toggling.

    Maybe you could share more information on your use case.

    Regards.

    kundanJhaAuthor
    Explorer II
    October 6, 2023

    Hey  @PatrickF @TDK ,

    I have no experience programming an MPU; I've only worked with MCUs in the past. However, due to speed considerations, I'm transitioning to an MPU. Could you please provide some guidance on how I can get started? Additionally, if you have any documents or links to share, that would be greatly appreciated.

    Thanks and regards,

    Kundan Jha

    Technical Moderator
    October 6, 2023

    Hi @kundanJha 

    First, there is component spec, application notes and board documents.

    But for getting started and system/SW aspects, you absolutely need to have a look to MPU Wiki related to latest available ecosystem release : https://wiki.st.com/stm32mpu/wiki/Main_Page
    (please note that if you are using 3rd party board like Octavo one, you should also refer to specific material provided by them)

    Regards,

    kundanJhaAuthor
    Explorer II
    October 6, 2023

    Hi @PatrickF ,

    I have installed STM32CubeIDE on my Ubuntu system. I selected the MPU and used the UI to select pin PD15 as a GPIO output, and I assigned the pin name "LED_1" before generating the code. However, in the main.h file, the pin number is not being initialized. Can you help me identify the issue?

    Thanks and regards,

    Kundan Jha