Project Hardware Manual |
MXE11: run UNIX on a microcontroller
V1.71 (c) 2017-2018 Joerg Wolfram 1 Basic hardwareHint at the beginning: A 1: 1 replica instruction for all possible variants does not exist, because I usually take the components, which I have got or can 'recycle' from old projects or circuit boards. Only for the STM32F405 variant exists a relatively current layout.DThe layout is one-sided (with a few jumper wires) and includes the STM32F405RG, an AT45DB642 and an ATMega88 RTC. It is created with gEDA PCB and is located in the doc archive. I have not documented it at the moment, because usually other layout programs are preferred. 1.1 CircuitThe circuit diagram usually only shows the signal designations. As an external disk either an AT45DB642 Dataflash (Binary page mode) or an SD card can be used. The pin assignment on the controller is in both Same cases. TTY8 (/dev/tty8) and TTY0 (/dev/tty0) are currently provided as serial interfaces, whereby TTY8 is the primary console. The connections of the UPROG2 are specified as ISP interface. If an AT45DB642 should be used, I recommend instead of a reset button to set up a detent switch. This can be the used for deactivating the microcontroller during programming of flashes to not interfere with programming.1.2 SPC56EL60This is the original version that I built with a test board. The quartz frequency is 16MHz, the CPU frequency 120MHz. Currently only 1 core is used.1.3 STM32F103Trial version on a dedicated SMT32-duino compatible board, crystal frequency is 8MHz. The controller was brought to 120MHz via overclocking, this can be disabled in board.h by commenting #define F1_OVERCLOCKING out.1.4 STM32F107As a board I used the Olimex STM32-H107 board, quartz frequency is 8MHz. Overclocking did not work stable, therefore 72MHz clock frequency.1.5 STM32F411As board I used the STM32F411E Discovery Board, quartz frequency is 8MHz.1.6 STM32F405Board here is my designed board for the MXE11, quartz frequency is 16MHz.1.7 STM32L475Board is the same MXE11 board as with the STM32F405, only the signals for TTY0 must be parallel-wired, since they are located on PC4/PC5 instead of PC6/PC7. The crystal frequency is also 16MHz.2 The RTCAlthough some of the microcontrollers used have an integrated RTC (STM32), I have my own (external) solution that works with all controllers used and planned. Over a 2-wire interface are beside the seconds register (32 bit) 15 additional 32-bit battery-powered registers available for universal use.2.1 CircuitThe center of the circuit is in the current case an ATMega48/88/168/328, the exact type is secondary. The controller runs with internal RC oscillator, in addition, a 32758 Hz watch quartz is necessary. The communication with the host controller takes place via two lines (clock and data), whereby the clock line over an NPN transistor is inverted. The data line contents a decoupling resistor of 1KOhm to avoid signal conflicts during direction switching. The ATMega is powered by a 3V lithium button cell.2.2 ProtocollThe communication on the part of the host controller takes place via 2 freely selectable I/O pins and on the software side via my Unilib. The RTC controller is in sleep most of the time and is set up at regular intervals woken up via timer 2. Another interrupt source is INT0, which is connected via the external transistor to the Clock line is connected. The maximum clock frequency for the transmission is approx. 16KHz. Since that Reading the RTC only when starting the emulator plays the time required for the communication only a minor role.After this, 4 address bits and one R/W bit are sent clock-synchronously to the RTC. Depending on R/W bit then follow 32 bits of data either from the RTC to the host or from the host to the RTC. Then the communication is completed and the RTC goes back to sleep mode. In case of incomplete communication, the RTC stopps after approx 0.5 seconds with a timeout and goes back to sleep mode. By this way, short glitches are filtered out. 2.3 SoftwareThe software on the ATMega is written in assembler and uses both Timer 2 and Int0 as wake-up and Interrupt sources.The fuse settings fo an ATMega88 are:
3 ExpansionsAs a later extension a network function via CAN, 4 analog inputs, 4 analog outputs (via PWM) and 4 digital inputs / outputs each ar planned. For layouts the corresponding pins should be used already taken into account.It should make sense to realize the I/O as a daughter board, so the layout of the Basic board remains easier. The following tables contain only the intended pins, the concrete circuit theerfor (especially decoupling) is actual not yet defined. 3.1 SPC56EL60
3.2 STM32F103This device has no CAN.
3.3 STM32F107I used the Olimex STM32-H107 Board.
3.4 STM32F411I used the STM32F411E-Discovery Board, at this time (v1.71) the signals are not defined.3.5 STM32F405This device will get its own board (planned).
3.6 STM32L475No board and no pin specified.created with latex2web.pl v0.63 © 2006-2018 Joerg Wolfram |