Lenovo ThinkCenter M71

Maybe

Windows 10 Shutdown (Power-off) Issue
ThinkCentre M71e won’t shutdown after Windows 10 Upgrade

 1. Boot from the Windows 10 install media
 2. After booting to the UEFI device you see the Install Windows 10 screen, press Shift + F10 to open a command prompt.
 3. Type Diskpart, press Enter
 4. Type List Disk , press Enter
 5. Type Select Disk # (where # is the number your drive shows up as), press Enter
 6. Type Clean, press Enter
 7. Type Convert GPT, press Enter
 8. Type Exit, press Enter.
 9. Close the Command Prompt window.
 10. Click the "Next" button.
 11. Click the "Install now" button

Not working!

powermgr.exe hibernate off

Fix: Lenovo is not shutting down (Lenovo Laptop, Desktop does not turn off)

STM32duino SysTick

STM32G071RB


Twice initialization


Code

  • HAL_Init():
    SystemCoreClock = 16'000'000 Hz = 16 MHz
  • SystemClock_Config():
    SystemCoreClock = 64'000'000 Hz = 64 MHz
#ifndef F_CPU
  #define F_CPU SystemCoreClock
#endif
void hw_config_init(void)
{
  /* Initialize the HAL */
  HAL_Init();

  /* Configure the system clock */
  SystemClock_Config();
}
/* The SystemCoreClock variable is updated in three ways:
    1) by calling CMSIS function SystemCoreClockUpdate()
    2) by calling HAL API function HAL_RCC_GetHCLKFreq()
    3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
       Note: If you use this function to configure the system clock; then there
             is no need to call the 2 first functions listed above, since SystemCoreClock
             variable is updated automatically.
*/
uint32_t SystemCoreClock = 16000000UL;
HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency)
{
  [...]

  /* Update the SystemCoreClock global variable */
  SystemCoreClock = (HAL_RCC_GetSysClockFreq() >> ((AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos]) & 0x1FU));

  /* Configure the source of time base considering new system clocks settings*/
  return HAL_InitTick(uwTickPrio);
}
void noOsSystickHandler() { } // empty

void osSystickHandler() __attribute__((weak, alias("noOsSystickHandler")));
void SysTick_Handler(void)
{
  HAL_IncTick();
  HAL_SYSTICK_IRQHandler();
  osSystickHandler();
}

STM32F401CC / STM32F411CE

ST

STM32F401CC, High-performance access line, Arm Cortex-M4 core with DSP and FPU, 256 Kbytes of Flash memory, 84 MHz CPU, ART Accelerator
STM32F411CC, High-performance access line, Arm Cortex-M4 core with DSP and FPU, 256 Kbytes of Flash memory, 100 MHz CPU, ART Accelerator

Reference

STM32F103C8, Mainstream Performance line, Arm Cortex-M3 MCU with 64 Kbytes of Flash memory, 72 MHz CPU, motor control, USB and CAN

AliExpress

STM32F103C8T6 ARM STM32 Minimum System Development Board STM32F401 STM32F411 STM32F4 + ST-LINK V2 Simulator Download Programmer
STM32F401CCU6 411CEU6 256KB ROM Development Board V1.2 STM32F4 Learning Board For Arduino ST-Link V2 Simulator Download

David Ledger’s uSupply (STM32, C++17)

EEVblog

C++ for the Embedded Programmer
uSupply Firmware Released

Offtopic

STM32 macro for port and pin read and write
Peripheral register access using C Struct’s – part 1

YouTube

C++ for the Embedded Programmer
C/C++ Interrupt Undefined Behavior

GitHub

github.com/SeppyMoose

GitLab

gitlab.com/eevblog/usupply-firmware
gitlab.com/eevblog/usupply-library
gitlab.com/eevblog/usupply-usb

Other Libraries

stm32plus C++ library

Digikey Electronics – Getting Started with STM32 and Nucleo

Getting Started with STM32 and Nucleo

Getting Started with STM32 and Nucleo Part 1: Introduction to STM32CubeIDE and Blinky – Digi-Key
Getting Started With STM32 and Nucleo Part 2: How to Use I2C to Read Temperature Sensor TMP102
Getting Started With STM32 and Nucleo Part 3: FreeRTOS – How To Run Multiple Threads w/ CMSIS-RTOS
Getting Started With STM32 and Nucleo Part 4: Working with ADC and DMA – Maker.io
Getting Started with STM32 and Nucleo Part 5: How to Use SPI | Digi-Key Electronics
Getting Started with STM32 and Nucleo Part 6: Timers and Timer Interrupts | Digi-Key Electronics

Programming the Adafruit Feather STM32F405 Express with STM32CubeIDE – Maker.io