Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use automatic code generation and some of your own code to create the following variations. Therequirements for each program are that: Uses a 4 MHz
Use automatic code generation and some of your own code to create the following variations. Therequirements for each program are that: Uses a MHz MSI system clock. Use PA to drive LED transistor and blink an LED with a period of seconds second on onsecond off Monitor Pin PCthe User Button Note that this pin will need an internal pullup resistor andthe button will connect to ground. Disable all other pins and clocks except on RTC program, then leave the LSE power and thepins assigned to PC and PCThe low power states to be used in most of the programs are trigger by the following code.HALPWREnterSLEEPModePWRMAINREGULATORONPWRSLEEPENTRYWFI;HALPWREnterSLEEPModePWRLOWPOWERREGULATORONPWRSLEEPENTRYWFI;HALPWRExEnterSTOPModePWRSTOPENTRYWFI;HALPWRExEnterSTOPModePWRSTOPENTRYWFI;HALPWRExEnterSTOPModePWRSTOPENTRYWFI;HALPWRExEnterSHUTDOWNMode;These can be uncommented to put the program into a WFIWaitforinterrupt in various lowpowerstates. Place these functions in while loop.The programs that are to be generated area. Blink with CPU clocki. Counts a volatile variable inside the CPU program to create the period. How do you foind the period
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started