Need Help Manipulating Registers in Inline Assembly (STM32F103 “BluePill”)
问题 I have some simple code I want to get working. What I'm trying to do is to switch Pin PA8 ON and OFF as fast as possible on the STM32F103 "BluePill" using Assembly. I'm having trouble with the correct syntax. __asm__ volatile ( "ldr r2, = (1<<8) \n\t" "str r2, = [odr] \n\t" "ldr r2, = ~(1<<8) \n\t" "str r2, = [odr] \n\t" : [odr] "=r" (GPIOA->regs->ODR) ); The compiler throws this error: Compiling .pio/build/genericSTM32F103C8/src/main.ino.cpp.o /tmp/ccLofo6i.s: Assembler messages: /tmp