TBD
- 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
- PC with Linux operating system
- STM32CubeMX
- STM32 System Workbench
- Terminal program
- Power up the board
- Connect the board to the PC with USB-to-Serial interface and start the terminal program
- 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
- 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
Please refer here to create the application from scratch
I2C bus can be initialize from CubeMX Integrating BHI160 and BMM150, running Vector Rotation example Issue with SPI
Quang Hai Nguyen email: qnguyen@arroweurope.com