This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Assembler references for STM32F103

Hi Guys, can someone point me in the right direction for assembler programming on the STM32F103. I've been programming ATmega chips for years now in Assembler and now have started on ARM. I just love the instructions like this ADD R0,R0,R1 So easy :)

So any assembler references, listing etc would be much appreciated.

Also, how would I go about switching bits on ports ON & OFF?

On ATmega the syntax is
SBI PORTD,PD1 ; SetBit - turns on bit 1 on port D
CBI PORTD,PD1 ; ClearBit - turns off bit 1 on port D

btw, I'm not a C programmer.

Thanks guys
Pete

Parents
  • can someone point me in the right direction for assembler programming on the STM32F103. I've been programming ATmega chips for years now in Assembler and now have started on ARM.
    somewhere at the ARM website there is an instruction set manual.

    Also, how would I go about switching bits on ports ON & OFF?

    If you look in the ST reference amnual you will see that the ports (GPIO) has lots of SFRs.

    oh, boy are you in for a job, The port manipulation (initialize, on/off, clock, etc), requires 6 ot 7 steps If you use the canned routines, provided by ST I would not even think of doing it 'manually' be it in C or assembler.

    I would suggest you switch to C, and if you insist on assembler, find out how to mix (the canned) C and assembler.

    Also, the process of just starting the processor is pages and pages of C

    Erik

Reply
  • can someone point me in the right direction for assembler programming on the STM32F103. I've been programming ATmega chips for years now in Assembler and now have started on ARM.
    somewhere at the ARM website there is an instruction set manual.

    Also, how would I go about switching bits on ports ON & OFF?

    If you look in the ST reference amnual you will see that the ports (GPIO) has lots of SFRs.

    oh, boy are you in for a job, The port manipulation (initialize, on/off, clock, etc), requires 6 ot 7 steps If you use the canned routines, provided by ST I would not even think of doing it 'manually' be it in C or assembler.

    I would suggest you switch to C, and if you insist on assembler, find out how to mix (the canned) C and assembler.

    Also, the process of just starting the processor is pages and pages of C

    Erik

Children