Skip to the content
PCBKitNew board
2 layers31.9 × 30.5 mmStm rtc, the printed circuit board in 3D

STM32 emulator of msm6264b RTC for Amiga computers

Size
31.9 × 30.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
15
Nets
40
Pads
109
Tracks, vias
466, 50
Pours
2
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
2 May 2019
Updated
3 Sep 2020

Overview

Stm rtc is an open-source printed circuit board by AmigaPorts, from the AmigaPorts/stm_rtc repository on GitHub, published under the MPL-2.0 licence. It is a 2-layer board of 31.9 × 30.5 mm with 15 parts on 40 nets, routed with 466 tracks and 50 vias.

It is built around the AMS1117-3.3 and BAR42FILM. Its parts include 4 capacitors, 4 resistors, 4 ICs, 1 diode and 1 connector. It belongs with the retro computing and games boards and the STM32 boards of this library.

Main components

2

README

README.md

STM32 emulator of msm6264b RTC for Amiga computers

This project aims to implement RTC replacement for classic Amiga computers. Target uC was chosen to be as cheap as possible, easily available & RoHS-friendly. This project may work on other computers, but it's not guaranteed.

If you made it work for other machine with some fix or without it, tell me so by creating an issue!

Build and flash

To build firmware, you'll need STM32CubeMX installed to generate required HAL stuff. This way you can also easily port this project to other chips.

  • Delete build folder if present in main repo directory.
  • Delete makefile if present in main repo directory. For some reason STM32CubeMX doesn't regenerate it each time.
  • Open stm_rtc_yourPartName.ioc in STM32CubeMX, then click GENERATE CODE button.
  • After that, simply use generated makefile by writing:
sh
make OPT="-Ofast -std=c11 -Wpedantic -frename-registers" DEBUG=0

If you're on Windows and have MinGW installed, you may use mingw32-make instead. This should generate firmware in ./build/stm_rtc.bin. I've used following GCC version:

plain
> arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]

To flash firmware into your STM you'll need stm32flash tool installed. Required pinout is as follows:

plain
PA14 (TX) - USB-UART RX
PA15 (RX) - USB-UART TX
BOOT0     - 3v3 during programming, GND when run
RES       - 3v3 via 10k or any other resistor

You may need to drive RES for a short time to GND to reset device before programming.

Connect UART-USB dongle to your PC and type:

sh
stm32flash -R -w ./build/stm_rtc_stm32f031k4u.bin COM5
# or
stm32flash -R -w ./build/stm_rtc_stm32f030c6t.bin COM5

Of course replace COM5 with name of correct serial port. You may use Realterm, Cutecom or whatever serial monitor you prefer to list them.

How it works

TBD

License

See each file for details.

  • All ST code is under STMicroelectronics's license.
  • MSM RTC emulation code found in msm_rtc.c and msm_rtc.h is licensed under Mozilla Public License 2.0.

TODO

  • write
  • add pinout compatibility with smaller stm32f0 packages
  • port to STM32F031C6T6
  • PCB
  • switch to LL generation for less footprint?
  • compat with latest arm gcc?
  • stm32f030 power saving code for even cheaper device?

This worked on QFP48

asm
 147              	.L5:
 148 001c 0B69     		ldr	r3, [r1, #16]
 149 001e 1340     		ands	r3, r2
 150 0020 FCD1     		bne	.L5
 151 0022 3869     		ldr	r0, [r7, #16]
 152 0024 050A     		lsrs	r5, r0, #8
 153 0026 3540     		ands	r5, r6
 154 0028 A800     		lsls	r0, r5, #2
 155 002a 6546     		mov	r5, ip
 156 002c 2858     		ldr	r0, [r5, r0]
 157 002e 4546     		mov	r5, r8
 158 0030 6061     		str	r0, [r4, #20]
 159 0032 2560     		str	r5, [r4]
 160 0034 2360     		str	r3, [r4]
 161 0036 F1E7     		b	.L5

Parts

15
QtyValueFootprintReferences
410kResistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR1, R2, R3, R4
3100nFCapacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolderC1, C3, C4
2RTC_CONNPackage_DIP:DIP-18_W7.62mmU3, U4
14.7uFCapacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolderC2
1AMS1117-3.3Package_TO_SOT_SMD:SOT-223-3_TabPin2U1
1BAR42FILMPackage_TO_SOT_SMD:SOT-23D1
1Battery_Cellstm_rtc:BatteryHolder_Keystone_106_1x20mmBT1
1STM32F031K6UxPackage_DFN_QFN:QFN-32-1EP_5x5mm_P0.5mm_EP3.45x3.45mmU2
1program_connectorConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ1

Questions

How big is the Stm rtc PCB?

It measures 31.9 × 30.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Stm rtc use?

15 parts, built around the AMS1117-3.3 and BAR42FILM. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Stm rtc KiCad files?

From the AmigaPorts/stm_rtc repository on GitHub, at the commit this page was made from: the board is pcb/stm_rtc/stm_rtc.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Stm rtc design in my own project?

Its repository publishes it under the MPL-2.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers290.1 × 130 mmPro V2, the printed circuit board in 3D

    Pro V2

    kata0510/Lily58

    6×4+4keys column-staggered split keyboard.

    312 parts2.3k
  • 2 layers26.2 × 45.5 mmPL18 multiprotocol, the printed circuit board in 3D

    PL18 multiprotocol

    pascallanger/DIY-Multiprotocol-TX-Module

    Multiprotocol TX Module (or MULTI-Module) is a 2.4GHz transmitter module which controls many different receivers and models.

    24 parts1.9kGPL-3.0
  • 4 layers99 × 53.3 mmPSLab, the printed circuit board in 3D

    PSLab

    fossasia/pslab-hardware

    PSLab Hardware Design and Schematics https://pslab.io

    199 parts1.7kApache-2.0
  • 4 layers85 × 56 mmPslab mini, the printed circuit board in 3D

    Pslab mini

    fossasia/pslab-mini-hardware

    PSLab Mini Hardware https://pslab.io

    182 parts1.2kApache-2.0
  • 4 layers100 × 54 mm32Bit shift register, the printed circuit board in 3D

    32Bit shift register

    MaltWhiskey/Mega-Cube

    16x16x16 PL9823 Cube with Teensy 4.0 and FlexIO driver

    64 parts766
  • 2 layers44.2 × 29.3 mmI2c tiny usb, the printed circuit board in 3D

    I2c tiny usb

    harbaum/I2C-Tiny-USB

    Cheap and simple I²C to USB interface

    27 parts454
  • 2 layers78 × 60 mmIce viz, the printed circuit board in 3D

    Ice viz

    muni-works/vcad

    BRep CAD kernel in Rust/WASM

    44 parts442Apache-2.0
  • 2 layers59.1 × 99.9 mmCheap FOCer 2 60mm, the printed circuit board in 3D

    Cheap FOCer 2 60mm

    shamansystems/Cheap-FOCer-2

    Low-Cost Motor Controller based on the VESC 6

    193 parts407