Thanks to visit codestin.com
Credit goes to github.com

Skip to content

codesmithcode/embedwk5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Week 5 Assignment

I modified the provided 'reusable' CLI code to work on the STM32F3 Discovery board.

This was done by using 'HAL_UART_Receive_IT' to trigger an interrupt whenever a character was recieved over UART. The interrupt handler adds the received character to the received buffer.

The 'reusable' processing loop is largely the same, except it no longer polls for new characters, instead receiving the data via the interrupt processing.

To avoid synchronization issues with the received buffer, the 'reusable' processing loop is treated as a critical section, and interrupts are disabled.

Three simple commands were added to the CLI:

  • led_toggle - toggles a specified LED
  • led_blink - puts a specified LED into "blink" mode, where a timer interrupt toggles its state every 500ms
  • reset - resets the board

Additionally:

  • the 'reusable' code was forked and used as a submodule in the project.
  • it has been modified to take a command table as a parameter, allowing the fork to be reused across projects (see projectCommands.h/.c)

About

CLI assignment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published