2025-11-25 5:50 AM - last edited on 2025-11-25 6:29 AM by Andrew Neil
Good morning.
I'm still trying to develop in STM code.
I have an open-source code developed for the STM32L476.
Questions:
If I generate a compiled HEX for the STM32L476, will it run on the 411?
Are they compatible?
Is it possible to migrate to an STMF303 or an STM32F411?
These are the ones I have to continue developing my studies.
I still don't have enough knowledge.
I've been trying to adapt it to the various available STM controllers.
Thank you.
Valter Matos
Solved! Go to Solution.
2025-11-25 11:58 AM
The F303CC and F411 are the boards we have for the school project, and we don't have many resources. We would have to acquire the H5, and that could take a while.
It's a somewhat complex project in STM programming, but with a focus on electronics. I'm still learning STM.
I've already tried others without success.
For this reason, I'm seeking help.
The source code is available at:
https://github.com/Dominik-Workshop/KD-23MTS
I started evaluating: main.h, spi.c, and gpio.c
If I manage to modify them, I will share them.
I will try.
Thank you, Valter Matos
2025-11-25 12:02 PM
Dear @ValterMatos ,
As I see you are conducting an embedded courses for students , I do not recommend also to do this porting which has no real return on investment due already existing boards which are not done for same purposes And not same applications. We can put you in contact with our office in Brazil and our FAEs will be pleased to assist you and why not to give you free boards for education. The only common part of these MCU is the Cortex-M4 core and may be many pins are quite at same position in a LQFP64 or LQFP100 , However architecture is completely different and using very different technology and flash / NVM from 180nm , 90nm one for Control drive , second for Efficiency and another for ULP operation .
Hope it helps you ,
STOne-32
2025-11-26 1:55 AM
@ValterMatos wrote:It's a somewhat complex project in STM programming
Indeed it is!
Therefore I'm still unclear of the learning benefits of doing this.
What, exactly, are the students intended to do with it?
What, exactly, are the students intended to learn from it?
The code is using HAL - so that should help porting.
2025-11-26 4:06 AM
This is a project whose main focus is electronics, building an oscilloscope that can serve as a simple study tool.
The "front-end" for signal processing is already ready. The chip programming is missing.
Programming in STM is part of the learning process.
I don't have much experience with STM.
I will try to port it to the F303 because that's what we have now.
The chip has two ADCs, the F411 only has one, and I believe that the F303 is the best for this case, even though it's obsolete.
As you can see from the code, the ADC, SPI, DMA, etc. handling is separate.
I have already started modifying the GPIO pins using CUBEMX to generate the code and transfer the C++ part and then compile. No errors. I hope.
Thank you for your attention.
Valter Matos
2025-11-26 5:29 AM
> This is a project whose main focus is electronics, building an oscilloscope that can serve as a simple study tool.
> The "front-end" for signal processing is already ready. The chip programming is missing.
Choosing a general-purpose MCU like a Cortex M4 for this purpose means relatively moderate specs / requirements.
> Programming in STM is part of the learning process.
> I don't have much experience with STM.
Not the best starting conditions, I would say.
A result with acceptable performance require some advanced understanding, hours of studying reference manuals & datasheets, and some experience.
> The chip has two ADCs, the F411 only has one, and I believe that the F303 is the best for this case, even though it's obsolete.
Is the F303 obsolete ? I think not.
You don't need two ADCs, just two or more channels of one ADC.
The small gain in sample frequency from using interleaved dual/triple mode ist most probably not worth the extra effort.
> As you can see from the code, the ADC, SPI, DMA, etc. handling is separate.
There is a bit more involved here.
For proper performance you need to link the ADC with DMA, to unload the core. And most probably link it to a timer as sample time base.
This requires some planning and reference manual consultation, especially if you need flexible sample rates and buffer sizes.
In addition, the F303 is quite limited in RAM and Flash size. And not all RAM is accessible by DMA.