# ARM Part 1

# Setting Up the Project

Start a new project, select STM32-F446RE and check CMSIS core and Device Startup.


Time environment

Then go to Options for target and change debugger to STLink debugger


Options for target


Debugger

and on settings for the debugger choose flash download -> reset and run to avoid reseting on the device.


Flash_download_reset

Finally, rename the folders and create a new file.


New file

# Coding Analyzing the Reference Documents

Now we need to activate the BUS AHB1 that connects to the GPIO PORT D. We have to access the BUS and toggle the particular pin in its register that corresponds to PORT D.


AHB1

So we are going to look at the reference manual and see which particular bits in the register correspond to giving clock access to PORT D.

Look for the enable register.


AHB1


AHB1


AHB1

Locating the LEDs


AHB1

MODER


AHB1

LD2


AHB1

P13


AHB1