As per the datasheet of STM32F103C8T6, its GPIO pins has a hardware speed limitation of 50MHz. I need to achieve speed above 10MHz, but even with assembly codes I am getting only 7.99MHz.
It is running at the maximum recommended speed of 72MHz (8MHz Crystal + PLL).
Can anyone guide me ? Please check the following assembly language loop I am using for toggling the GPIO pins.
asm(".equ GPIOB_ODR, 0x4001080C");
asm("ldr r6, = GPIOB_ODR");
asm("loop:");
asm("mov r1, #0xFFFFFFFF");
asm("strh r1, [r6]");
asm("mov r1, #0x00000000");
asm("strh r1, [r6]");
asm("b loop");