Hello, I try my first steps in Assembly on Keil Studio Online I did not manage yet to make any output on a port. The Following program does compile witout mistakes and Keil Studio does write the *bin - File on the Nucelo F103 RB. But there is no putput on Port C. Can hely anyone ?
the initialization stuff is missing, the clock for the port must turned on first and the port configuration set to output.
You can do ths easily by adding a ‘DigitalOut pin(PC_n);’ where PC_n is your gpio.
I don’t know If the asm code is correct, I would never use it.
I tried this with in initialization - but there was no effekt. Where can I see, which adresses are reserved for the ports ? In my small assembly Program I assume, that Port C is 0x40020800. But i don’t know if this is true. Somewhere ther must be an configuration file where this is defined.
Thank you for this Tip. This File is very long… have you a hint, where exactly there i find the definitions ? i need to know with which adress I can use in assembly to have access to port A B or C
the base is defined above.
But this is the address of the gpio structure GPIO_TypeDef with several registers, you cannot simply write to this address. Please check the datasheet and reference manual for this mcu.