BGS5 - I2C restarts | Telit Cinterion IoT Developer Community
December 18, 2017 - 10:48am, 4323 views
Hi,
We have been experimenting with getting I2C running between the BGS5 and an Arduino, however whenever we try to transmit a packet, the module immediately restarts -- the USB disconnects, and shortly after the ^SYSLOADING and ^SYSSTART URCs are received again.
The AT commands we are testing with are:
AT^SSPI= (Connect with default parameters)
CONNECT (Connected, OK so far)
<a3001> (Send example byte 0x01 to address 30)
(No response, module instantly reboots)
I've also tried the example in the AT Command Set reference document, that behaves in the same way.
Hardware wise, I've tried three different configurations:
- Leaving the I2CDAT and I2CCLK pins disconnected entirely.
- Connecting I2CDAT and I2CCLK to V180 with 2k pullup resistors (so sink current should be ~1mA, within the 4mA limit specified in the hardware document)
- Connecting I2CDAT and I2CCLK to a level shifter (still with the pullup to V180 on the low side), and the high side to a 5V Arduino running a sample I2C slave application, which just echoes the received I2C data to the screen.
In all instances the module restarts as soon as the test byte is sent.
Placing an oscilloscope on the I2CDAT and I2CCLK lines, both lines remain high at all *****. No attempt appears to be made to drive either line low when sending the frame.
I have a feeling it is a software / configuraton problem, as if the reboot was due to the slave not responding, or some other electrical issue, would it not be visible to see on the scope the module at least trying to send the address byte first before restarting?
Other possibly relevant info:
- Both ASC0 and ASC1 are in use (Serial/Interface/Allocation = 1) - is it possible to use I2C when both serial ports are used?
- No other userware is running (other than the JRC)
- Firmware version is 01.100 and A-Revision is 00.000.21
- V180 is also used to hold EMERG_RST high via another 2k2 pullup. I've had the scope on this pin also and it doesn't appear to drop.
- Tried with two separate modules with the same result.
- AT^SCFG? output:
^SCFG: "Call/ECC","0"
^SCFG: "GPRS/AutoAttach","enabled"
^SCFG: "Gpio/****/ASC1","std"
^SCFG: "Gpio/****/DAI","gpio"
^SCFG: "Gpio/****/DCD0","gpio"
^SCFG: "Gpio/****/DSR0","gpio"
^SCFG: "Gpio/****/DTR0","gpio"
^SCFG: "Gpio/****/FSR","gpio"
^SCFG: "Gpio/****/PULSE","gpio"
^SCFG: "Gpio/****/PWM","gpio"
^SCFG: "Gpio/****/RING0","std"
^SCFG: "Gpio/****/SPI","rsv"
^SCFG: "Gpio/****/SYNC","gpio"
^SCFG: "Ident/Manufacturer","Cinterion"
^SCFG: "Ident/Product","BGS5"
^SCFG: "MEShutdown/Fso","0"
^SCFG: "MEopMode/SoR","on"
^SCFG: "Radio/Band","15"
^SCFG: "Radio/OutputPowerReduction","4"
^SCFG: "Serial/Interface/Allocation","1","1"
^SCFG: "Serial/USB/DDD","0","0","0409","1E2D","0059","Cinterion Wireless Modules","Cinterion BGx USB Com Port",""
^SCFG: "Tcp/IRT","3"
^SCFG: "Tcp/MR","10"
^SCFG: "Tcp/OT","6000"
^SCFG: "Tcp/WithURCs","on"
^SCFG: "Trace/Syslog/Otap","0"
^SCFG: "URC/Ringline","local"
^SCFG: "URC/Ringline/ActiveTime","2"
^SCFG: "Userware/Autostart","1"
^SCFG: "Userware/Autostart/Delay","50"
^SCFG: "Userware/Passwd",
^SCFG: "Userware/Stdout","usb1",,,,"off"
^SCFG: "Userware/Watchdog","1"
Does anyone have an idea what would be causing the restarts in this case?
Thanks in advance,
David
Hello,
This should not happen and does not happen on my module with the same firmware. I2C lines are not shared with other interfaces so there should be no colision with serial interfaces. What hardware are you using is it a Gemalto terminal or some developer board or some proprietary hardware? What other lines are connected to arduino? Which interface is used fo i2c commands?
Please also check the JRC version with AT^SJAM=4.
Regards,
Bartłomiej
Hi,
The module is installed on a custom PCB - for an existing product which we are looking to extend the functionality of using I2C as it's the only remaining interface on the module which isn't used.
On the PCB, the I2C pins are brought out as test points which I have soldered a header on to. There is no other connections to the I2C on the PCB itself, so usually they are just left open circuit.
The headers are then connected to a breadboard with 2k pullups connected to V180, and then into the low voltage side of a logic level shifter (like this https://www.sparkfun.com/products/12009) in order to convert the 1.8v from the BGS5 to the 5v levels required by the Arduino. The other side then connects to the SDA and SCL pins on the Arduino which has it's own internal pullups for it's side of things. The reference voltages for the shifter is also attached to V180, and ground lines from each side are also connected to it.
However the module still restarts whether this extra hardware is attached or not, and there is no activity shown when attaching a scope to the data and clock lines, it appears to restart before attempting anything on the I2C bus.
Next, In order to try and rule out a hardware problem on the board (e.g. accidentally shorting the pads to ground when soldering) I did try the commands on another unmodified PCB - and this also restarts too in the same way with nothing connected.
The module and PCB otherwise works fine when running it's normal userware.
For the tests I sent the AT commands via USB0 - ASC0/1 are used to communicate to other devices on the PCB and USB1 is used for STDOUT, although the userware is currently uninstalled.
The JRC version as shown in SJAM^4 is 1.50.4.
Also, we ordered a BGS5T terminal yesterday from our supplier which should arrive later today. I will give that a try to see if that behaves any differently and let you know.
Hope that helps.
David
OK, please try with BGS5T.
Would it be possible to provide schematcis of your board? I could try to give it to my HW colleague to see.
Regards,
Bartłomiej
Hi,
Just to let you know we're still waiting for delivery of the BGS5T from our supplier, so I've not been able to try it yet.
I'll let you know as soon as it turns up, though it may be after Christmas now.
Thanks for your help so far
David
OK,
Merry Christmas,
Bartłomiej
Thanks, and Merry Christmas to you too.
I even got a present this morning - a BGS5T terminal!
Plugged it in and repeated the tests (with no external hardware connected), and the I2C appears to work as expected, no restart.
However it seems the terminal has older firmware compared to the module on our PCB:
A-Revision is 00.000.18 on the terminal vs. 00.000.21 on our PCB
And the JRC is 1.50.3 on the terminal vs. 1.50.4 on our PCB
How do I go about updating the terminal so that the versions match, so I can rule out any firmware differences for the issue?
If it's any help I've attached the logs of the AT commands I ran on each below for comparison (including ATI1, ^SJAM=4 and ^SCFG?).
Thanks again,
David
Hello,
I've sent you an email. Both firmware and JRC will be updated.
Regards,
Bartłomiej
Hi,
Thanks for that, although I've not received the email yet.
It may have been blocked (our email servers are quite strict) - is there any other way you can send it?
Regards
David
I've sent again directly from my company email account.
Previosly I've been sending from the forum.
Regards,
Bartłomiej