jeudi 5 juin 2025

STM32 processors, in fact...

I mentioned in a previous post that I wasn't about to use the STM32 family of processors again. I had been testing with an STM32H5xx processor, using the STM32CubeIDE development software and its 'friend', STM32CubeMX, since for the first time in a long time, the software suite was working for me.

It's true that the new STM32H5xx processor family is interesting for several reasons. On the one hand, these processors are fast, they can operate at up to 250 MHz and, above all, some models offer 512 KB of flash memory and more than 272 KB of SRAM memory.

I then thought that this could allow me to develop a new version of the MSX cartridge that could be loaded via the USB port.

In my previous cartridge version, I used the principle of external mass storage. To simplify, the MSX cartridge behaves like a USB flash drive. Subsequently, the file recovered on a FAT12 file system type media, was recovered and copied in RAW format to the cartridge second processor.

This is what the cartridge looked like:


In fact the right processor retrieved the file through the USB port connected directly to a PC. Then sent the retrieved file directly in RAW format to the second processor which 'provided' the data directly to the MSX computer.

This system wasn't easy to develop for a number of reasons. Most importantly, file transfer from a PC is unreliable. Not because the data could be corrupted, but simply because it's completely impossible to know if the entire file has been transferred!

And that's not practical at all!!!

Additionally, the processors used were a bit more modest in terms of Flash and SRAM resources.

So, I wondered if it would not be relevant to try the adventure again on one of these STM32H5xx processors.

However, I had two 'problems' to resolve. The first is that I no longer have to use file transfer in the file system sense, but rather a transfer in the sense of direct byte transmission. So I chose to use a serial file transfer using the YMODEM transfer protocol.

The Ymodem protocol allows you to receive the name and size of the file, which can be interesting, but above all the transfer is done in specific blocks with possible CRC correction, which suits me very well.

The second problem for me is not having to use what seems to be something downright overly complicated on the system provided by STmicro (see my previous post) : the USB function of the STM32 processor. So, I decided to go straight for a small external USB/serial converter circuit.

This last point will also allow me to set up good galvanic isolation between the PC and the MSX computer.

In short, this change of direction should allow me to make the operation of my MSX cartridge more reliable. Because although I have never had any operational problems with my own MSX computer, it has happened that it did not work correctly on other MSX, without me being able to determine the reason for these malfunctions.

Here is what the first prototype of this new study looks like, based not on a RISC-V processor but on an ARM processor from the STM32H5xx family :


To summarize, this new version offers a faster processor, a more secure and controllable file transfer system, and better galvanic isolation.

I have already carried out some preliminary tests on a study board, namely transmission with Ymodem and programming of the internal flash of the processor.

Additionally, I should be able to install a more convenient status indicator system than the two original LEDs.

This new cartridge should also allow me to automatically reboot the MSX computer without using an external system. It should also be able to integrate different mappers for a total of 256KB of memory. Finally, my system should also be able to be updated using the same file transfer mechanism. I have already successfully performed code relocation tests on this new processor.

Transfer times should remain fairly short, given that I chose a speed of around 230Kbauds, which did not cause me any transfer problems during my tests. A full cartridge should therefore be able to be transferred in around ten seconds, plus the writing time in FLASH, which will also remain very low.

And so, I now think of using this processor in my study on the construction of the Drumulator type drum machine...

A few days later...

The request for a prototype PCB has been made. I'll then be able to work directly on a properly assembled circuit. This will already save me a lot of unpleasant surprises, especially those caused by assembling the processor by hand...