Cannot get MMC to work under stm32f107

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess

mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Location: Karlsruhe, Germany
Been thanked: 1 time
Contact:

Cannot get MMC to work under stm32f107

Postby mabl » Wed Sep 21, 2011 7:42 pm

Hello,

today I tried to upgrade my Chibios Code from revision 3223 to trunk (3313). Everything works great - except the mmc_spi interface to my sd card. It's still the same user code, and the hal interface has not changed between those revisions - so it ought to work, right?

The execution of the Thread hangs indefinitely (other Threads continue to work). in spiIgnore after _spi_wait_s(spip) is called. I suppose the spi transfer interrrupt get's not called again, and therfore the thread is not unsuspended.

Any idea what could be causing this?
Last edited by mabl on Wed Sep 21, 2011 7:53 pm, edited 1 time in total.

User avatar
Giovanni
Site Admin
Posts: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Cannot get MMC to work under stm32f107

Postby Giovanni » Wed Sep 21, 2011 7:52 pm

Most driver were updated in latest revisions but MMC_SPI is exactly the same, if there is something in the HAL then it must be the SPI driver. Which SPI port are you using?

Giovanni

mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Location: Karlsruhe, Germany
Been thanked: 1 time
Contact:

Re: Cannot get MMC to work under stm32f107

Postby mabl » Wed Sep 21, 2011 7:54 pm

It's the Olimex Board, so it's SPID3.

User avatar
Giovanni
Site Admin
Posts: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Cannot get MMC to work under stm32f107

Postby Giovanni » Wed Sep 21, 2011 8:04 pm

Made some SVN digging, I corrected a defect in the new DMA helper driver in revision 3328, the defect affected DMA2 so SPID3 was affected too. Do you mind updating to the latest revision and give it a try?

Giovanni

mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Location: Karlsruhe, Germany
Been thanked: 1 time
Contact:

Re: Cannot get MMC to work under stm32f107

Postby mabl » Wed Sep 21, 2011 8:17 pm

Hi Giovanni,

the problem is still there (as of rev 3378). I also just made a quick and dirty adaption of the f103-fatfs demo to my Olimex board - it shows exactly the same behavior.

Update: Added the Olimex STM32P107 demo
Attachments
ARMCM3-STM32F107-FATFS-qickndirty.tar.gz
(10.02 KiB) Downloaded 243 times

User avatar
Giovanni
Site Admin
Posts: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Cannot get MMC to work under stm32f107

Postby Giovanni » Wed Sep 21, 2011 8:25 pm

OK, found the problem, it was caused by the integration of the new DMA infrastructure in the SPI driver and incidentally affected SPID3. Try the latest revision.

Edit: re-updated, rev 3380.

Giovanni

mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Location: Karlsruhe, Germany
Been thanked: 1 time
Contact:

Re: Cannot get MMC to work under stm32f107

Postby mabl » Wed Sep 21, 2011 8:31 pm

Great! It works now. Thank you so much for the fast support!

User avatar
Giovanni
Site Admin
Posts: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Cannot get MMC to work under stm32f107

Postby Giovanni » Wed Sep 21, 2011 8:33 pm

Good, note that I updated the file again, there were two instances.

Giovanni

mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Location: Karlsruhe, Germany
Been thanked: 1 time
Contact:

Re: Cannot get MMC to work under stm32f107

Postby mabl » Wed Sep 21, 2011 8:34 pm

Thx for the hint.


Return to “General Support”

Who is online

Users browsing this forum: No registered users and 47 guests