The goal of RP-42 is to develop an affordable calculator that can run Free42. The target cost for this was initially $20, but the final calculator costs slightly under $30.
The calculator uses a STM32L475 microcontroller connected to a 8MB QSPI Flash. The operating system is stored on the STM32's internal 256KB Flash, while the Free42 application code is stored on the external flash drive. The QSPI interface can be memory mapped on the STM32, so the application code can be executed on the flash drive without copying to the RAM.
07/06/2024 - Started designing PCB
07/29/2024 - Completed PCB 0.0.4, and ordered PCB through JLCPCB
08/04/2024 - Used Raspberry PI Zero 2W and ESP32-S3 to display Free42 on the LCD screen used in the calculator
08/05/2024 - Began assemblying and testing
08/11/2024 - STM32 communicates through micro USB port for the first time
08/11/2024 - Test code is executed on the microcontroller, which showed that all the buttons and the LCD were working correctly.
In the test shown above, whenever a key is pressed, the number corresponding to the key that was pressed was displayed on the screen. The image shows that all the buttons were read correctly by the microcontroller.
The jumper wire in the image above is used to connect the UART RX pin to either GND or 3V. In the original PCB design, the BOOT0 pin on the STM32 was directly connected to 3V, however this did
not work because BOOT0 must be low in order to execute user code, even if the USB DFU is used to execute code. To correct this issue, the trace connected to the BOOT0 was broken, and the trace connected to the UART RX pin was broken. Becaues the traces were very close to each other, some solder was used to bridge the gap between the UART port and the BOOT0 pin. This way, the UART RX connector could be
used to pull BOOT0 to low or high.
08/21/2024 - STM32 can read and write to Flash drive through QSPI interface.
08/21/2024 - Set up basic command line interface over USB VCP to make debugging easier, and created "frw" (flash read-write tool) to control flash.
In the test shown above, thas flash read-write tool was used to write "Hello world" to the flash and then read it back. The test shows that the hardware and software for the flash is working correctly
12/08/2024 - Run Free42 on the calculator
12/10/2024 - Complete 0.0.5 and order PCB with SWD port
- Add pad for battery terminal - temporary solution for 0.0.4: scrape off surface to access battery trace
- Add button for BOOT0 - temporary solution for 0.0.4: break current BOOT0 trace and connect it to backup RX trace. Then use RX connector to pull BOOT0 either high or low.
- Add button for RES - temporary solution for 0.0.4: disconnect power.
- Add debug port
- move buttons closer together
- connect VBAT to 3V rather than directly to battery. In its current state, if USB is connected and battery is not, then VBAT will be 0V, which is outside of recommended operating conditions.
- move components further away from battery so that battery does not hit them if pushed in too far
- add pull up resistor for external flash NCS pin so that it is pulled high while STM32 is booting.
- add pull up resistor for on button so that mcu can be powered off and button will still be able to trigger interrupt
Currently, the software is able to control all of the components on the calculator. Additionally, the software is capable of connecting as a virtual com port and supports a basic command line interface. The software is currently not ready to run Free42 yet.