STM32F103VET6-LinkSprite Spruce (STM32-V2)

Post Reply
NElecENG
Posts: 2
Joined: Sun Apr 17, 2022 8:56 pm

STM32F103VET6-LinkSprite Spruce (STM32-V2)

Post by NElecENG »

Hey All,

I'm new here sorry if I make any mistakes while posting.

I have this board and I'm struggling to get the on-board SD card to read/write, it uses the SDIO. I haven't found any examples using the Arduino IDE for SDIO only SPI.
https://web.archive.org/web/20210422032 ... tle=Spruce
(using the WayBack machine as their official website is down)

Here is how the SDIO is connected:
PC10-SDIO-D2
PC11-SDIO-D3
PD2-SDIO-CMD
PC12-SDIO-CK
PC8-SDIO-D0
PC9-SDIO-D1


I was able to get the Board LED_BUILTIN (PB5) and Button (PB15) to work with the Arduino IDE using Roger's Version of the STM32F1 Boards.
https://github.com/rogerclarkmelbourne/ ... _STM32.git
The ethernet port and RTC also only seem to be working with Roger's version, the new STM32duino doesn't have the same examples/pin layout for it to work. I will attempt to make a "new variant" to see if I can get this to properly work on the new STM32duino.


In case anyone need the schematic/gerber/bootloader for the whole board. All the files are in the link below.
https://github.com/soliddigi

As a side note I haven't been able to get any of the bootloaders to work so I'm currently using the Serial Interface to upload.
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: STM32F103VET6-LinkSprite Spruce (STM32-V2)

Post by fpiSTM »

With the new core the STM32SD (https://github.com/stm32duino/STM32SD)
will allow you to use SDIO.

Do not hesitate to redefine the PinMap_SD array at sketch to only kept the useful pins else all will be configured.

https://github.com/stm32duino/Arduino_C ... #L320-L334


So in your case:

Code: Select all

const PinMap PinMap_SD[] = {
//  {PB_8,  SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D4
//  {PB_9,  SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D5
//  {PC_6,  SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D6
//  {PC_7,  SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D7
  {PC_8,  SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D0
  {PC_9,  SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D1
  {PC_10, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D2
  {PC_11, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D3
  {PC_12, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, AFIO_NONE)}, // SDIO_CK
  {PD_2,  SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, AFIO_NONE)}, // SDIO_CMD
  {NC,    NP,   0}
};
NElecENG
Posts: 2
Joined: Sun Apr 17, 2022 8:56 pm

Re: STM32F103VET6-LinkSprite Spruce (STM32-V2)

Post by NElecENG »

Thank you for the input.

I went and downloaded the library used the proper board and commented the unused pins. However, after uploading I get nothing on the Serial Monitor, maybe the occasional random characters after a re-boot.

I'm trying to use the examples to get the CardInfo, etc. I'm sure the SD card works as I've tested it with my Arduino UNO and SD card shield without issues before attempting to use the STM32.
Post Reply

Return to “STM32F1 based boards”