C12 Embedded systems in MicroPython and C · Practice
Embedded lab: registers and timing
Problems dealt one at a time, with new numbers every time. The kinds you miss come back more often, and you can keep going as long as you like.
0 solved
0 in a row
0 of 1 kinds solid
Check
The button on P4 (to ground) is pressed once, for 50 ms. Print how long it was held, in whole milliseconds (rounded), using the free-running SYS_CYCLES counter at 10 MHz.
C on the course's RISC-V board (10 MHz, no floating point). #include "board.h" for the registers; print(x) shows a number. Tab indents; press Esc and then Tab to move on.
A kind of problem counts as solid once you've got it right on the first try twice in a row. Back to the lesson · Practice every topic in C12