This doesn't work in boot.py:
# Mount the WBUS-EMMC if it's there and set it up
mmc = pyb.MMCard()
if mmc.present():
import os
os.mount(mmc, '/mmc')
sys.path.append('/mmc')
pyb.usb_mode('VCP+MSC', msc=(mmc,))
The present() method returns False if the EMMC is present or not.
There does not appear to be a way to resolve this. the mmc.power(1) method never returns if it's not there. The mount() never returns if it's not there.
The info() method doesn't work ahead of mounting either.
This is a SF6W that I just received and it's working great otherwise.
I think this is a bug with the present() function. Any help would be greatly appreciated.
Scott
WBUS-EMMC how to tell if it's present
Re: WBUS-EMMC how to tell if it's present
Yeah, the `present()` function is only implemented for SDCard. (But both SD and MM share the same type -- it's hardcoded to return false for MM).
I did notice the MMC's nRST line is connected to SD_SW. So SD_SW will be floating when not present, and high when present. Unfortunately setting the internal STM32 pull-down is too strong, so you're stuck trying to measure a floating pin. In practise this actually worked quite well - I got consistent results, but don't rely on it!
I'll raise a bug for this, at least might be good to fix on a future version of the WBUS-EMMC.
I did notice the MMC's nRST line is connected to SD_SW. So SD_SW will be floating when not present, and high when present. Unfortunately setting the internal STM32 pull-down is too strong, so you're stuck trying to measure a floating pin. In practise this actually worked quite well - I got consistent results, but don't rely on it!
Code: Select all
>>> p = machine.Pin.board.SD_SW
>>> p.init(mode=machine.Pin.IN, pull=machine.Pin.PULL_NONE)
>>> p.value()
0
Re: WBUS-EMMC how to tell if it's present
Wouldn't the usual way be to just try mounting and evaluate except? EMMC is definitely not a hot-plug device.
Re: WBUS-EMMC how to tell if it's present
I have not fitted my WBUS-EMMC as yet but I am interested in this topic because I will start experimenting soon.
The WBUS-EMMC documentation states "This WBUS-EMMC replaces an SD-Card. It's not possible to use an SD card and the WBUS-EMMC together." so I figured that there must be something in the firmware that detects it and disables the SD card, but it sounds like that is NOT the case? Any comment from those who have used the EMMC board?
-
Onlinepythoncoder
- Posts: 3696
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: WBUS-EMMC how to tell if it's present
Apologies for asking a doubtless dumb question, but what is the benefit of an EMMC device over an SD card?
Peter Hinch
Re: WBUS-EMMC how to tell if it's present
Where to start.. 
Most important (for MCU applications) there is no need for flaky connectors.
But there are more:
- extended temperature range
- much more configuration options
- trade in space for reliability (SLC emulation)
- power efficiency
- space requirements
- better sourcing (who knows what' inside an SD card?)

Most important (for MCU applications) there is no need for flaky connectors.
But there are more:
- extended temperature range
- much more configuration options
- trade in space for reliability (SLC emulation)
- power efficiency
- space requirements
- better sourcing (who knows what' inside an SD card?)
-
Onlinepythoncoder
- Posts: 3696
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact: