Struggling to read an "in circuit" EMMC via Pi - has anyone succeeded with this? - Page 1
Forum section: electronics / projects

author: marcosscriven
author_rank: Contributor
timestamp: June 14, 2023, 05:46:01 pm
content: I have an IoT device that I'm trying to dump the EMCC of - I know that desoldering and putting in a reader is one option, but before I risk burning the chip, I'm trying to read it in-circuit.Things I've done to prepare:1. I've shorted the IoT device's crystal, and confirmed on an oscilloscope there's no comms with the EMCC2. Confident I've found DAT0, CMD, CLK3. Wired up DAT0, CMD, CLK to a RPI and setup as an SDIO devicehttps://ralimtek.com/posts/2016/2016-12-10-raspberry_pi_secondary_sd_card/#sdio-faster-but-only-1-sd-card4. Using this level shifterhttps://thepihut.com/products/pololu-logic-level-shifter-4-channel-bidirectional?variant=418363154761635. I've verified I'm seeing a 3.3V signal on the RPi side, and a 1.8V signal on the IoT device side.I think I'm at least successfully connected to the EMCC from RPI, because I see this over and over (whereas I think I'd see nothing if the wiring were completely wrong?):Code:[Wed Jun 14 18:35:23 2023] mmc-bcm2835 fe300000.mmc: card claims to support voltages below defined range[Wed Jun 14 18:35:23 2023] mmc1: error -84 whilst initialising SDIO card[Wed Jun 14 18:35:23 2023] mmc-bcm2835 fe300000.mmc: card claims to support voltages below defined range[Wed Jun 14 18:35:23 2023] mmc1: error -84 whilst initialising MMC card[Wed Jun 14 18:35:24 2023] mmc-bcm2835 fe300000.mmc: card claims to support voltages below defined rangeOccasionally I'll see a slightly different error code:Code:[Wed Jun 14 18:35:20 2023] mmc-bcm2835 fe300000.mmc: card claims to support voltages below defined range[Wed Jun 14 18:35:20 2023] mmc1: error -110 whilst initialising SDIO cardSo I think the RPI SDIO driver is at least communicating with the EMMC, but thinking maybe it doesn't like the level shifting?I'm not even sure the shifter I'm using is suitable - it claims to go up to 400kHz - and I've set the RPI to talk at 25KHz withCode:dtoverlay=sdio,sdio_overclock=25,poll_once=off,bus_width=1At this stage wondering if there's anything more to try than the desoldering option?If sounds a bit likeCode:card claims to support voltages below defined rangemeans the Pi is asking the eMMC to operate at 3.3V, as it's of course unaware of the level shifter. But I don't see any way to change that with the overlay.

author: Nominal Animal
author_rank: Super Contributor
timestamp: June 14, 2023, 07:40:08 pm
content: Quote from: marcosscriven on June 14, 2023, 05:46:01 pmI'm only a hobbyist, but all bidirectional shifters are a pain in the butt for unidirectional signals like SPI and UART, causing all sorts of trouble.I used to use 74LVC1T45, but now much preferTI TXU0304(TXU0m0n in general); see e.g.my board for SPI level shifting. Each pin is unidirectional (one direction only), but handles very high frequencies and various voltage levels (1.2V, 1.5V, 1.8V, 2.5V, 3.3V, 5.0V). These work well for me.(Neither LCSC, JLCPCB, or Mouser have the TSSOP-14 footprint one in stock right now, 2023-06-14, but it is the only one I personally am confortable soldering by hand. It would be simple to redraw the board for the UQFN-12 footprint (TXU0304RUTR) that is available at both Mouser, and at JLCPCB board assembly for populated and soldered boards, though. I don't think I'd like to try hand-soldering one, though, even though I do have a hot air SMD soldering station.)

author: marcosscriven
author_rank: Contributor
timestamp: June 14, 2023, 09:27:36 pm
content: Thanks for the suggestion - however, I don't think unidirectional would work for EMCC, as the DAT0 line is bidirectional. That's to say the same line is used for both writing and reading, depending on negotiation on the CMD line.Unless I'm misunderstanding what this does?

author: thm_w
author_rank: Super Contributor
timestamp: June 14, 2023, 11:34:09 pm
content: -110 error is timeout, so that can mean its not being detected at all-84 error is something about CID, could be promising as you sayhttps://community.nxp.com/t5/i-MX-Processors/mmc0-error-84-whilst-initialising-MMC-card/td-p/415180sdio_overclock=25 is not 25kHz its 25MHz. I don't know what the lowest you could go would be.https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README

author: Nominal Animal
author_rank: Super Contributor
timestamp: June 15, 2023, 12:29:01 am
content: TISCEA096 Application Note – SDIO Voltage Level Translationshould be useful here.IOW, TI recommends TXS02612, TXS0206, TXS0206-29, or SN74AVCA406 for the voltage level translation.The TXS series are bidirectional, whereas SN74AVCA406 uses direction pins (like e.g. SN74LVC1T45 I used to use).TXS02612 is cheap and available at Mouser, LCSC, and JLCPCB for assembly.A proper SDIO interface board would also have a selectable LDO, so that the I/O signaling level can be switched between 3.3V and 1.8V (vqmmc-supply node in the Device Tree, with a fixed regulator selectable via GPIO).The VDD for the SDIO is always 3.3, but it may be useful to be able to disconnect it for hardware reset of the SDIO device (eMMC).Other manufacturers like NXP have their own implementations as well.I would beverysurprised to see an SDIO device work reliably with generic bidirectional level shifters.

author: marcosscriven
author_rank: Contributor
timestamp: June 15, 2023, 08:31:05 am
content: Thanks @thm_w and @Nominal Animal for your repliesI hadn't realise the freq was in MHz - I definitely think my wires are took long for that.I think at this stage it will actually be easier to go the desoldering route and put it on a reader board.Now I just need to decide on solder paste vs solder balls...