G120 on Custom Board


Quick share of my current project. G120 module on Custom Board.

LCD + Touch
Micro SD
PWMs to control 4 H-Bridges
2 x 8:1 analog mux for 16 analog samples
USB host
USB device
Class-D amp for audio notifications + I2C digital potentiometer (for volume control)
Digital I/Os

Hope all will go as smooth as possible.


1 Like

Looks good. We look forward to seeing the actual board.

Good luck! What software are you using?

Got my G120 custom board from the assembly house earlier today.
Will start bring up tomorrow. All I checked till now is that the 5V and the 3.3V power supplies power up (…ramping up very slowly the current limited bench power supply).

The custom LCD & touch screen will probably be one of the bigger challenges.



It should go well I hope. What is this board used for?

I am curious too!

Well, things didn’t start so good… only one of the three prototypes works as expected.

I have a DIP switch connected to LDR0 and LDR1. The DIP switch can pull each LDR pin to ground. I also added strong external pull ups to LDR0 and LDR1 (1kOhm). On initial power up all boards would reply a ping with TinyCLR and I could read the FW version. I then moved to upgrade the FW. Pulled down LDR0 and LDR1, but would not get the virtual CON driver to load in the PC. If I release LDR0 and LDR1 from ground (now with internal pull-ups), The device still replies to pings.
The third board is totally dead after the update attempt. No USB communication at all.

Could my external pullups (1k) burn the MCU pins (3.3mA MAX) ?

One board works properly. Bringing LDR0 and LDR1 to ground loads the virtual COM driver. Releasing loads GHI debug driver and replies to pings.

Wise and encouraging words are most welcomed :-).


BTW - The G120 board is the main control board for a dental teeth whitening system.

@ andre.m

Thanks for your reply.
The external pullup resistors where supposed to be optional and not assembled, but I forgot to remove them from the BOM file - so they where assembled.

I did remove them and used the internal pullups with the same results.
All other pullups in the design exept I2c are 10k.


This has been one of the most frustrating days in a while…
Here is the short version.

I removed the G120 modules from the boards and wired a usb connector, power + ground + reset, LDR0 and LDR1 pins to a 3.3V power supply. 2 boards worked as expected with the LDR pins grounded and high. The third G120 was dead. I was able to upgrade the G120 to 4.2.10.

Using the same wires I connected the module to my PCB, and was able to upgrade the modules.

Next step was to re-solder the modules to the PCB. I started by soldering only the minimal pins needed for update - this also worked fine.

Then for about 2 hours I soldered pin by pin while checking to see if I can see both virtual com driver and the GHI debugging driver when switching my DIP switch. I was able to solder all the pins and still be able to load both drivers.
After 15 minutes I could not load the virtual com driver on a PCB that worked fine 15 minutes before. The GHI driver loads fine when the LDR pins are high.

I am not sure whats wrong with my board - but at least I can start SW development and show progress.

Is there any power sequence I should look for? timing between VCC rise and reset?
The weird thing is that it worked fine hooked up to a power supply with crocodiles with no decoupling at all and the reset line tied constantly to VCC (maybe I should remove the reset RC filter … )

Ir these any other specific pin I should look at that has a function during boot?


@ S.B.D. - LMODE (USB/COM1) P2_1 (pin 16 on module) might be of interest

@ S.B.D. - Just curious… what kind of tool did you use to remove the G120 from the PCB. Did you use hot air with custom nozzle?

@ RobvanSchelven,

Removing the module was a two person job with two hot air blowers. We first removed as much solder as possible with the copper thingy. We used minimal heat and airflow so other components will not move. If you have the option to use a heating plate from the bottom the job will be way easier - in my case it wasn’t possible. Took us about 2 minutes of heating till the module started floating on the melted solder - then we just picked it up with tweezers very slowly - remembering that the BGA CPU was also heated during this process.
You can also use kapton tape around the heated module to keep other components from moving. The G120 crystal moved a bit, but this was easy to repair.

The LMODE pin also goes to the DIP switch - toggling this pin didn’t help.

On the third prototype board, I’ll hook up all the module pins to the PCB with wires and continue debugging.


@ S.B.D. - Thanks for sharing… I guess you already know but LMODE must be HIGH in order to operate in ‘USB’ mode

@ RobvanSchelven,

Yes, LMODE is high.

Now our programmer told me that he does not want to use 4.2.10. and move back to 4.2.9.
In order to go back to 4.2.9, do I need to use the LDR pins (that are non responsive on my boards) or is the tinybooter version the same and this is not necessary?

I can ping the boards with 4.2.10 but can’t get them to load the COM driver.


@ S.B.D. - I am not sure and hard to check here since i don’t have 4.2.9

Are you using MFDeploy or the FezConfig tool V 0.1.3 to access the device

@ RobvanSchelven

I think I need to use MFdeploy in this case since GHI’s G120 Config tool updates also the bootloaders and asks for LDR0 and LDR1 be low during power up.

This is a bit too much for a nut and bolts HW engineer :slight_smile:


After 12 hours of debug I have isolated the problem and can work around it. Now all boards can load load the virtual com driver according to my DIP switch state.

The problematic pin is module pin #59 (AD4/COM4_EOE/P1_3).

On my board it is wired to a unity gain op amp output used to buffer an analog sample.
Since the sensor (input to the op amp) is not connected at the moment the op amp input is floating at around 1.3V.
This means that during power up pin59 sees 1.3V.
I have another RC filter between the op amp output and pin 59. When I remove the series resistor I can load the COM driver - When it is assembled COM driver does not load.

@ GHI - Can you shed some light with this new information.


Things are getting back on track.

LCD works. The Raystar LCD didn’t even need a parameter tweek. I will load some images later to see if all other parameters are set correctly.

Sorry for the flash in the picture.

Touch screen will be next.


Well, today was another good day.
Raystar touch screen works fine after calibration, but the touch screen ZIF connector I choose doesn’t lock tight enough. Small piece of kapton tape did the trick.
The four TI H-Bridge drivers on the board also work turning the high torque motors both ways as expected
Photo-interrupters for valve control connected to analog ports also work.