When running the Switches_LED_Demo program,]
Current consumption increase by 100mA when SW3 is pressed.
- When only heart beat LED is running, 0.179 Ampere @12V
- SW1:With LD5 on 0.187 Ampere = 8 mA increase over case 1
- SW2:With LD4 on 0.195 Ampere = 8 mA increase over case 2
- SW3:With LD3 on 0.305 Ampere = 110 mA increase over case 3 Why? SW3 switches PI14 and PI15. PI14 is LD3. PI15 is J3 connector, pin 38, switching relay 1. However this cannot add 100mA to the current consumption.
After disable PI15 relay output in software, the current consumption is correct:
if(button3 == 1)
{
if(button3_state == 0)
{
HAL_GPIO_WritePin(GPIOI, GPIO_PIN_14, GPIO_PIN_SET);
button3_state = 1;
// PI 15 is relay 1
// This code is for testing only
// HAL_GPIO_WritePin(GPIOI, GPIO_PIN_15, GPIO_PIN_SET);
}
else
{
HAL_GPIO_WritePin(GPIOI, GPIO_PIN_14, GPIO_PIN_RESET);
button3_state = 0;
// PI 15 is relay 1
// This code is for testing only
// HAL_GPIO_WritePin(GPIOI, GPIO_PIN_15, GPIO_PIN_RESET);
}
button3 = 0 ;
}
Comments
- LD2 , triggered by SW4, PA0 , needs long press for the LED to switch states, it is not interrupt driven, it is polled.
- LD1, triggered by SW5, increases current consumption by only 3mA
- SW_LD10, triggered by SW6, increases current consumption by only 4mA, SW_LD10 is physically located on the compute module, not on the base board.



