Question: For all configurations, the default HSI clock will be used for the microcontroller. You are allowed to use the gpio functions available from the stm

For all configurations, the default HSI clock will be used for the microcontroller. You
are allowed to use the gpio functions available from the stm32f446zeLib library.
STEP1: Normal operation
The project contains a code that only executes an infinite loop containing the
increment of a variable in the following conditions:
All bus prescalers are set to the minimum value (i.e. maximum frequency)
clock for ports A to H are enabled.
Measure the supply current IDD in this configuration.
Please use this project
**===========================================================================
**
**STEP1: normal operation, reference
**
**===========================================================================
*/
#ifdef STEP1
int main(void){
lcd.begin(16,2);
lcd.clear();
lcd.print((char *)"run mode");
int j =0;
// prescalers at min value
rccSetPrescaler(AHB_PRESCALER, AHB_DIV_1);
rccSetPrescaler(APB1_PRESCALER, APBX_DIV_1);
rccSetPrescaler(APB2_PRESCALER, APBX_DIV_1);
RCC->AHB1ENR |=0x000000FF; // activates clock for ports A to H
while (1){
j++;
}
}
#endif

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!