[SOLVED] how i can create function LED on and delay function from scratch in STM32F407??

Status
Not open for further replies.

stackprogramer

Full Member level 3
Joined
Jul 22, 2015
Messages
181
Helped
0
Reputation
0
Reaction score
1
Trophy points
1,298
Activity points
2,668
hi,i had a micro stm32f407.
i in project pure keil i had below files:
Listings startup_stm32f40_41xxx.s stm32f407.uvproj system_stm32f4xx.h
Objects stm32f407.uvgui.root stm32f4xx.h
main.c stm32f407.uvopt system_stm32f4xx.c
my question is how i can start for create a function led on and off and delay function???:-|
i didn't used library for board-discovery stm or other board.

please guide me thanks
 

For switching GPIO you need only header file with registers definitions. Bacicaly, it is just a changing value or register.
For delay you can use simple cycle counter, timer or system timer systick. For that purpose you can download and use standart perephireal library from ST.
 
can you talk for example for port GPIOA is as input ,and is on:
witch value i should assigned to it? 1 or 0x01 or x02 or others??????
 

My advice is - if you are starting to learn Cortex uC - start from "bare metal". Leave those ridiculous HAL or SPL "libraries".

All you need is CMSIS
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…