Review : CZ mini STM32F103VE-EK (new version 2017)

Generic boards that are not Maple or Maple mini clones, and don't contain the additional USB reset hardware
victor_pv
Posts: 1599
Joined: Mon Apr 27, 2015 12:12 pm

Re: Review : CZ mini STM32F103VE-EK (new version 2017)

Post by victor_pv » Sat Sep 02, 2017 2:58 pm

stevestrong wrote:
Fri Sep 01, 2017 3:08 pm
poiuycat wrote:
Fri Sep 01, 2017 3:03 pm
That library is designed for F4 boards, not for F1.
I think Victor tried/wanted to port it to F1, I don't know how much he did.
I don't own any F1 board which has SDIO, so I cannot develop/test SDIO for F1.
I went over the code and RM checking the differences, but that was it so far. The base address for registers needs to be changed, all registers match. DMA functions need to the changed whereever they are used since the F1 DMA is difference (no FIFO, no streams...) Bulk of the code except for the DMA parts should work exactly as it is since the peripheral itself is identifical, even the same bugs... :lol:

poiuycat
Posts: 8
Joined: Tue Aug 22, 2017 4:53 pm

Re: Review : CZ mini STM32F103VE-EK (new version 2017)

Post by poiuycat » Sat Sep 02, 2017 3:02 pm

because of SDIO that I am run out of pin.
I have to free out PA13,Pa14,Pa15 from SWDIO.


RCC->APB2ENR |= AFIOEN;
AFIO->MAPR = SWJ_CFG(SWJ_CFG_SW) ;

:twisted:

poiuycat
Posts: 8
Joined: Tue Aug 22, 2017 4:53 pm

Re: Review : CZ mini STM32F103VE-EK (new version 2017)

Post by poiuycat » Sat Sep 02, 2017 3:05 pm

victor_pv wrote:
Sat Sep 02, 2017 2:58 pm
stevestrong wrote:
Fri Sep 01, 2017 3:08 pm
poiuycat wrote:
Fri Sep 01, 2017 3:03 pm
That library is designed for F4 boards, not for F1.
I think Victor tried/wanted to port it to F1, I don't know how much he did.
I don't own any F1 board which has SDIO, so I cannot develop/test SDIO for F1.
I went over the code and RM checking the differences, but that was it so far. The base address for registers needs to be changed, all registers match. DMA functions need to the changed whereever they are used since the F1 DMA is difference (no FIFO, no streams...) Bulk of the code except for the DMA parts should work exactly as it is since the peripheral itself is identifical, even the same bugs... :lol:
ya, I did try to do so, that F1 using individual register and F4 using array !!! :evil:

zmemw16
Posts: 1369
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: Review : CZ mini STM32F103VE-EK (new version 2017)

Post by zmemw16 » Sat Sep 02, 2017 3:16 pm

if i understand the various spi threads correctly; spi now has dma capability.
would it be possible to split the dma parts out as a new library or is it too tightly coupled or even as a guide on how to add it ?
stephen

User avatar
RogerClark
Posts: 6675
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Review : CZ mini STM32F103VE-EK (new version 2017)

Post by RogerClark » Sat Sep 02, 2017 9:59 pm

zmemw16 wrote:
Sat Sep 02, 2017 3:16 pm
if i understand the various spi threads correctly; spi now has dma capability.
SPI has DMA functions for well over a year.

victor_pv
Posts: 1599
Joined: Mon Apr 27, 2015 12:12 pm

Re: Review : CZ mini STM32F103VE-EK (new version 2017)

Post by victor_pv » Sat Sep 02, 2017 10:33 pm

Roger, I think he was asking whether the DMA code using in the SPI could be extracter to a library by itself.
To answer that, the DMA code was already a functional generic library by Leaflabs, we just used that library to add use DMA with the SPI.
I have also used the DMA library for the i2s driver, there is samples of code here being used for GPIO, and Steve has used it (the F4 version) in the SDIO code.
The SDIO code from Steven is written for the F4 DMA library, which is slightly different because the DMA peripheral is different. So to get the SDIO library working in the F1, one needs to do 3 things:
1.-In the header file, change the base address for the registers, since the SDIO peripheral is the same in the F1 but with a different base address.
2.-Anywhere where speed is calculated, take in account the different speed at which the MCU runs in the F1 (72 vs 168 normally).
3.-In the read and write functions, which use DMA, change the DMA functions to use the F1 dma library (not a big deal, since the are close, just not exactly the same)

I compared the SDIO peripherals page by page between the F1 and F4 and they are exactly identical, except for the base address, so I am 100% sure that's the only change regarding registers.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 3 guests