cinera_handmade.network/miotatsu/riscy/riscy/riscy030.hmml

47 lines
3.1 KiB
Plaintext

[video member=miotatsu stream_platform=twitch project=riscy title="Studying the LED Fade Demo Code" vod_platform=youtube id=dQUKjsJpRF8 annotator=Miblo]
[0:07][Recap and set the stage for the day]
[1:46][Learn the LED colour fading logic in led_fade.c][:peripheral :research]
[4:33][Consider investing in a second webcam for the HiFive1]
[5:56][Upload led_fade.c to the HiFive1 and :run it to eyeball the LED fading]
[8:01][Confirm that it is doing the logic we expected]
[8:47][Determine to understand how the PWM1_REG() calls manipulate the PWM Configuration Register[ref
site="SiFive Developers"
page="Platform Reference Manual"
url=https://www.sifive.com/documentation/freedom-soc/freedom-e300-platform-reference-manual/]][:peripheral :research]
[17:02][Marry up the register offsets and constants defined in devices/pwm.h with the documentation[ref
site="SiFive Developers"
page="Platform Reference Manual"
url=https://www.sifive.com/documentation/freedom-soc/freedom-e300-platform-reference-manual/]][:peripheral :research]
[25:23][Consult the Freedom E310-G000 Manual[ref
site="SiFive Developers"
page="Freedom E310-G000 Manual"
url=https://www.sifive.com/documentation/chips/freedom-e310-g000-manual/] for the base address of the config register][:peripheral :research]
[28:31][Determine that we are sending three different signals, one for each LED channel[ref
site="SiFive Developers"
page="Freedom E310-G000 Manual"
url=https://www.sifive.com/documentation/chips/freedom-e310-g000-manual/]][:peripheral :research]
[35:03][Read the PWM1_REG() macro and marry up the defined PWM1_BASE_ADDR with the documentation[ref
site="SiFive Developers"
page="Freedom E310-G000 Manual"
url=https://www.sifive.com/documentation/chips/freedom-e310-g000-manual/]][:research]
[38:00][Come to understand how the PWM1_REG() calls manipulate the low 16 bits of the PWM Compare Register[ref
site="SiFive Developers"
page="Platform Reference Manual"
url=https://www.sifive.com/documentation/freedom-soc/freedom-e300-platform-reference-manual/]][:peripheral :research]
[50:32][Learn that pwmcmp0 sets the width of the duty cycle and that pwmcount resets to zero at the end of every PWM cycle[ref
site="SiFive Developers"
page="Platform Reference Manual"
url=https://www.sifive.com/documentation/freedom-soc/freedom-e300-platform-reference-manual/]][:peripheral :research]
[52:56][Go over the PWM Compare Registers another time[ref
site="SiFive Developers"
page="Platform Reference Manual"
url=https://www.sifive.com/documentation/freedom-soc/freedom-e300-platform-reference-manual/]][:peripheral :research]
[55:54][Note that the signal is high most of the time[ref
site="SiFive Developers"
page="Platform Reference Manual"
url=https://www.sifive.com/documentation/freedom-soc/freedom-e300-platform-reference-manual/]][:peripheral :research]
[58:37][Think about the logic of those PWM1_REG() calls][:blackboard :peripheral :research]
[1:02:38][Determine to draw out the LED's waveform]
[1:03:23][We're out of time for today]
[/video]