cancel
Showing results for 
Search instead for 
Did you mean: 

Start development using OSD32MP1-BRK board.

kundanJha
Associate II

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

5 REPLIES 5
TDK
Guru

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.

If you feel a post has answered your question, please click "Accept as Solution".
PatrickF
ST Employee

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.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
kundanJha
Associate II

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

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,

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
kundanJha
Associate II

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