Answer the question
In order to leave comments, you need to log in
How and where to get gpio addresses from stm32f103c8t6?
Hello! Today I decided to torment stm and copied the code from habr, adding my library to it (the code works without connecting the stm library):
//#include "stm32f10x.h"
#include "MyLibs/multitool.h"
int main(void)
{
*((int*)0x40021018) = 0x00000010; // RCC_APB2ENR = RCC_APB2ENR_IOPCEN
*((int*)0x40011004) = 0x00100000; // GPIOC_CRH = MODER_OUTPUT_13
while(1)
{
*((volatile int*)0x4001100C) ^= 0x00002000; // GPIOC_ODR ^= BIT_13
//int i; for (i=5000000; i>0; i--) ;
multi_delay(1000);
}
}
Answer the question
In order to leave comments, you need to log in
What needs to be added in the script.js or css file so that the animation does not move when the page is scrolled?
addresses can be found in the library sources themselves, in the define sections. everything will be - both registers and interrupts and everything else.
however, writing code in this format is only suitable as examples for students to study or for hobbyist enthusiasts. in practice, in real life, this results in a pseudo-effective, not modernized and unsupported feces.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question