Versions Compared

Key

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

...

Follow as much of the Software 101 modules as you can while working remotely. Start here: Module 2: Hello World

Notes: Don’t worry too much about GDB debugging, in reality print statements (LOG_DEBUG) is very often used. Also, don’t worry about the “Blinking LED - Registers” section, it’s more advanced and definitely not necessary going forward.

Next, create a new project in a new branch soft_999_{firstname_lastname}_fw_102 that does the following:

  • Defines a struct that stores two uint8_t counters, counter_a and counter_b. typedef this struct Counters.

  • Uses a single soft timer to increment counter_a every half a second, and counter_b every second.

  • LOG_DEBUG the value of each counter whenever they’re updated.

  • Doesn’t use any global variables

Your output should look something like this:

...

If you run into problems, let someone know! No need to bash your head against a wall.

Hints:

  • Refer to the blinking LED tutorial for how to use soft timers.

  • Use a while (true) {} loop to keep the program running.

  • Don’t forget to start another soft timer within your soft timer function call.

  • In your main function, create a counters struct, and pass a pointer to that struct to the soft_timer_start_... call as the context.

Once you’re done with the project, open a pull request and request a code review from a lead. We won’t actually merge your pull request, but it’ll be a good chance to learn how code review works.

[Optional]: watch Arshan’s videos on GPIO, interrupts, and ADCs.

...