[grblHAL/STM32F4xx Issue#139] BTT_SKR_Pro v1.2 onboard sd_card

未分类 bolang 6个月前 (10-15) 42次浏览

Issue #139 | 状态: 已关闭 | 作者: Melkiyby | 创建时间: 2023-09-06


Hello. I’m trying to set up sd card support. I figured out the problems during compilation, but still an error 60 mounting the SD card.
I commented the exp2 part and uncommented it from the onboard

//#if SDCARD_ENABLE
// Connect to the EXP2 Header
//#define SDCSPORT GPIOB
//#define SDCSPIN 12
//#define SPIPORT 2 // GPIOB, SCKPIN = 13, MISOPIN = 14, MOSIPIN = 15
//#endif

//*
#if SDCARD_ENABLE
// On board socket- flaky?
#define SDCSPORT GPIOA
#define SDCSPIN 4
#define SPIPORT 11 // (MCU port 1) GPIOA: SCKPIN = 5, MISOPIN = 5, GBIOB: MOSIPIN = 5
// PB11 – TF_SW – card detect
#endif
//*/
`

Part of my platformio.ini
`

uncomment FatFS and sdcard below.

FatFs
sdcard
spindle
# USB serial support
Core
Class
App
Target
libextradirs =
.
FatFs
Middlewares/ST/STM32USBDevice_Library
USB_DEVICE

[env]
platform = ststm32
platform_packages = framework-stm32cubef4 @ ~1.26.2
framework = stm32cube

Do not produce .a files for lib deps (which would prevent them from overriding weak symbols)

lib_archive = no
libldfmode = off

[env:bttskrpro11]

Untested and might not boot. Please report issues at:

https://github.com/grblHAL/STM32F4xx/issues

board = genericSTM32F407VGT6
boardbuild.ldscript = STM32F407VGTXBL32K_FLASH.ld
buildflags = ${common.buildflags}
# See Inc/my_machine.h for options
-D BOARDBTTSKRPRO1_1=
# 8MHz crystal
-D HSE_VALUE=8000000
-D HAS_BOOTLOADER
-D TRINAMIC_ENABLE=2209
-D USBSERIALCDC=0
-D POLAR_ROBOT
-D SDCARD_ENABLE=1
-D _VOLUMES=1
libdeps = ${common.libdeps}
eeprom
trinamic
libextradirs = ${common.libextradirs}


评论 (5)

#1 – asulonn 于 2023-09-13

I had the same issue, with the same board (SKR PRO V1.1).
Unfortunately at the time i misplaced my issue under the core repo instead of here.
I did some testing, but at some point i got busy doing other stuff and i did not have the time to further investigate.
Meaby this info can help you and/or you can finish where i stopped:
#https://github.com/grblHAL/core/issues/244

My plan was to one day pick this back up and go further with testing…


#2 – terjeio 于 2023-09-13

There is a typo in spi.c5 should be GPIOPIN5.


#3 – konikminavto 于 2025-10-08

Hi. I checked. Now the onboard card works, but there’s no “OK” response when I type $FM.
Previously, I used the card through a display with a card reader, and it was very difficult to initialize the card; I had to reboot the board 15-20 times.


#4 – terjeio 于 2025-10-08

@konikminavto There is this comment in the board map: // On board socket- flaky? I do not have a board to test with so cannot dig into this further. What I know is that the SD card code is working with other STM32F4xxx boards so I suspect a hardware issue.
BTW is your card <= 32Gb?. 32Gb is the max supported size.


#5 – konikminavto 于 2025-10-08

Yes. This is in response to that comment. I use 1GB cards. This issue can be closed.


原始Issue: https://github.com/grblHAL/STM32F4xx/issues/139

喜欢 (0)