//Set any control registers for PortA Pin 1
GPIOA->CRL |= GPIO_CRL_MODE1;
It's not clear whether you understand that GPIO_CRL_MODE1 is a bitmask of the MODE bits for pin1, so you're setting both bits to 1 here. Also, you're NOT setting the CNF bits that are in the same register. Assuming that they start out at 0, this will give you the bit set for 50MHz push-pull output, which is probably what you actually want, anyway. But even in assembly language (
https://github.com/WestfW/Minimal-ARM/blob/master/Blink/blink.S#L132 )I made it say:
((GPIO_MODE_OUT+GPIO_CNF_PP) << (mybit*4))
(Alas, it looks like I had to create those constants; I don't see them in the stm32f10x.h file, or the documentation :-( )
//Set the type
GPIOA->ODR |= (GPIO_ODR_ODR2);
GPIOA->ODR |= (GPIO_ODR_ODR3);
"Set the type"?? ODR is the output data register, and the various ODR_ODR2 are just names for the individual bits.
So, having lucked out in setting pin1 to be an output, you appear to be writing to pins 2 and 3. Probably not what you had in mind.
//I believe the result of all this would be 0000 0000 0000 0000 0000 0000 0000 0000 0011 1100 in the register for gpio A
Which register are you talking about?
The STM32f10x chips only have 16 pins associated with each GPIO port, and the CRL register had 4 bits for each of the first 8 pins, so for a fast push-pull output on pin 1, you WANT (probably)
CRL = 0000 0000 0000 0000 0000 0000 0000 0000
0011 0000 // mode =11, cnf = 00. Other bits left at 0.