Battery grip pins / UART

Started by frantony, August 06, 2013, 11:13:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kitor

In case of R, UART is hidden under thumb rubber, next to Trash button (there's a hole to access connector). Pinout:

MPU RX IS WRONG. Scroll to post 38-43 on this thread for proper R/RP/... pinout.

1. 0V (not GND)
2. RXDICU (1v8)
3. TXDICU (1v8)
4. GND
5. RXDMPU (3v3)  #EDIT: WRONG! Unknown, (3v3)
6. TXDMPU (3v3)
7. ? (3v3)       #EDIT: WRONG! RXDMPU, (3v3)!
8. ? (3v3)




For upcoming RP I expect the same.
Note that R (and RP on mentioned photo) has 2nd similar connector next to this one. No communication was visible, something tells me this may be JTAG. However not accessible without disassembling camera.
Too many Canon cameras.
If you have a dead R or RP mainboard (e.g. after camera repair) and want to donate for experiments, I'll cover shipping costs.

a1ex

5D Mark III: it's available right under the rubber cover, see these pictures from iFixit, or this from fixyourcamera.org. It's the white connector on the bottom right, with 12 pins. You don't need to disassemble the camera to access it.

Probed the pins with a FTDI RS232 dongle, at 3.3V 115200 baud with the serial terminal from Arduino, and got the following:
- TXDICU: pin 4 from top (starting with 1); didn't check the voltage, but I'd expect it to run at 1.8V
- TXDFPU: pin 6 from top (prints <FPU terminal>)
- TXDMPU: pin 10 from top, or 3 from bottom (prints MON>>> and E1OFF)
- GND: didn't check; used the metal plate at the bottom; it might be pin 8 from top, from looking at the PCB.

Offtopic: my 5D3 was defective, so I was more or less forced to take it apart. It's now working again, but I have no idea what I did to fix it (other than disassembling and reassembling it a few times, and trying to run some diagnostic routines).

edit: discussion about this defect moved over here.

kitor

Quote from: kitor on February 15, 2019, 07:41:30 AM
For upcoming RP I expect the same.
Note that R (and RP on mentioned photo) has 2nd similar connector next to this one. No communication was visible, something tells me this may be JTAG. However not accessible without disassembling camera.

https://www.mirrorlessrumors.com/the-canon-eos-rp-disassembly-and-teardown/

After
QuoteA few more hide behind the button pad rubber which needs to peeled away, also like the EOS R.
Hole to UART connector is clearly visible. From board photos seems that only one of two connectors was left (lower one), unfortunately testpads positions suggests they may be hardly/not accessible through that hole, so proper FPC cable will be needed.
Too many Canon cameras.
If you have a dead R or RP mainboard (e.g. after camera repair) and want to donate for experiments, I'll cover shipping costs.

turtius

This UART connector is also available on the 200D(@kitor suggested)under the 'thumb resting rubber' which is very similar to the EOS R.



turtius

Okay so i took apart the 200D and the connector was visible. Using a arduino due and a needle i was able to get some logs from the UART.
(115200,8N1)

coon

I have taken a macro shot of EOS RPs connector, which looks very similar to R and 200D:



Pinout is unknown yet. However, I am working on a Flex PCB cable to break out the pins of the connector to 2.54mm pin headers. As soon as I have succeeded with that I will hook up a scope / logic analyzer and will post the pinout here. I expect it to be the same as on R.

Since we cannot find any information about this connector, jack001214 and me have done some assumptions about his 200Ds connector inner width. I have designed a potential cable with various pin pitches in KiCad and jack printed them out on paper in a 1:1 scale until one of them seemed to fit.

Currently we are assuming the following dimensions:
Inner width: 3.5mm
Pin pitch 0.4mm

I did a print of the final version as well. Connector of RP seems to be compatible mechanically:



The Flex PCB version of that cable is already in production at OSH Park and I assume it to arrive until 15th of October. I will then do a another macro shot to check if the cable does fit and if the pin pitch is correct. Meanwhile I am also working on a little ML dev kit circuit board where the other end of that cable can be connected to. It will provide 3 UARTs (ICU, MPU, FPU) and 1 JTAG port which can be accessed via USB then. ICU communication pins will have a proper level shift to 1.8V.

Cable in production does look like this:



The work in progress dev kit I am currently working on does look like this so far:



To be continued...
EOS RP

t3r4n

Hi,
as winter comes and the "stay home and safe thing" continues I might be interested in testing that hardware thingy.


coon

The cable has finally arrived this weekend:



Production quality is better than I have expected. The cable fits into the connector. Pitch of 0.4mm matches perfectly:



However, we were wrong about the width of 3.5mm. The cable needs to be a bit wider because it moves a bit and already lead to a tiny bend of the pins of my connector. Therefore I will produce another, little wider cable which should have a better fit.

After I've visually confirmed that the pin pitch is correct and I couldn't find any shorted pins with my multimeter I have powered the camera on and did some measurements by using a multimeter and a logic analyzer:




Pinout on RP is about the same as on R and 200D:


1: (Unknown traffic on boot) (1v8)
2: RXICU (1v8)
3: TXICU (1v8)
4: GND
5: Maybe RXMPU (3v3)
6: TXMPU (3v3)
7: Unknown (3v3)
8: Unknown (3v3)


There is some traffic on pin 1 when switching the camera on but I can't make any sense of it yet by just using a logic analyzer. I'll check that again as soon as I have a better flex pcb cable and access to an analog scope.
Update: I've checked pin 1 again with a 1Ghz scope and didn't observe any traffic here. Maybe it was just some glitching on the logic analyzer during boot. Logic just goes up to 3.3v and stays there as long as the camera is turned on.

Pins 3 and 6 have typical ICU and MPU traffic.

I have not checked pin 5 yet, but I assume it is the same as on R and 200D and therefore RXMPU.
Update: When sending something on Pin 5 there is not echo back of the input as on ICU. Even when just hitting enter or entering ? I get no response. Therefore I guarantee that this is TXMPU.

Pins 7 and 8 are unknown.

Ground is also available on hot shoe mount, tripod mount and strap mounts (when black color is scraped).
EOS RP

Mike Tornado

I think, the connector on board is JST 08FZC-SM1-GAN-TB

http://www.jst-mfg.com/product/detail_e.php?series=638

Pinout is same on all cameras with this connector, 5D4, 200D, R, RP, 250D, etc... now im working on 250D with 3.3 Levels, it's ok, no plain to die :)

Quality of your fpcs is pretty good, where you print it? and what about costs?
There is no knowledge that is not power

coon

I have printed it on Oshpark for $6.30. You get 3 pieces per order.
EOS RP

coon

Quote from: Mike Tornado on October 21, 2020, 03:14:24 PM
I think, the connector on board is JST 08FZC-SM1-GAN-TB

http://www.jst-mfg.com/product/detail_e.php?series=638

Nice! Measurements in that paper look reasonable also the connectors footprint. Paper says that inner width is 3.6mm. That's the same value I get when comparing connector width with pin pitch on the images. I think I will try 3.6mm in the next revision then.
EOS RP

coon

I have made another cable with a width of 3.65mm. This fits perfectly now and won't cause any mechanical damage to the connector anymore. Meanwhile I have designed a PCB as counter part for the cable:



It will have a quad FTDI which I will configure for 3xUART and 1xJTAG. I don't know where JTAG is yet or if it is available at all. But if we should find it we can use it that way.
I'll try to solder it this weekend.
EOS RP

coon

I have finally soldered it and it works pretty well so far:



Once connected via USB to a PC it announces four UART ports:
  - Port 1 is for JTAG (I don't know if and where JTAG pins on EOS RP are and if they work on 3.3V level. But if they do, I can use this with tools like OpenOCD for example.)
  - Port 2 is reserved for FPU and is not connected in this first revision
  - Port 3 is connected to cameras ICU RX/TX pins via 1.8V voltage level shifter ICs
  - Port 4 is directly connected to cameras 3.3V MPU RX/TX pins

dmesg output:



In practice connected to an EOS RP it looks like this...:



... and this (ICU on the top, MPU on the bottom):



However, it requires some advanced SMD soldering skills to get this assembled. Some PCB manufacturers like JLCPCB do offer a SMT assembly service, where all SMD parts can be ordered presoldered together with the board. That way one can just order the board plus the cable and can start right ahead without soldering at all. Therefore I am working on an upgraded version where this is possible.

I have also made a few mistakes in my DigiKey order so I have to fix the BOM in my github repo. Once this is done I will publish all schematics and gerber files of this.

Signal quality is good. I cannot observe any noticable noise, ringing or glitches:



Voltage for 1.8V ICU line is perfectly on 1.8V:



All in all I am very happy with the result.

May the UART adventures begin.  8)

EOS RP

Mike Tornado

Working on Tornado EOS and Tornado SCF big update, that add all new cameras. Sometimes shit happens, it's normal process, yesterday I broke EOS R6.
Uart, service firmware, not helped for me, so finaly i restore it with memory programmer. Found uart pinout, maybe, helped for somebody.

There is no knowledge that is not power

coon

Thanks for the findings. The connector meight be the same as on RP but as an angled version, so dev kit plus flex pcb meight also work on R6.
Are you sure with the pinout?

It should be:


1:
2: RXICU (1v8)
3: TXICU (1v8)
4: GND
5: Maybe RXMPU (3v3)
6: TXMPU (3v3)
7:
8:


But yours is:


1:
2: RXICU (?)
3: TXICU (?)
4: GND
5:
6: TXMPU (?)
7: RXMPU (?)
8:


Did you also note the voltage levels on each pin?
EOS RP

Mike Tornado

Quote from: coon on December 10, 2020, 08:08:14 PM
Thanks for the findings. The connector meight be the same as on RP but as an angled version, so dev kit plus flex pcb meight also work on R6.
Are you sure with the pinout?

It should be:


1:
2: RXICU (1v8)
3: TXICU (1v8)
4: GND
5: Maybe RXMPU (3v3)
6: TXMPU (3v3)
7:
8:


But yours is:


1:
2: RXICU (?)
3: TXICU (?)
4: GND
5:
6: TXMPU (?)
7: RXMPU (?)
8:


Did you also note the voltage levels on each pin?

No error here, i always check many times.

ICU - Tx -> PC - Rx
ICU - Rx <- PC - Tx

Same for MPU

ICU levels is 1.8V, but i use 3.3V levels bridge, so no problems.
MPU levels is 3.3V
There is no knowledge that is not power

coon

EOS RP

coon

So only our RXMPU pins differ. Mine meight be wrong.

how do you know that RXMPU is on pin 7? Do you get any response from MPU when sending something there?
EOS RP

coon

Turns out we were wrong about the pinout all the time. The pinout of Mike Tornado is the correct one.

I have already expected something like that so I have added the option to the dev kit for beeing able to remap all pins between cable and dev board side.
The dev kit was designed for RP in the first place so you can simply do a 1:1 connection by using jumpers usually. Due to the wrong assumption that pin 5 is RXMPU instead of pin 7, this doesn't work of course.
Therefore pin 7 of the cable needs to be mapped to pin 5 of the dev board like this:



And voila, I get an echo on UART. Typing HELP lists some commands on MPU:


MON>>>HELP

-----------------------------------------------
             Monitor Command List             
-----------------------------------------------
INDIINFO INDICLK INDIAVE ACCCAMPOS CYCLE
ADPTEST BATTCLOSE BATTCHECK BCINFO BATTLEVEL
BATTUSEERR BATTREPREQ BATTEXCLU BATTCHECKSPEC
GETRCP GETRC GETSC FGCOMM FGCOMME4 BATTINFO
VLDET CHGBATTLEVEL ABOUT VER FAABOUT FAVER HELP
UPBNY TRMOSC DEBUGLOG ICUREQ DISPPORTKEEP REGR
REGW MEMR MEMW EEPR EEPW EEPCLK ADCHECK
ADCHECK2 ADTIME ADMODE SCOUT UARTMODE UARTBRD
UARTSEND DNFCLK DNFON DNFOFF RTCON RTCOFF
RTCADJON RTCADJOFF TIMEOUT KWUPCNT I2C ICUTEST
MODE MPUSHUTDOWN MPUMUKO SHUTDOWNDEBUG USBCHG
BATSEL GRIPLED LENSPOWER E1ON E1OFF FACMD
TIMERCMD INFOCMD STACKINFO SW MDIALMODE
TEMPINFO TEMPCLK DRYCTEST SYSRESET DLOG DTASK
DUMP LED


We have shell access to MPU now. :)

I may fix the pinout in the next revision of the board. Now I need to get some sleep. More MPU related info on the R/RP thread soon.
EOS RP

kitor

I just updated my original post with pinout that it was wrong, pointing to proper one :)
Too many Canon cameras.
If you have a dead R or RP mainboard (e.g. after camera repair) and want to donate for experiments, I'll cover shipping costs.

kitor

Looks like I just got a complete pinout for 5D Mark III



News: By poking connectors on SD card board I noticed pattern between UART pins and one of ribbons going to main PCB.
I extrapolated that there's probably one more RX/TX line than Alex found. After a short discussion we checked - and it's EEKO core.

I got interactive shells on ICU, MPU, EEKO, no reaction for any inputs on FPU. Only prints <FPU terminal>, no echo.
Too many Canon cameras.
If you have a dead R or RP mainboard (e.g. after camera repair) and want to donate for experiments, I'll cover shipping costs.

Mike Tornado

Quote from: coon on December 13, 2020, 04:28:00 PM
So only our RXMPU pins differ. Mine meight be wrong.

how do you know that RXMPU is on pin 7? Do you get any response from MPU when sending something there?

Its easy, first i search the Tx pin using needle and looking for some readable output, when i fount it, i solder the Tx and seach for Rx with same scheme, but i send data and waiting answer.
There is no knowledge that is not power

g3gg0

@coon:

PCB looks like JLCPCB - graphics like altium designer. (or kicad?)
Or do you have it on EasyEDA also?

regards,
g3gg0
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

coon

I've used Kicad for cable and dev board. You can find the project and gerber files here:
https://github.com/coon42/magic-lantern-dev-kit

The latest commit does already contain a fix for the MPU TX pin, so a manual fix via jumper wire is not needed anymore.
EOS RP

kitor

Just to confirm, as I yesterday used MPU UART on R - it indeed has RXMPU on pin 7 (as expected).

Pin 5 is the mystery, as it originally got extrapolated by me based on testpads around the debug connector - those go to 2,3 and 5,6 - and there's no testpad for pin 7.
Too many Canon cameras.
If you have a dead R or RP mainboard (e.g. after camera repair) and want to donate for experiments, I'll cover shipping costs.