Main Site Documentation

G120 (Cobra II Net) lockup and reboot


#1

Hi, I having following problem, after a while mostly 1-2 days, my application reboots unexpected.

After checking my code and running some days with the debugger attached I didn’t find the problem. Even with the debugger attached the board reboots and the Studio/Debugger doesn’t get it.

I have also tried logging the GC(true) output, and there is plenty of free space.

My setup is as following: Cobra II NET with CP7 (attached to R/G/B and I on the Cobra II)
I use the SDK 2014 R1, G120 v4.2.11.2, Loader (TinyBooter) v4.2.11.1, no RLP

I use following Pins:


public const Cpu.Pin OnewirePin = Pin.P0_13;
public const Cpu.Pin RelaisCompressorPin = Pin.P4_29;
public const Cpu.Pin RelaisGroundwaterPumpPin = Pin.P0_3;
public const Cpu.Pin RelaisCirculationPumpPin = Pin.P4_28;
public const Cpu.Pin HighPressureSwitchPin = Pin.P0_26;
public const Cpu.Pin LowPressureSwitchPin = Pin.P0_2;
public const Cpu.Pin WaterFlowSwitchPin = Pin.P0_4;
public const Cpu.Pin FlowMeterPin = Pin.P0_5;
public const Cpu.Pin AlarmLedPin = Pin.P1_15;
public const Cpu.Pin TouchInterruptPin = Pin.P0_25;
public const Cpu.Pin BacklightPin = Pin.P1_19;
public const Cpu.Pin TouchControllerResetPin = Pin.P1_0;
public const Cpu.Pin SdCardDetectPin = Pin.P1_8;
public const Cpu.Pin NetworkChipSelectPin = Pin.P1_10;
public const Cpu.Pin NetworkInterruptPin = Pin.P2_11;
public const Cpu.Pin NetworkResetPin = Pin.P1_9;

So after a while I read the manual of the LPC 1788, special the section of the RSID (Reset Source Identification). I use following code:



I read the register on startup and I get 33 (decimal) after a unexpected reboot. So the POR and LOCKUP bit is set.

Knows somebody what can cause a LOCKUP of the LPC1788?

Best regards

#2

Maybe its my hardware settup, on

public const Cpu.Pin RelaisCompressorPin = Pin.P4_29;
public const Cpu.Pin RelaisGroundwaterPumpPin = Pin.P0_3;
public const Cpu.Pin RelaisCirculationPumpPin = Pin.P4_28;

these pins there is a relay connected, schematic: output_relay.png (second pic)

public const Cpu.Pin HighPressureSwitchPin = Pin.P0_26;
public const Cpu.Pin LowPressureSwitchPin = Pin.P0_2;
public const Cpu.Pin WaterFlowSwitchPin = Pin.P0_4;
public const Cpu.Pin FlowMeterPin = Pin.P0_5;

these pins are connected as in the schematic: input.png (first pic)

The flowmeter generates about 45 Interrupt per liter, so about 7.5 Interrupts per second
The others are only digital inputs.

Is there a diffrence between using


Microsoft.SPOT.Hardware.Utility.Backlight(true/false)

or assign the Pin P1_19 as OutputPort and Write true or false?


#3

Maybe your board/system has EMC problems. Switching noise/pulses comming from the relays/loads.


#4

That was my first thought and therefore I puted the optocouplers between the G120 and Relay’s, as you can see in the schematic.

Between the G120 and the optocoupler I use 3.3Vdc and between optocoupler and relay I use 24Vdc.

The Board gets directly power from a 5V power supply
http://at.mouser.com/ProductDetail/International-Power/IHA5-15-OVP/?qs=%2Fha2pyFadujXu2HLWdRIvA22s%2FSNYcxyVEiEJ7c4%2FWAPl9ijiKm5Rw%3D%3D

The ground from the 5v and 24v power supply is not connected. (galvanic isolated)


#5

I would suggest you write a small test program that let the relay’s going on an off in a rapid tempo and see if your board lock up or crash faster. Test with and without load (behind the relays)


#6

I will give it a try but in terms of speed I’am limited because on all three relay there are electric engines and they will take damage if I switch them on and off fast.

Futher to say the Board is about 7-5 meters away from the machine and bove power lines (5vdc and 24vdc) have shielded cables.


#7

Ok I tested the “fast” switching, but I got no usefull information, it doesn’t depend on the speed or what relay I switch, the lockup were absolutly random.

So I tried to exchange the Cobra II NET board with a G120HDR with sd-card and usb-client sp module. Powering is threw the 5V pins, I also added a 0.1µF capacity between 5V and gnd.

I also changed the pins to:


public const Cpu.Pin OnewirePin = Pin.P0_2;
public const Cpu.Pin RelaisCompressorPin = Pin.P3_24;
public const Cpu.Pin RelaisGroundwaterPumpPin = Pin.P3_25;
public const Cpu.Pin RelaisCirculationPumpPin = Pin.P3_26;
public const Cpu.Pin RelaisCirculationPump1Pin = Pin.P1_31;
public const Cpu.Pin HighPressureSwitchPin = Pin.P0_26;
public const Cpu.Pin LowPressureSwitchPin = Pin.P0_25;
public const Cpu.Pin WaterFlowSwitchPin = Pin.P0_24;
public const Cpu.Pin FlowMeterPin = Pin.P0_23;
public const Cpu.Pin AlarmLedPin = Pin.P1_5;
public const Cpu.Pin TouchInterruptPin = Pin.P0_13;
public const Cpu.Pin BacklightPin = Pin.P2_21;
public const Cpu.Pin TouchControllerResetPin = Pin.P1_30;
public const Cpu.Pin SdCardDetectPin = Pin.P2_11;

And I’am using the sd-card detect pin to evalute if the card is in and not the build in function.

With this settup it is working now for more than 3 days.


#8

How is progress with the G120HDR setup? Still running without lockup?


#9

Yes it runs perfect :slight_smile:

But till now I can’t clarify why its working with the G120 HDR and not with the cobra II


#10

Is the CP7 attached on the G120HDR setup? I’m assuming not. Not sure it will make a difference in your setup but I use a Cobra II (Eco) with a CP7 and other sensors connected but power the CP7 with a power extender module. I found I needed the power extender module.


#11

First I had tried the power extender, but since I power the hole board directly with 5Vdc it doesn’t change enything.

Yes the CP7 is attached to the G120HDR. This setup works because I power the board directly with 5Vdc.

The most power is required on the 5v rail, the 3.3V regulator on the usb-client sp module is powerfull enough.


#12

@ jp_miata - If you were powering the Cobra II with 5V then this is most likely the issue. The regulator setup we use with a barrel jack (USB Client DP, Cobra II) requires a minimum of 7V to operate. This is written right next to the connector.


#13

@ James

You miss understand me, I have connected my 5vdc power supply directly to the 5V Pin on the cobra II.

I do not use the barrel jack.

When I look at the schematics it shouldn’t be a problem, because there is a diode (D1). I also added a tantal capacity to get a more stable input.