Skip to content

vtarale/STM32F4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 

Repository files navigation

STM32F4

  • Using the stm32f407-discovery board.
  • Making PID Controller

Current Status

  • stm32f407_gpio.h complete (now can be used !!).
  • stm32f407_usart.h complete (now can be used !!).
  • stm32f407_adc.h complete (now can be used !!).
  • stm32f407_dac.h complete (now can be used !!).
  • light.c complete.
  • ADC complete.
  • USART complete.
  • DAC complete.

Under Development:

  • PID controller : the next thing after DAC

Prequistes

  • To flash code on board - openocd
  • Arm 32 bit compiler - arm-none-eabi-gcc
  • nostdlib
  • For checking code and debugging - readelf
  • For debugging - gdb, lldb (for mac)
  • For usart - qemu

Using the Library

Caution: while using library global variables can't be used.

  • While using the library main() function has to be replaced by start()
int start() {                   // has to be always int
  ...
}

Running the Code !

  1. To compile light.c:
$ make compile_light
  1. To compile adc.c:
$ make compile_adc
  1. To compile usart.c:
$ make compile_usart
  1. To compile dac.c:
$ make compile_dac
  1. To flash the code onto the board:
$ make run
  1. To debug:
$ make debug
  1. To analyze(recheck) the code and see the memory (readelf):
$ make read
  1. To clean (clear object files):
$ make clean

References

RM0090 Reference manual

Lisence

MIT