Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • For PWM, you will need to use timer 16 to create a PWM signal. The signal should be at 50Hz, with an on-time ranging from 1ms - 2ms. To achieve this frequency, you will need to change the prescaler and period in tim.c. Note that the input clock frequency is 48 MHz. To change the duty cycle, you will need to set the compare register using the HAL library APIs.

  • Look at the HAL_ADC_, HAL_TIM_, and __HAL_TIM_ functions to access the timers and ADCs. The HAL User Manual will be particularly useful here (Specifically the ADC and TIM exported functions/macros).

  • At the top of the main.h file is the IO pin mappings. Use those defines when configuring your ADC and PWM ports. If you want to learn more about the pinout and IO configuration, you can download STM32Cube and open the bootcamp.ioc file. (Not necessary due to COVID-19)

...

The code for the embedded bootcamp is hosted on GitHub. You will have to fork the repository to make your changes. If you don't know what Git or GitHub is, or how to use it, please read this Git and GitHub tutorial that we wroteour git tutorial linked below.

Submission

Because of resource constraints, you will likely not have the ability to actually test the code. Just make sure it compiles. To do this, enter the root directory of your project (~/embedded-bootcamp) and type make into your terminal. Afterwards, a message will be displayed on your terminal letting you know if your code built successfully. Please include a screenshot of this message when you submit your code.

To submit your work, create a pull request of your fork against the UWARG/embedded-bootcamp repository. Name your pull request Bootcamp: YOURNAME. Tell the responsible team lead that you've completed the bootcamp and they will review your submission. You may be asked to revise some things.

NoteIf you would like to test out the code, come to one of the work days and we'll show you how to program the board and actually test it out (Not possible due to COVID-19)

...

...