That means that there is a DMA conflict, you are using another driver that uses the same DMA channel, please verify in mcuconf.h.
Giovanni
stm32f4 SDIO setup
Moderators: RoccoMarco, barthess
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
-
- Posts: 94
- Joined: Thu Apr 11, 2013 10:35 am
Re: stm32f4 SDIO setup
Yes it is using the same DMA stream as SPI1 TX = STM32_DMA_STREAM_ID(2, 3)
I have an lcd connceted to SPI1
I have an lcd connceted to SPI1
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: stm32f4 SDIO setup
Some peripherals can be relocated on other DMA channels, see the STM32 RM in the DMA section, you can change mcuconf.h in order to do that.
Giovanni
Giovanni
-
- Posts: 94
- Joined: Thu Apr 11, 2013 10:35 am
Re: stm32f4 SDIO setup
So I got the DMA working and now the code does not stop but i still can not connect to the card.
How can I see what the error is with sdcConnect??
Below is my test code and it is printing..
Card Inserted.
Connecting...
Failed.
How can I see what the error is with sdcConnect??
Below is my test code and it is printing..
Card Inserted.
Connecting...
Failed.
Code: Select all
sdcStart(&SDCD1, &sdccfg);
gdispClear(Black);
if (!blkIsInserted(&SDCD1)) {
line1 = "Card not inserted, aborting.";
fheight1 = gdispGetFontMetric(font1, fontHeight)+2;
gdispFillStringBox(0, 0, widthB, fheight1, line1, font1, White, Black, justifyCenter);
}else{
line1 = "Card inserted.";
gdispFillStringBox(0, 0, widthB, fheight1, line1, font1, White, Black, justifyCenter);
}
line1 = "Connecting...";
fheight1 = gdispGetFontMetric(font1, fontHeight)+2;
gdispFillStringBox(0, (fheight1*2), widthB, fheight1, line1, font1, White, Black, justifyCenter);
if (sdcConnect(&SDCD1)) {
line1 = "Failed.";
gdispFillStringBox(0, (fheight1*3), widthB, fheight1, line1, font1, White, Black, justifyCenter);
}else{
line1 = "Connected.";
gdispFillStringBox(0, (fheight1*3), widthB, fheight1, line1, font1, White, Black, justifyCenter);
}
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: stm32f4 SDIO setup
The best way is to step into the sdcConnect() and see where it fails. Provide the point and the state of relevant variables in that section of code.
Giovanni
Giovanni
-
- Posts: 94
- Joined: Thu Apr 11, 2013 10:35 am
Re: stm32f4 SDIO setup
It looks like it fails just after card 2.0 detection and hits
return HAL_FAILED;
return HAL_FAILED;
-
- Posts: 94
- Joined: Thu Apr 11, 2013 10:35 am
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: stm32f4 SDIO setup
Definitely, it alredy happened to some users. You need short wires, terminations, bypass caps etc.
Giovanni
Giovanni
-
- Posts: 94
- Joined: Thu Apr 11, 2013 10:35 am
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: stm32f4 SDIO setup
That would be the very first command sent. I think it is a problem at interface level, the board setup probably, you need to make sure that:
1) The SDIO pins are not connected to other thing on the board.
2) That each SDIO pin is configured correctly in board.h.
3) That each SDIO signal is assigned to only one pin (multiple pins would conflict internally).
Giovanni
1) The SDIO pins are not connected to other thing on the board.
2) That each SDIO pin is configured correctly in board.h.
3) That each SDIO signal is assigned to only one pin (multiple pins would conflict internally).
Giovanni
Who is online
Users browsing this forum: No registered users and 34 guests