Warning
This page is located in archive. Go to the latest version of this course pages.

Covid HW 04 - First program on embedded platform

  • Get familiar with the HW - NUCLEO and especially with the NUCLEO-F401RE
  • The description of the board available in one document.
  • With help of STM32 CubeMX find the correct settings of the clock distribution for NUCLEO STM32F401 - Revision MB1136 C-03 - see chapter 6.7 OSC clock.
  • Propose a concept of the communication protocol structure (list of commands and line endings) - e.g. Standard Commands for Programmable Instruments (SCPI) interface.
  • Write a program for NUCLEO board

Homework for NUCLEO board owners

  • The project program is capable to read button.
  • The project program is capable to operate LED light.
  • Every time you press the button the LED light will switch the state.
  • The project progam is capable to receive a character from a terminal (GTKterm).
  • These characters will be supported by the program: o = LED will switch on, c = LED will switch off, r = the board will return info about button press such as: “Button is pressed” or “Button is relased”.

The result of this homework is a file with sourcecode (main.c - file name is important) for the embedded platform (not for PC) which allows communication between the board and the computer (using GTKterm). Please do not upload the whole Eclipse project.

Homework for students without NUCLEO boards

  • The project is capable to use sockets and the program code is in one source file.
  • One instance will simulate nucleo and the second instance will simulate the terminal sending requests.
  • The nucleo simulator will display “LED on” or “LED off” when a request ('c' or 'o') is received.
  • The simulator will have internal variable representing the state of the button. There will be also option to switch the state of the button representing variable. Based on the state of this internal variable the program will respond appropriatelly to 'r' request.
  • The terminal simulator will draw a menu which allows for an action selection. These actions corresponds to requests for LED on and off and button read. The last option will be an exit one.

The result of this homework is a file with code (main.c) for the computer (for PC) which allows communication between two instances of the program (over sockets).

courses/be5b99cpl/hw/hw04c.txt · Last modified: 2020/10/27 23:31 by pacesp