Dear all,

If I connect the XDK (XDK is on) via USB to a Raspberry Pi (Pi is switched off) and boot the Pi afterwards, everything seems normal till I try to open the serial port to the XDK. Then the yellow, orange and red LED has continuous light and I can't get out of this mode again (connection to XDK is not possible).
What is the meaning of the continuous light of these three LEDs?

If I remove the internal battery connection of the XDK, before I connect the XDK to the Pi, the described problem will not caused.

Is there a solution for this problem?

Thanks and Regards
Frank
0 (0 Stimmen)
Error if XDK is connected to Raspberry Pi before Pi is booted
Antwort
02.10.15 09:21 als Antwort auf Frank Slomian.
Hi Frank,

before we go further on, could you please explain what Program you flashed onto your XDK?

- Florian
0 (0 Stimmen)
Error if XDK is connected to Raspberry Pi before Pi is booted
Antwort
02.10.15 09:42 als Antwort auf Florian Harr.
Hi Florian,

I flashed the XDKSensorMonitor_v3 onto my XDK.

Regards
Frank
 
0 (0 Stimmen)
Error if XDK is connected to Raspberry Pi before Pi is booted
Antwort
15.10.15 22:28 als Antwort auf Frank Slomian.
Hi Frank,

sorry it took me so long to reply. I did some research and tried to find out what causes your problem but couldn't get a conclusive answer yet. 

So far my felling tells me that your problem is cause as the serial opening causes an unknown error state with the bootloader that puts the XDK in an unknown state.

To better find out how we can get your problem fixed, could you describe in better detail how you use the XDK and how you connect the RPI + how you open the serial connection?!

Thanks,
Florian
0 (0 Stimmen)
Error if XDK is connected to Raspberry Pi before Pi is booted
Antwort
19.10.15 06:33 als Antwort auf Florian Harr.
Hi Florian,

I use the XDK with a USB connection to a Raspberry Pi 2. In some cases it could happen that the Pi reboots.
The XDK only sends acceleration data every 10 ms.
The serial connection will be open with a Python script:
try:
  port = serial.Serial(/dev/ttyACM0, 38400, timeout = 0)
except serial.SerialException as e:
  port = -1

The Python script will be started (after a reboot) in the /etc/rc.local with:
/bin/sleep 10
su pi -c "cd /home/pi/python_scripts/ && python get_XDK_data.py &"


Regards
Frank
0 (0 Stimmen)
Error if XDK is connected to Raspberry Pi before Pi is booted
Antwort
27.10.15 12:33 als Antwort auf Frank Slomian.

In some cases it could happen that the Pi reboots. 

That is interesting that you mention that. It didn't happen to me on my rpi, but all my request to ttyACM0 actually worked which remembered me about the following thing:
The RPIs usb power output is limited for several reasons by default which happens to let the rpi restart if you e.g. attach a power hungry usb hdd.

Could you try to add the following line to your /boot/config.txt ? i wouldn't wonder if that would solve your problem already.

max_usb_current=1

- Florian

0 (0 Stimmen)
Error if XDK is connected to Raspberry Pi before Pi is booted
Antwort
27.10.15 14:05 als Antwort auf Florian Harr.
Hi Florian,

In some cases it could happen that the Pi reboots.

in a power failure case, not regular.

I added

max_usb_current=1

in /boot/config.txt, but the Problem with the undefined state (yellow, orange, and red LED) after a reboot still occurs.

Regards
Frank

0 (0 Stimmen)
Error if XDK is connected to Raspberry Pi before Pi is booted
Antwort
11.11.15 12:55 als Antwort auf Frank Slomian.
Hi!


The meaning of the LEDs will be described in more detail in the upcoming XDK documentation - apologies for missing out on that in the past.

All three LEDs on in application mode means an assertion (call to DBG_assert) has happened. An assertion will likely mean, that an invalid USB state transfer has happened (potentially due to unspecified behaviour due to the rpi reboot). I suspect, that this issue can be fixed (or at least worked around) in the XDK Software.

To debug the assertion, you should use the debugger (that you have to purchase separately). With the debugger you will be able to tell, where the code is stuck and hence figure out what caused the exception. In case you do not possess such a debugger, the exact steps to reproduce the problem would help us a lot.

Bastian
 
0 (0 Stimmen)
Error if XDK is connected to Raspberry Pi before Pi is booted
Antwort
12.11.15 18:43 als Antwort auf Wolf-Bastian Pöttner.
Hey Frank,

can you check for me on your Raspberry PI if you have any software installed that automatically pulls/connects to attached USB devices?

I gave your configuration another run and I had serveral problems with Raspbian OS'es as they are preconfigured to pull and try to connect automatically to USB devices while I had no problem with ArchLinux that doesn't have such Software preinstalled.

Anyway, if you look into the debugger, you'll get more detailed info as Bastian mentioned.

- Florian
0 (0 Stimmen)
Error if XDK is connected to Raspberry Pi before Pi is booted
Antwort
23.11.15 11:36 als Antwort auf Florian Harr.
Hey Florian,

how can I check if any software automatically pulls/connects to USB device?
I installed Raspbian Wheezy and did not make any adaption for USB devices.

I tried the XDK without batterie connection and this works fine.
Also I tried a CISS sensor and the problem did not appear.

Thanks for the hint with the debugger!

Regards,
Frank
0 (0 Stimmen)
Error if XDK is connected to Raspberry Pi before Pi is booted
Antwort
27.11.15 12:34 als Antwort auf Frank Slomian.
Frank,

by default Raspbian comes with a set of default udev rules. You can find them under 

/etc/udev/rules.d

Are you might be able to switch to a different Linux distro for your Raspberry PI? Like Arch Linux? 

I couldn't replicate your problem when using Arch Linux.

I'll post some logs from my debugger later.

- Florian

0 (0 Stimmen)