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

HW 02 - 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.
  • Get familiar with the extension board 802 and its interconnection with NUCLEO
  • Write a program for NUCLEO board

Homework submission

Show to the lab instructor you can:

  • Compile the test project
  • Transmit the data between NUCLEO and PC (known serial interface)
  • Present a report containing:
    • proposal of the communication protocol - what will be the reply for identification request (e.g. *IDN? command)
    • list of I/O pins used to control the LED
    • list of I/O pins used to control and read the state of the button
  • Determine why the serial line initialization requires multiplication by 3

The result of this homework is a file with code (main.c) for the embedded platform which allows communication between the board and the computer.

These parameters of the program will be evaluated:

  • 1 point - student is able to compile and upload the program to the Nucleo board.
  • 1 point - student is capable to set a break point in the code, stop the execution of the code on a condition and resume the program operation
  • 1 point - student will present a list of commands which will be sent from computer to Nucleo with description what these commands will do - it will be written in the comment section of the source code - these commands can be simple characters like 'o' - led on, 'c' - led off, and 'r' - read the state of the button
  • 1 point - student will present a description of pin IDs and their initialization to control LED and Button - it will be written in the comment section of the source code
  • 1 point - the program will be able co control the state of the LED based on button e.g. when the button is pressed the LED will switch on and opposite.

extra point

  • 1 point - student will create a report comparing the StdLib and CubeMX HAL libraries, e.g. definition, what they are, what are the differences - it will be written in the comment section of the source code
courses/be5b99cpl/hw/hw02.txt · Last modified: 2018/11/14 11:24 by pacesp