(Solved) Can't get sensor data


#1

I’m trying to test my matrix creator. I built the demos from the matrix-creator-hal package. The LEDs work fine, but nothing else so far.

pi@raspberrypi:~/matrix-creator-hal/demos $ ./firmware_info INFO: [/dev/matrixio_regmap] was opened
MCU ID = 0x0
MCU version = 0x0

pi@raspberrypi:~/matrix-creator-hal/demos $ ./sensors_demo
INFO: [/dev/matrixio_regmap] was opened

yaw = 0° roll = 0° pitch = 0°
accel = {0, 0,0}

humidity = 0 %
temperature (from humidity sensor) = 0 °C

pressure = 0 kPa
altitude = 0 meters
temperature (from altimeter) = 0 °C

UV = 0

MCU ID = 0x0
MCU version = 0x0

I read the thread TheGrudge where he had the same problem and tried doing this:

  1. DISABLE 1-wire
  2. ENABLE I2C
  3. Run the init script again

but when I ran the init script, I got this:

pi@raspberrypi:~/matrix-creator-hal/demos sudo /usr/share/matrixlabs/matrixio-devices/matrix-init.bash **** MATRIX Creator FPGA has been programmed! INFO: [/dev/matrixio_regmap] was opened FPGA IDENTIFY = 5c344e8 FPGA VERSION = 1000api@raspberrypi:~/matrix-creator-hal/demos sudo /usr/share/matrixlabs/matrixio-devices/matrix-init.bash
**** MATRIX Creator FPGA has been programmed!
INFO: [/dev/matrixio_regmap] was opened
FPGA IDENTIFY = 5c344e8
FPGA VERSION = 1000a
*** MATRIX Creator initial process has been launched
*** Running the program instead of the bootloader
Running the program instead of the bootloader
**** Could not program SAM3 MCU, you must be check the logfile /tmp/sam3-program.log

*** MATRIX Creator initial process has been launched
*** Running the program instead of the bootloader
Running the program instead of the bootloader
**** Could not program SAM3 MCU, you must be check the logfile /tmp/sam3-program.log

the log file shows this:

pi@raspberrypi:~/matrix-creator-hal/demos $ cat /tmp/sam3-program.logOpen On-Chip Debugger 0.10.0-dev-g629c2417 (2017-11-08-21:47)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
SysfsGPIO nums: tck = 17, tms = 4, tdi = 22, tdo = 27
SysfsGPIO num: trst = 18
trst_only separate trst_push_pull
adapter speed: 128 kHz
Warn : em357.bs: nonstandard IR value
Warn : Specify TAP ‘sam3n.cpu.cpu’ by name, not number 3
Info : SysfsGPIO JTAG/SWD bitbang driver
Info : JTAG only mode enabled (specify swclk and swdio gpio to add SWD mode)
Warn : gpio 18 is already exported
Info : This adapter doesn’t support configurable speed
Info : JTAG tap: em358.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)
Info : sam3n.cpu: hardware has 6 breakpoints, 4 watchpoints
sam3n.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x21000000 pc: 0x00406d62 psp: 0x20001680
#0 : at91sam3 at 0x00400000, size 0x00020000, buswidth 0, chipwidth 0
# 0: 0x00000000 (0x4000 16kB) not protected
# 1: 0x00004000 (0x4000 16kB) not protected
# 2: 0x00008000 (0x4000 16kB) not protected
# 3: 0x0000c000 (0x4000 16kB) not protected
# 4: 0x00010000 (0x4000 16kB) not protected
# 5: 0x00014000 (0x4000 16kB) not protected
# 6: 0x00018000 (0x4000 16kB) not protected
# 7: 0x0001c000 (0x4000 16kB) not protected
flash ‘at91sam3’ found at 0x00400000
wrote 36636 bytes from file blob/ch.bin to flash bank 0 at offset 0x00000000 in 4.445142s (8.049 KiB/s)
Info : JTAG tap: em358.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)
Warn : Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support.
shutdown command invoked

Suggestions?


#2

Strangest thing. I turned it off last night and when I turned it back on today, it started working. I guess a reboot wasn’t enough and it needed to be power cycled?