[Ovmsdev] SDCard speed / max speed
Michael Geddes
frog at bunyip.wheelycreek.net
Mon Jul 29 11:03:44 HKT 2024
I was looking at adding the maximum host speed as well as the sdcard speed
to the SD Card information. My question is whether the 'max speed' is
apples-for-apples comparable with the card frequency or whether they are
not quite the same thing?
//.
if (verbosity > COMMAND_RESULT_MINIMAL)
{
writer->printf("\nCard type: %s\n", (card->ocr &
SD_OCR_SDHC_CAP)?"SDHC/SDXC":"SDSC");
- writer->printf("Max speed: %d kHz\n", card->csd.tr_speed/1000);
+ int maxspeed = card->csd.tr_speed/1000;
+ writer->printf("Max speed: %d kHz\n", maxspeed);
+ int maxfreq = MyPeripherals->m_sdcard->m_host.max_freq_khz;
+ if (maxspeed > maxfreq)
+ writer->printf("Max host speed: %d kHz\n", maxfreq);
writer->printf("Capacity: %llu MB\n", ((uint64_t) card->csd.capacity)
* card->csd.sector_size / (1024 * 1024));
writer->printf("CSD: ver=%d, sector_size=%d, capacity=%d
read_bl_len=%d\n",
card->csd.csd_ver,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20240729/b86d8f99/attachment.htm>
More information about the OvmsDev
mailing list