2023-10-03 04:41 AM
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
2023-10-03 06:49 PM
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.
2023-10-04 06:50 AM
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.
2023-10-05 11:05 PM
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
2023-10-05 11:35 PM - edited 2023-10-05 11:35 PM
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,
2023-10-06 07:50 AM
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