Skip to content

HaiQNguyen/Avenger_Bosch_Mezz

Repository files navigation

Avenger96 interfaces with Bosch Sensor Mezzanine

Overview

TBD

Requirement

Hardware

  • Avenger96 - link
  • Bosch Sensor Mezzanine - link
  • UART Serial - link or any other USB-to-Serial supporting 1.8V
  • 2 micro USB cables
  • SD card, minimum 8GB
  • Power supply: recommended 12V/2A

Software

  • PC with Linux operating system
  • STM32CubeMX
  • STM32 System Workbench
  • Terminal program

Bring up the application

  • Power up the board
  • Connect the board to the PC with USB-to-Serial interface and start the terminal program

Building the ethernet interface between the board and PC (execute only once)

  • On the linux machine, type:
> sudo gedit /etc/network/interfaces 
  • Add the Ethernet interface:
allow-hotplug ens35u1
iface ens35u1 inet static
address 192.168.7.1
netmask 255.255.255.0
network 192.168.7.0
gateway 192.168.7.1
  • Disable networkManager for all Ethernet-to-USB:
> sudo gedit /etc/NetworkManager/conf.d/stm32mp-otg-eth.conf 
  • Add those lines below:
[keyfile]
unmanaged-devices=interface-name:ens35*;
interface-name:usb*
  • Reboot linux machine
  • After rebooting, on the linux machine we can verify the connetion by:
> ping 192.169.0.2
  • On the Avenger board, we can also verify the connection by:
> ping 192.168.0.1

Flashing the application

  • Clone the repository
  • Import the project into system workbench and rebuld it. There should be no error and some minor warnings
  • Flash the application into the Avenger96
  • If the application have not started yet, please go to:
> cd /usr/local/projects/Avenger_Bosch_Mezz/
> ./fw_cortex_m4.sh start
  • Activate the co-proc messaging:
> stty -onlcr -echo -F /dev/ttyRPMSG0
> cat /dev/ttyRPMSG0 &
  • The sensor data can be read by using this command:
> echo "read data" > /dev/ttyRPMSG0
  • The response message follows:
> W: 0.999  X:-0.025  Y:-0.027  Z: 0.021
  • You can also test the LED by issueing the command:
> echo "LED ON" > /dev/ttyRPMSG0
> echo "LED OFF" > /dev/ttyRPMSG0
  • Application can be stopped by:
> ./fw_cortex_m4.sh stop

Starting from scratch

Please refer here to create the application from scratch

Change Log

Version 1.0.0

I2C bus can be initialize from CubeMX Integrating BHI160 and BMM150, running Vector Rotation example Issue with SPI

References

Contact

Quang Hai Nguyen email: qnguyen@arroweurope.com

About

TBD

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages