

Stm rtc
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
2AMS1117-3.3
SOT-223-40℃~+125℃ 0.003%Vout 1 1.1V@(800mA) 15V 1A 3.3V 5mA 72dB@(120Hz) Fixed Over Current Protection、Short Circuit Protection、Thermal shutdown Positive SOT-223 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSAdvanced Monolithic SystemsVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsBAR42FILM
SOT-23-3L1 Independent 100mA 1V@100mA 30V 500nA@30V 750mA SOT-23-3L Schottky Diodes ROHSSTMicroelectronicsSchottky Diodes
README
README.mdSTM32 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
buildfolder if present in main repo directory. - Delete
makefileif 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 CODEbutton. - After that, simply use generated makefile by writing:
make OPT="-Ofast -std=c11 -Wpedantic -frename-registers" DEBUG=0If 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:
> 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:
PA14 (TX) - USB-UART RX
PA15 (RX) - USB-UART TX
BOOT0 - 3v3 during programming, GND when run
RES - 3v3 via 10k or any other resistorYou 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:
stm32flash -R -w ./build/stm_rtc_stm32f031k4u.bin COM5
# or
stm32flash -R -w ./build/stm_rtc_stm32f030c6t.bin COM5Of 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.candmsm_rtc.his 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
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 .L5Parts
15| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | 10k | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R1, R2, R3, R4 |
| 3 | 100nF | Capacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolder | C1, C3, C4 |
| 2 | RTC_CONN | Package_DIP:DIP-18_W7.62mm | U3, U4 |
| 1 | 4.7uF | Capacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolder | C2 |
| 1 | AMS1117-3.3 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U1 |
| 1 | BAR42FILM | Package_TO_SOT_SMD:SOT-23 | D1 |
| 1 | Battery_Cell | stm_rtc:BatteryHolder_Keystone_106_1x20mm | BT1 |
| 1 | STM32F031K6Ux | Package_DFN_QFN:QFN-32-1EP_5x5mm_P0.5mm_EP3.45x3.45mm | U2 |
| 1 | program_connector | Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical | J1 |
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 mm

- 2 layers26.2 × 45.5 mm

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 mm

PSLab
fossasia/pslab-hardware
PSLab Hardware Design and Schematics https://pslab.io
199 parts1.7kApache-2.0 - 4 layers85 × 56 mm

- 4 layers100 × 54 mm

32Bit shift register
MaltWhiskey/Mega-Cube
16x16x16 PL9823 Cube with Teensy 4.0 and FlexIO driver
64 parts766 - 2 layers44.2 × 29.3 mm

- 2 layers78 × 60 mm

- 2 layers59.1 × 99.9 mm

Cheap FOCer 2 60mm
shamansystems/Cheap-FOCer-2
Low-Cost Motor Controller based on the VESC 6
193 parts407