Skip to content

jp112sdl/HM-Sec-SCo-EFM32

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HM-Sec-SCo-EFM32

Homebrew firmware for the HM-Sec-SCo, that can also be used with an Livisi WDSo2.0, HmIP-SWDO and HmIP-SWDO-I

  • EFM32G200F64 Arduino IDE Integration
    • SPI communication with CC1101 module
    • get AlarmClock / Timer working
    • use internal EEPROM (emulated)
    • use external EEPROM (if M24M01 is mounted on pcb)
    • internal vcc measurement
    • external battery measurement
    • use address/serial from unique chip id
    • Sleep-Mode
  • Unlock SWD interface
  • Upload code with ST-Link V2 using OpenOCD

HM-Sec-SCo PRG1 Pinout

pinout


Software part

  • 1.) Install Arduino IDE 1.8.5 or higher
  • 2.) Add third party board support from https://raw.githubusercontent.com/jp112sdl/ARDUINO_EFM32/master/package/package_ARDUINO_EFM32_index.json
  • 3.) Search for "efm32" and install the board
  • 4.) Download AskSinPP dev_efm32 Branch (Code->Download ZIP) and extract it to the Arduino libraries directory

Hardware part

  • 1.) Connect ST-LinkV2 to the PCB PRG1 pads using 4 wires (GND, 3.3V, SWCL, SWDIO)
  • 2.) Unlock SWD access
    • start OpenOCD with openocd -f interface/stlink-dap.cfg -f target/efm32.cfg
    • connect to openocd using telnet localhost 4444
    • unlock with
efm32.dap apreg 0 0x4 0xcfacc118
efm32.dap apreg 0 0x0 1
efm32.dap apreg 0 0x8
sleep 1000
efm32.dap apreg 0 0x0 2
reset_config none
reset init
  • 3.) for debugging it is helpful to connect a FTDI interface to the TX pin to read serial debug messages
  • 4.) Upload code with /usr/local/bin/openocd -f interface/stlink-dap.cfg -f target/efm32.cfg -c "program /path/to/.elf verify reset exit"

⚠️ ST-Link V2 Firmware (Bug?)

After upgrading the firmware of my ST-Link V2 from V2J29S7 to V2J32S7 (or newer) it was no longer possible for me to unlock debug access!
I did not find the firmware V2J29S7 online, but it works with V2J28S6, too.
So I added this firmware update to the repository (stsw-link007-V2J28S6.zip).

About

homebrew firmware for the HM-Sec-SCo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages