[Solved] Zero sensor values

Hi all,

MATRIX Creator running on a RPi 3. I am seeing the following behavior:

  • Everloop works fine,
  • Microphone array seems to work fine,
  • IMU, pressure, temperature, and other sensors report constant value of 0

I get the zero values both via MALOS and via the demo applications in matrix-creator-hal. The latter was built from the latest version on git.

Anyone have any idea about the cause and how to resolve?

Thanks!

Sorry for the self-reply: Let me document what worked for me, in case anyone else has the same issue.

Following the discussion at https://github.com/matrix-io/matrix-creator-malos/issues/8, I re-ran the script that programs the MCU:

 sudo /usr/share/admobilize/matrix-creator/sam3-program.bash

That seems to have done the trick.

2 Likes

Hi,

I’m trying to do the same here but it didn’t worked for me :frowning: . Anyone have any idea about the cause and how to resolve?

Thanks in advance!


pi@raspberrypi:$ sudo /usr/share/admobilize/matrix-creator/sam3-program.bash
**** Could not program SAM3 MCU, you must be check the logfile /tmp/sam3-program.log


cat /tmp/sam3-program.log
Open On-Chip Debugger 0.10.0-dev-00286-g83b68a2-dirty (2016-08-30-15:18)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
BCM2835 GPIO config: tck = 17, tms = 4, tdi = 22, tdo = 27
BCM2835 GPIO config: trst = 18
trst_only separate trst_push_pull
adapter speed: 512 kHz
Warn : em357.bs: nonstandard IR value
Warn : Specify TAP ‘sam3n.cpu.cpu’ by name, not number 3
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : JTAG only mode enabled (specify swclk and swdio gpio to add SWD mode)
Info : clock speed 512 kHz
Info : JTAG tap: em357.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: em357.bs tap/device found: 0x069aa62b (mfg: 0x315 (Ember Corporation), part: 0x69aa, ver: 0x0)
Info : JTAG tap: xc6sxl4.fpga.fpga tap/device found: 0x24000093 (mfg: 0x049 (Xilinx), part: 0x4000, ver: 0x2)
Info : JTAG tap: sam3n.cpu.cpu tap/device found: 0x4b800477 (mfg: 0x23b (ARM Ltd.), part: 0xb800, ver: 0x4)
Warn : JTAG tap: sam3n.cpu.cpu UNEXPECTED: 0x4b800477 (mfg: 0x23b (ARM Ltd.), part: 0xb800, ver: 0x4)
Error: JTAG tap: sam3n.cpu.cpu expected 1 of 1: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Error: Trying to use configured scan chain anyway…
Error: xc6sxl4.fpga.fpga: IR capture error; saw 0x35 not 0x11
Warn : Bypassing JTAG setup events due to errors
Info : sam3n.cpu: hardware has 6 breakpoints, 4 watchpoints
Error: Invalid ACK (0) in DAP response

Hi @Per,

Normally when something like this happen you just have to try again and it should work. Not just only reboot , power off everything and start again. It seems that you are doing everything right.

Please write us if you can’t make this work … and if it work too !!

Yoel

Thanks @ Yoel

Still no success.I did the following things:
completely removed the matrix creator from my RPi and again put it on my RPi (of course I shutted it down before).
I have tried to run the creator-init.bash too:

sudo /usr/share/admobilize/matrix-creator/creator-init.bash
XC3SPROG © 2004-2011 xc3sprog project $Rev: 774 $ OS: Linux
Free software: If you contribute nothing, expect nothing!
Feedback on success/failure/enhancement requests:
http://sourceforge.net/mail/?group_id=170565
Check Sourceforge for updates:
http://sourceforge.net/projects/xc3sprog/develop

DNA is 0xf9a66e90dc6a85fc
**** FPGA programmed!
./radio-init.bash: line 3: echo: write error: Device or resource busy
./radio-init.bash: line 10: echo: write error: Device or resource busy
./radio-init.bash: line 17: echo: write error: Device or resource busy
**** Could not program SAM3 MCU, you must be check the logfile /tmp/sam3-program.log


pi@raspberrypi:~ $ malos


MALOS starting


You can query specific driver info using port 20012.
Registered driver IMU with port 20013.
Registered driver Humidity with port 20017.
Registered driver Everloop with port 20021.
Registered driver Pressure with port 20025.
Registered driver UV with port 20029.
Registered driver ZigbeeBulb with port 20033.
Registered driver MicArray_Alsa with port 20037.
Registered driver Lirc with port 20041.
New delay between updates for Humidity is 1000 ms.
New timeout after last ping for Humidity 6000 ms.

Regards Per

I might have same problem as Per. I am currently using SSH to use the Rasbian command line from my computer, but I do not think that is causing this.

I read the log file it mentions:
Open On-Chip Debugger 0.10.0-dev-00286-g83b68a2-dirty (2016-08-30-15:18)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
BCM2835 GPIO config: tck = 17, tms = 4, tdi = 22, tdo = 27
BCM2835 GPIO config: trst = 18
trst_only separate trst_push_pull
adapter speed: 512 kHz
Warn : em357.bs: nonstandard IR value
Warn : Specify TAP ‘sam3n.cpu.cpu’ by name, not number 3
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : JTAG only mode enabled (specify swclk and swdio gpio to add SWD mode)
Info : clock speed 512 kHz
Info : JTAG tap: em357.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.),$
Info : JTAG tap: em357.bs tap/device found: 0x069aa62b (mfg: 0x315 (Ember Corpo$
Info : JTAG tap: xc6sxl4.fpga.fpga tap/device found: 0x24000093 (mfg: 0x049 (Xi$
Info : JTAG tap: sam3n.cpu.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Lt$
Error: xc6sxl4.fpga.fpga: IR capture error; saw 0x35 not 0x11
Warn : Bypassing JTAG setup events due to errors
Info : sam3n.cpu: hardware has 6 breakpoints, 4 watchpoints
Error: Invalid ACK (6) in DAP response
Error: JTAG failure -107
sam3n.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x21000000 pc: 0x00403ac2 psp: 0x200015e0
Error: Invalid ACK (6) in DAP response
Error: Failed to read memory at 0x400e0474
Error: Cannot read SAM3 register: PMC_FSMR @ 0x400e0470, Err: -107

Not sure if any of that helps. I will try resetting, updating, cut the power, and so on and get back when I got more information.

Rebooting did not change much, will try to update, then upgrade, reboot, try the bash again, then maybe full-upgrade, then reboot then try again.

But things that might be worth mentioning. First I tried the Alexa voice demo, then I tried a few other demos. Like a demo to try out IR, making it possible to see when it received an IR signal. I have also tried the arc_demo and everloop demo and they work fine. I did it because of the e-mail about how some power supplies might be faulty, but it seems my PSU is fine in this case. But the compass demo, sensors demo, servo demo all seem to get no values at all. They run fine, just seemingly no input.

When I try to update I usually get this error, which might not be a problem, but here it is

Err http://packages.matrix.one ./ Packages
  404  Not Found [IP: 172.217.22.48 80]
Ign http://packages.matrix.one ./ Translation-en_GB
Ign http://packages.matrix.one ./ Translation-en
100% [Working]                                                       124 kB/s 0sW: Failed to fetch http://packages.matrix.one/matrix-creator-/./Packages: 404  Not Found [IP: 172.217.22.48 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
E: Couldn't rebuild package cache

So it seems to have a problem getting two packages, and it also does not seem to upgrade

I also tried with the sensors_demo, and it was the same. Since it stopped being all zeros after powering off, I figured it would be an idea to try power cycle it again then check the values, and they do change after a power cycle. So I tried rebooting, and the values also change after rebooting. Breaking the demo and then running the sensor demo again does not change the values.

I have been reading different topics in this troubleshooting topic, and one suggestion that was made was to power off the Pi completely and take apart the Pi and the Matrix. So I tried that, and now the sensors are not showing zeroes all over, but they still seem fixed.

The compass example, I suspect the LED lights should be moving when you move the Matrix around, but they are static, and keep blinking in the same LEDs, with the same colors, or just the same blue or red light.

Okay, now I finally got it working. I had forgotten about the command:
sudo /usr/share/admobilize/matrix-creator/sam3-program.bash

After having gotten it to do readings, this command worked. So after it had programming the FPGA I rebooted just to be safe, then ran the sensors demo. It now showed zeros again. I tried rebooting again, still zeros. I tried the bash command again, but it just said it was already programmed. So I took the power from the Pi, took off the Matrix again, reconnected it again and connected the power again.

Now the readings are finally updating :slight_smile:

So, to try and sum up the other stuff I did, I ran a git pull in every folder. I guess the most important ones would be matrix-os and matrix-creator- hal. Then I ran:
sudo apt-get update
and
sudo apt-get upgrade
Then did a cmake and make in the matrix-creator-hal/build folder. Then bash again:
sudo /usr/share/admobilize/matrix-creator/sam3-program.bash
Then pulled power from the Pi, took off the Matrix. Waited 5-10 seconds as is usually a good idea when making sure a device has lost all power, put the Matrix back in the Pi, powered on and ran
./matrix-creator-hal/build/demos/sensors_demo
and the readings are updating. Hope this will help others save some time.

I have tried every remedy in this thread multiple times, and sam3-program.bash still fails:

Open On-Chip Debugger 0.10.0-dev-00286-g83b68a2-dirty (2016-08-30-15:18)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
BCM2835 GPIO config: tck = 17, tms = 4, tdi = 22, tdo = 27
BCM2835 GPIO config: trst = 18
trst_only separate trst_push_pull
adapter speed: 512 kHz
Warn : em357.bs: nonstandard IR value
Warn : Specify TAP 'sam3n.cpu.cpu' by name, not number 3
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : JTAG only mode enabled (specify swclk and swdio gpio to add SWD mode)
Info : clock speed 512 kHz
Info : JTAG tap: em357.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: em357.bs tap/device found: 0x069aa62b (mfg: 0x315 (Ember Corporation), part: 0x69aa, ver: 0x0)
Info : JTAG tap: xc6sxl4.fpga.fpga tap/device found: 0x24000093 (mfg: 0x049 (Xilinx), part: 0x4000, ver: 0x2)
Info : JTAG tap: sam3n.cpu.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Error: xc6sxl4.fpga.fpga: IR capture error; saw 0x35 not 0x11
Warn : Bypassing JTAG setup events due to errors
Error: Invalid ACK (6) in DAP response
Error: Failed to write memory at 0xe000201c
Error: Invalid ACK (6) in DAP response
Error: Failed to write memory at 0xe0002020
Info : sam3n.cpu: hardware has 6 breakpoints, 4 watchpoints
Error: sam3n.cpu -- clearing lockup after double fault
Polling target sam3n.cpu failed, trying to reexamine
Error: Invalid ACK (6) in DAP response
Examination failed, GDB will be halted. Polling again in 100ms
Error: Invalid ACK (6) in DAP response
Polling target sam3n.cpu failed, trying to reexamine
Error: Invalid ACK (6) in DAP response
Error: Failed to write memory at 0xe000201c
Error: Invalid ACK (6) in DAP response
Error: Failed to write memory at 0xe000104c
Info : sam3n.cpu: hardware has 6 breakpoints, 4 watchpoints
Error: Invalid ACK (6) in DAP response
Polling target sam3n.cpu failed, trying to reexamine
Error: Invalid ACK (6) in DAP response
Examination failed, GDB will be halted. Polling again in 100ms
Warn : target was in unknown state when halt was requested
Error: Invalid ACK (6) in DAP response

Even everything in my last post? Because I not only had to try everything, it seemed I had to do it several times and finding the right order of doing it.

Actually, looking closer at those errors, they look like RAM errors I think?

I see similar errors in the log file when I run:
sudo /usr/share/admobilize/matrix-creator/sam3-program.bash
unexpected device ID codes coming back on JTAG?

Open On-Chip Debugger 0.10.0-dev-00286-g83b68a2-dirty (2016-08-30-15:18)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
BCM2835 GPIO config: tck = 17, tms = 4, tdi = 22, tdo = 27
BCM2835 GPIO config: trst = 18
trst_only separate trst_push_pull
adapter speed: 512 kHz
Warn : em357.bs: nonstandard IR value
Warn : Specify TAP 'sam3n.cpu.cpu' by name, not number 3
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : JTAG only mode enabled (specify swclk and swdio gpio to add SWD mode)
Info : clock speed 512 kHz
Info : JTAG tap: em357.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: em357.bs tap/device found: 0x069aa62b (mfg: 0x315 (Ember Corporation), part: 0x69aa, ver: 0x0)
Info : JTAG tap: xc6sxl4.fpga.fpga tap/device found: 0x240000b3 (mfg: 0x059 (Performance Semi.), part: 0x4000, ver: 0x2)
Warn : JTAG tap: xc6sxl4.fpga.fpga       UNEXPECTED: 0x240000b3 (mfg: 0x059 (Performance Semi.), part: 0x4000, ver: 0x2)
Error: JTAG tap: xc6sxl4.fpga.fpga  expected 1 of 1: 0x24000093 (mfg: 0x049 (Xilinx), part: 0x4000, ver: 0x2)
Info : JTAG tap: sam3n.cpu.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Error: Trying to use configured scan chain anyway...
Error: xc6sxl4.fpga.fpga: IR capture error; saw 0x35 not 0x11
Warn : Bypassing JTAG setup events due to errors
Info : sam3n.cpu: hardware has 6 breakpoints, 4 watchpoints
Error: sam3n.cpu -- clearing lockup after double fault
Polling target sam3n.cpu failed, trying to reexamine
Error: Invalid ACK (0) in DAP response
Examination failed, GDB will be halted. Polling again in 100ms
Polling target sam3n.cpu failed, trying to reexamine
Info : sam3n.cpu: hardware has 6 breakpoints, 4 watchpoints
Error: Invalid ACK (6) in DAP response
Error: Failed to read memory at 0x400e0a0c
Error: Flash controller(0) is not ready, attempting reset
Error: Invalid ACK (6) in DAP response
Error: Failed to read memory at 0x00400008
Error: Flash controller(0) is not ready, attempting reset
Error: Invalid ACK (6) in DAP response
Error: Failed to read memory at 0x400e0438
Error: Cannot read SAM3 register: CKGR_MCFR @ 0x400e0424, Err: -107
Error: Cannot read SAM3 register: CKGR_MCFR @ 0x400e0424, Error: -107
Error: auto_probe failed

Hi @analog71,

Are you having troubles getting data from the sensors? Can you show what tests have you donde so far?

Yoel

Hi @yoelrc88

I just run the sensors demo program I got from here:

LED demos work (once I switch to a better supply for the rpi) but sensor demos only returning “0”. My MCU will not reflash same issues discussed here.

@BobC did you ever figure out how to fix this?
Cheers
Anthony

SOLVED?
At least two people still have this problem!

@analog71 I got tired of messing with it. For now, I’m assuming it’s an unrecoverable hardware failure. I had hoped for better…

Hi @BobC an others ,

Please check this announce Debian packages have been updated - MCU troubles.
Try this and let us know the results.

Yoel