STM SDMMCv2 clock div Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
tmentink
Posts: 6
Joined: Tue Jun 01, 2021 6:52 pm
Been thanked: 3 times

STM SDMMCv2 clock div  Topic is solved

Postby tmentink » Tue Jun 01, 2021 7:02 pm

Hi,

The current implementation of the STM SDMMCv2 has an bug with the clock divider

Code: Select all

void sdc_lld_start_clk(SDCDriver *sdcp) {

  /* Initial clock setting: 400kHz, 1bit mode.*/
  sdcp->sdmmc->CLKCR  = sdc_lld_clkdiv(sdcp, 4000000);
 


The 4000000 has one zero too many. Therefore the clock is not divided to 400Khz, but to 4Mhz.

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

Re: STM SDMMCv2 clock div

Postby Giovanni » Tue Jun 01, 2021 8:17 pm

Thanks for finding.

Giovanni

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

Re: STM SDMMCv2 clock div

Postby Giovanni » Sun Jun 13, 2021 1:40 pm

Fixed as bug #1160.

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 16 guests