Hello All,
FIXED AND EDITED TO SHOW THE FIX....
Background:
Pin B10 is configured to turn an LED on and A8 is configured to receive input when the button/switch is pressed.
The following C code does not work:
ARM Cortex/STM32/"BluePill" port configuration
FIXED AND EDITED TO SHOW THE FIX....
Background:
Pin B10 is configured to turn an LED on and A8 is configured to receive input when the button/switch is pressed.
The following C code does not work:
Code (Text):
- int main(void) {
- //Setting Ports A and B as active:
- RCC->APB2ENR = (0x3<<0);
- Defining GPIOA as input on pin 8 by passing 1 into CNF8(2):
- GPIOA->CRH = (0x1<<2);
- //Defining GPIOB as an output on pin 10 by passing 10 into MODE10(8):
- GPIOB->CRH =...