I am working on a project to port the MMDVM (multimode digital voice modem) to generic STM32F1 and STM32F4 devices.
One of the objectives to rewrite the ADC and DAC code to use DMA. I have already test-code for that, but that uses the standaard ST peripheral libraries and ARM CMSIS libraries
*MMDVM (multimode digital voice modem) – https://groups.yahoo.com/neo/groups/mmdvm/info
Can somebody explain how to incorperate ST std-lib and arm cmsis code into a application using stm32duino as these libraries do not seams to be included in stm32duino?
And .. all the best for 2016 to everybody! ![]()
Cheerio! Kr. Bonne
<…>
Can somebody explain how to incorporate ST std-lib and arm cmsis code into a application using stm32duino as these libraries do not seams to be included in stm32duino?
The main F1 and F4 cores are not based on the Standard peripheral library.
(This is because the license on the STM code when the core was originally written in 2012 did not allow reditribution of the code)
There is a completely different core written by @sheepdoll which uses code generated by the STMCube i.e the HAL SPL, but its only at Alpha, and not being actively developed.
You could look at Koduino and also the MakerLabMe cores as I think they both use the CMSIS, but MakerLabMe is not being actively developed any more.
There is a completely different core written by @sheepdoll which uses code generated by the STMCube i.e the HAL SPL, but its only at Alpha, and not being actively developed.
mrburnette wrote:krbonne wrote:
<…>
Can somebody explain how to incorporate ST std-lib and arm cmsis code into a application using stm32duino as these libraries do not seams to be included in stm32duino?
<…>
In short, arduino / stm32duino looks like the most interesting option for us (continued support for arduino due, support for stm32f1 and stm32f4 and to support possible future hardware extensions), but I need more information on the possibility to implement DMA-based ADC/DAC operations.
Perhaps you can advice us if stm32duino would be well suited for the first option.
Cheerio! Kr. Bonne.
mrburnette wrote:
I am wondering how your team came to select the STM32Fxxx series as the successor to the AT91SAM3X8E on the Due? My first choice would have been to move to the Teensy3.1/3.2 This product, while 5x the price of the Maple Mini clone ($4) is still a tremendous bang for the buck – especially when you consider the amount of effort Paul Stoffregen has put into the libraries and into Arduino as a whole.
It is my opinion that you should revisit the hosting microcontroller.
Ray
Try Koduino, https://github.com/avikde/koduino, it uses the SPL.
If the main thing for you is DMA, then our core supports DMA, but it uses its own non portable functions ( originally developed by LeafLabs, but with some recent additions for DMA of SPI)
BTW.
Why do you need to use the F4, is it the single precision maths FPU? or the higher clock rates.
If you need higher performance in the F1 series, the GD32F103 is a compatible device which is faster, because it has zero wait state flash, and also can be clocked up to 108MHz within its spec and in my experience can be overclocked to 120MHz under normal room temperature ranges, with no ill effects at all.
In fact, .. no I do not need the SPL itself. I need the ADC+DAC with DMA. I just happen to have the code for that available, but I will look in the mapple libraries to see if this fits our requirements.
Exactly what functions do I need to look at?
Concerning the type of processors, this is a not a descision by me, but the idea is that, as these STM32F4 CPUs are available anyway, why not use them. Jonathan has written an implementation of a C4FM demodulation (the modulation sceme used by Yeasu fusion and DMR) that works quite good but is quite CPU-intensive. (I think it uses pattern-matching techniques). GMSK demodulation does work OK on a cortex M3.
I myself are also interested in STM32F1 based application for AFSK based
This is an open-source hardware project aimed for ham-radio, so not really high-volume. The price-difference for a STM32F1 and a STM32F4 is not that large.
It could be that code-optimalisation will lower the CPU-requirements to such a level that the code also runs on a STM32F1, but .. as said, … as these STM32F4s are there anyway, why not use them?
Cheerio! Kr. Bonne.
try these, origin
http://www.stm32duino.com/viewtopic.php … 8429#p8429
and the results
http://www.stm32duino.com/viewtopic.php … 8474#p8474
stephen
Is it positive or negative ? …
(I didn’t work with DMA on STM yet, especially that I’m F4xx guy)
It was replaced with the HAL, and those libraries are, I’ve found, more comprehensive and better documented. And managed by CubeMX.
But long time SPL users are understandably reluctant to change.
It was replaced with the STM32 type-agnostic HAL, and those libraries are, I’ve found, more comprehensive and better documented. And managed by CubeMX.
But long time SPL users are understandably reluctant to change.
Is it positive or negative ? …
(I didn’t work with DMA on STM yet, especially that I’m F4xx guy)
Is it positive or negative ? …
(I didn’t work with DMA on STM yet, especially that I’m F4xx guy)
In fact, .. no I do not need the SPL itself. I need the ADC+DAC with DMA. I just happen to have the code for that available, but I will look in the mapple libraries to see if this fits our requirements.
Exactly what functions do I need to look at
Cheerio! Kr. Bonne.
http://www.aliexpress.com/item/Chip-New … 60554.html
Hoping they genuine, I still waiting them from “slow-boat” …
If someone needs boards, maybe they can look at the STM32F4Stamp design from Frank Zhao, and tweak it to their needs.
In fact, .. no I do not need the SPL itself. I need the ADC+DAC with DMA. I just happen to have the code for that available, but I will look in the mapple libraries to see if this fits our requirements.
Exactly what functions do I need to look at
Cheerio! Kr. Bonne.
The code as it is today is only fast enough for two of the digital modes when running on a Due, even using the CMSIS libraries. Another one of the modes needs a lot more horsepower. Back of the envelope calculations suggest that the F405 with its higher speed clock and M4 core will be fast enough – barely.
There are at least 6 different hardware projects on the go to support MMDVM. Most are add-on boards to platforms including the Due and Teensy 3.x. There are a couple of the boards which will include the processor and the first prototypes are using the F405.
The current software is not using DMA, but is using a 24khz timer to trigger the ADC and DAC. I believe “analog/digtial loopback” code is working on the Due, Teensy and STM32Duino (F405). There’s also a version written for Koduino but that has a number of issues with the Koduino library and has been shelved for the time being.
I think there are two separate questions from the worker bees:
1) are there any pointers to get the ADC/DAC /w DMA working on the F405 under STM32Duino
2) are there any pointers to getting CMSIS working for the F405 under STM32Duino?
Thanks.
RogerClark wrote:If you have to use the standard peripheral library, using this core is a non starter for you, as it doesnt use the SPL.
Try Koduino, https://github.com/avikde/koduino, it uses the SPL.
If the main thing for you is DMA, then our core supports DMA, but it uses its own non portable functions ( originally developed by LeafLabs, but with some recent additions for DMA of SPI)
BTW.
Why do you need to use the F4, is it the single precision maths FPU? or the higher clock rates.
If you need higher performance in the F1 series, the GD32F103 is a compatible device which is faster, because it has zero wait state flash, and also can be clocked up to 108MHz within its spec and in my experience can be overclocked to 120MHz under normal room temperature ranges, with no ill effects at all.
1) are there any pointers to get the ADC/DAC /w DMA working on the F405 under STM32Duino
2) are there any pointers to getting CMSIS working for the F405 under STM32Duino?
1. Unfortunately DMA on the F4 is a lot different to the way it works on the F1. I don’t know if anyone has used DMA on the F4 with the current STM32Duino core. (I don’t think so)
2. As has been previously described. The STM32Duino code base was written a long time ago (2012) when the CMSIS was not open source, hence it does not use the CMSIS.
You could try adding the CMSIS files into the core folder and see what happens, but I think you would probably be wasting your time.
Did you look at Koduino ?? Or @SheepDoll’s HALMX cores ??
DMA option on most I/O devices, including ICU, SPI, UARTs, etc.
Different scenario than Arduino-alikes.
If you need to convert more than 2 channels on a F103, I have working code (can sample 4 channels at up to 500kHz per channel)
The longer version is that I ended up just extracting the one function I needed from the CMSIS source code and adding it directly into my project. Now I don’t have to worry about getting paths right for includes or libraries. I also pulled down the Dec 2015 version of CMSIS. At least for the function I’m using, the code has changed quite a bit.
<…>
Now I don’t have to worry about getting paths right for includes or libraries.



