2016-11-09 09:55 AM
Hello
As i inspected through assembly instructions, it is possible to read 16 bits gpio port with 2 cpu cycles and write with 4 cpu cycles, beside of electrical considerations, is it possible to achieve reading and writing with 1 cpu cycle? what is it's related assembly instruction?2016-11-10 01:40 AM
If you are asking us if you can read and write GPIO port with the same freq. as the CPU is running at, the answer is a definite NO. It would be wise not having too high expectations when it comes to reading and writing GPIO ports on stm32 device.
2016-12-10 12:03 PM
Microcontrollers are usually not as real time as an FPGA or an ASIC. If something must be toggled by SW every cycle, what would happen if an interrupt would pop-up? To get high toggling HW speed, it is better to use STM32 HW peripherals. For example SPI, FMC (a read/write on its memory space would make some toggle at high speed), DMA to GPIO ports (with some less jitter than pure SW flavour), etc...