Coder Social home page Coder Social logo

austral-electronics / thunderballh7 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 2.0 13.74 MB

THUNDERBALL H7 OEM : Industrial & Marine Rugged IP67 Calculator / IoT Gateway – STM32H7 Ecosystem

Home Page: https://austral-eng.com/en/thunderball-h7-oem-industrial-marine-rugged-ip67-mission-calculator-iot-gateway/

C 96.29% CMake 0.04% Assembly 3.57% C++ 0.08% Makefile 0.02%
arduino esp32 raspberry rp2040 stm32 stm32h7 ardupilot boat drone ip67 marine portentah7 waterproof canbus iot nmea2000 rs485 rugged real-time robust

thunderballh7's Introduction

Thunderball H7 OEM – Industrial & Marine Rugged IP67 Calculator / IoT Gateway – STM32H7 Ecosystem

www.austral-elec.com - Intelligent Technologies for Marine, Industrial IoT and Unmanned Vehicles

ThunderballH7

Applications

The Thunderball H7 OEM is designed for SWaP-sensitive, robust and real-time applications using remote HMI.
It will be embedded into a third-party system in a harsh environment, like wearable edge computing, boats, vehicles, drones, machines, outdoor and underground platforms… and for a wide range of use cases:

  • Interfacing : sensors, actuators, PLCs, mission computer…
  • Datalog : Data collection, Black box…
  • Dashboard : HTML5 dashboard on all browsers and Industrial or marine Multifunction Displays.
  • IoT gateway : Marine IoT, IIoT, Cloud IoT…
  • Marine : Autopilot, Attitude control, Foiler Flight Control System, Wind calculation…
  • Drones / Robotics : ROS2 Client node, Command control, Guidance…
  • Overall Equipment Effectiveness (OEE) : Fleet management, Asset tracking, Machine monitoring, Energy Management, Security systems…
  • Automation : Building, boat and transportation automation, Climate control…

Sectors : Marine, Industry 4.0, Drones, Robotics, Off-Highway Vehicles, Smart Farming …

Product Web Page

Table of contents

  1. DATASHEETS
  2. ST AND VSCODE LINKS AND DOCUMENTATIONS
  3. INSTALL A VSCODE BASED SDK FOR STM32H7
    3.1. Note and requirement
    3.2. Clone this template with Git
    3.3. Install Visual Studio Code
    3.4. Install STM32 Tools
    3.5. Install the compilation toolchain
    3.6. Install the OpenOCD debugger tool
    3.7. Setup VsCode for the debugger
    3.8. Install debug tools
  4. EVALUATE THE AUTOTEST TEMPLATE
    4.1. Note and requirement
    4.2. Change the IP Address
    4.3. Modify and Compile the Web pages
    4.4. Compile the application
    4.5. Debug the application using the ST-LINK/V2
    4.6. Deploy an image using the USB Bootloader
    4.7. How to test Ethernet & Web UI Demos
    4.8. How to test a product with this Autotest
  5. MODIFY THE DEVICE CONFIGURATION WITH STM32CUBEMX
  6. FAQ & TROUBLESHOOTING
    6.1. Forum
    6.2. Ethernet does not work properly
    6.3. RS485 does not work properly
    6.4. USB Bootloader does not work properly
  7. TUTORIALS
    7.1. Ethernet & Web UI
    7.2. FreeRTOS
    7.3. CANbus
  8. DISCLAIMERS

1. DATASHEETS

ThunderballH7 Hardware specifications and installation guide
STM32H743VIT6 Datasheet

2. ST AND VSCODE LINKS AND DOCUMENTATIONS

3. INSTALL A VSCODE BASED SDK FOR STM32H7

3.1. Note and requirement

3.2. Clone this template with Git

  • Install Git for windows
    Installing Git for Windows tutorial

  • Clone the repository
    To make a "C:\git" directory and clone the template from github, type in a Windows console :

cd c:\
mkdir git
cd git
git clone https://github.com/austral-electronics/ThunderballH7.git
cd ThunderballH7
dir

Option : You can also install TortoiseGit (overlay icons showing the file status)

3.3. Install Visual Studio Code

3.4. Install ST STM32 Tools

3.5. Install the compilation toolchain

  • Download the Arm GNU Toolchain select a Windows hosted cross toolchains for AArch32 bare-metal target (arm-none-eabi) in zip format
    Note : This SDK is tested with gcc-arm-none-eabi-10.3-2021.10-win32.zip
  • Unzip the Arm GNU Toolchain in the folder like "C:/git/toolchain". (Take care to replace space with '-' character in path directories)
  • Test the "gcc" link in a Windows console or in a VSCode Terminal
C:\git\ThunderballH7> ..\\toolchain\\gcc-arm-none-eabi-10.3-2021.10\\bin\\\arm-none-eabi-gcc -v
...
gcc version 10.3.1 20210824 (release) (GNU Arm Embedded Toolchain 10.3-2021.10)
C:\git>make -v
GNU Make 4.2.1
Built for x86_64-w64-mingw32

3.6. Install the debugger tool

  • Download pre-built OpenOCD for Windows
    Note : This SDK is tested with the 20211118 version
  • Unzip OpenOCD in a folder like "C:/git/toolchain". (Take care to replace space with '-' char in path directories)

3.7. Setup VSCode for the OpenOCD debugger and test the cross-compilation

  • If needed modify the "compilerPath" in the file ".vccode/c_cpp_properties.json"
  • If needed modify the "serverpath" and "gdbPath" in the file ".vccode/launch.json"
  • If needed modify the "OPENOCD_PATH" and "GCC_PATH" in the "makefile"
  • Test "make" and "make FLASH=Y" in a VSCode terminal to compile the project and deploy the project in the target

3.8. Install debug tools

Install PuTTY

4. EVALUATE THE AUTOTEST TEMPLATE

4.1. Note and requirement

  • Note
    This template is intentionally as simple as possible, it is a bare metal example, without DMA or interrupt, using the STM32CubeMX Code Generator for peripherals configuration.
    This template performs the functional test by operating all hardware peripherals as well as the basic software peripherals.
    You can easily clone this example as the basis for your project, so you won't need the SDK directory.

  • Requirement

    • To Bootload a new image using the USB Bootloader:

      • Thunderball H7 OEM - STM32 H7 Calculator
      • USB-A to USB-C cable (Android phone charging cable)
      • A PC with STM32CubeProgrammer
    • To test the Web pages demo:

      • M12<->RJ45 Ethernet Cable
      • M12 CANBus Cable (NMEA2000 Cable)
      • 12V Power Supply
    • To compile and test an RS232 Console on COM1 (stdio redirection) as well as the FRAM, RTC and backlight:

      • A Binder 620 to DB9 RS232 cable + an USB To Serial DB9 (RS232) Adapter Cable (see Datasheet for wiring)
      • A PC with this SDK
    • To debug in JTAG/SWD:

      • Thunderball H7 version with a blind Grommet in the base of the enclosure to access to JTAG/SWD JST connector (See the datasheet)
      • ST-LINK/V2 Probe
      • JST_2_Ribbon_JTAG_Cable - JTAG Adapter (See the datasheet)
    • To perform the entire functional test:

      • A small CANbus installation with a sensor that periodically transmits frames.
      • A CANbus Analyser (See frames sended)
      • A RS422 point-to-point cable (!!! with terminations and bias resistors !!!) to send data from TX+/TX- on one COM to RX+/RX- on another.
      • A Binder 620 to RS232 RX only DB9 cable (see Datasheet for wiring)
      • Another USB To Serial DB9 (RS232) Adapter Cable
      • Strap the RTS to CTS to fully test the COM1 port

4.2. Change the IP Address

The default IP Adress is static at 192.168.100.222.
To change this address rapidly edit the file "LWIP/App/lwip.c" line 63 and recompile.
Note : This setting will be erased by CubeMX's automatic code generation, and you will have to change the settings in CubeMX->LWIP->General Settings (See Chapter 5).

4.3. Modify and Compile the Web pages

If you modify the web pages, you must first compile the web pages with makefsdata.exe before compiling the application.
Put the file makefsdata.exe in the folder middleware/third_party/lwip/scr/apps/httpd and run the executable.
It will create the file fsdata.c, which must be excluded from the buid right-click on it in the project and resource configuration/exclude.

Run in the VS Code terminal :

cd .\Middlewares\Third_Party\LwIP\src\apps\http\
.\makefsdata.exe
cd ../../../../../..

4.4. Compile the application

In a VSCode Terminal :

  • Clean and recompile the entire project
make clean
make -j8 all
  • Compile modified parts of the project
make
  • Compile and flash the STM32 using the JTAG/SWD tool
make FLASH=Y

4.5. Debug the application using the ST-LINK/V2

ThunderballH7_web_page

  • Cut off power supply
  • Connect the ST-LINK/V2 probe to the JST JTAG/SWD connector (See the datasheet).
  • Power the ThunderballH7
  • In VSCode, Flash and Run the application pressing "F5" or "Run" -> "Start Debugging"
  • See the "DEBUG CONSOLE" in order to monitor the proper functioning
  • Stop the application with "Shift+F5"

How to place breakpoints and watch variables, stack and memory
VSCode Cortex-Debug Launch Configurations

4.6. Deploy an image using the USB Bootloader

This procedure enables on-site software updates for prototypes and small series to be carried out by the customer or a technician, using a simple PC and USB cable.

ThunderballH7_STM32CubeProgrammer

  • Get a .bin image :
    • Compile the web pages and the application.
    • The image generated is in "C:\git\ThunderballH7\build\ThunderballH7.bin"
    • There is also a precompiled test image in "C:\git\ThunderballH7\SDK\Bin\ThunderballH7_autotest.bin"
  • Cut off power supply
  • Launch the STM32CubeProgrammer Software
  • Connect a USB-A to USB-C cable between PC and ThunderballH7
  • The backlight lights up for 2 seconds and you should hear the USB driver notification sound
  • In STM32CubeProgrammer :
    • If required, select "USB"
    • In USB configuration -> Port you must have USB1 displayed, you can refresh to see it
    • Click on "Connect"
    • Open the .bin file with "Memory & File editing" -> "Open file"
    • Flash with "Download"
  • Unplug the USB cable, an power up the supply.

4.7. How to test Ethernet & Web UI Demos

Connect the ThunderballH7 to an ethernet switch an power on Open a windows/VSCode terminal and test the ping : PING 192.168.100.222
Then open a very simple web pages at 192.168.100.222 with any browser, you will see a web page with:
- A static page and a "Burger" Menu demo ThunderballH7_web_page
- A .AVIF Image demo ThunderballH7_web_page
- A very simple CGI demo ThunderballH7_web_page
- A very simple SSI dynamic page demo ThunderballH7_web_page
- A CGI + SSI Page with a "navbar" Menu demo ThunderballH7_web_page
- A animated SVG+GASP SCADA Demo ThunderballH7_web_page
- A simple JointJS SCADA Demo (Try also the Joint JS Plus link) ThunderballH7_web_page

4.8. How to test a product with this Autotest

  • Test COM1 RX & FRAM
    • Connect COM1 of the thunderballH7 to a PC using a USB <->RS232 adapter
    • Open the device manager to see the COMx port name
    • Open a Console with PuTTY (Serial, COMx, 115200 bauds)
    • Power up the ThunderballH7, you must see in the serial console :

ThunderballH7_web_page

  • Test RTC, Backlight, COM1 TX/CTS/RTS

    • Strap RTS to CTS on COM1
    • Press "space" in the serial console
    • You must see :
      • the time evolve
      • a toggle on the logo backlight (Warning : There is another backlight toggle on CANbus Sentence Reception)
      • a toggle on the COM1 CTS
  • Test COM2 to COM5 in RS422/RS485 mode

    • A RS422 point-to-point cable (!!! with terminations and bias resistors !!!) is required to send data from TX+/TX- on one COM to RX+/RX- on another.
    • Connect TX side to COM2 and RX side to COM3 and press "space"
    • You must see "TX on COM2, RX on COM3 OK"
    • Strap the next COM ports and restart the test with "space" for the others 3 combinaisons.
  • Test COM2 to COM5 in RS232 RX only mode

    • With a Binder 620 to RS232 RX only DB9 cable (see Datasheet for wiring) and another USB <->RS232 adapter
    • Open another PuTTY serial console (Serial, COMy, 115200 bauds)
    • Connect this RS232_RX cable to COM2
    • Send any character with this COM2 console, you must see "COM2:x" in the COM1 console
    • Test COM3 to COM5
  • Test the CANbus

    • Connect The Thunderball H7 and a CANBus/NMEA2000 Analyser to a small bus with a 12V power and terminators
    • Configure the Analyser at 250KBs, Extended_ID, Classic Mode
    • Press "space" in the COM1 serial console to send a sentence with PGN 127250 (Vessel Heading) and Heading=343 Degree Mag
    • Send a Sentence with the Analyser (or any NMEA2000 Instrument), you must see a toggle of the Logo backlight on each good reception
      Note : Set a Breakpoint in "App/Main/canbus.c" file and "HAL_FDCAN_RxFifo0Callback" function to verify the datas
  • Test the bootloader software jump

    • This method may be necessary on products using the USB device port, that do not set BOOT0 by powering with a USB-C cable.
    • Press 'b' in the COM1 console
    • Test the bootload with STM32CubeProgrammer

5. MODIFY THE DEVICE CONFIGURATION WITH STM32CUBEMX

🔴 This template was created in early 2022 using "STM32CubeMX" 6.4.0 and "STM32Cube MCU Package for STM32H7" 1.9.1 🔴

These versions contain known bugs (Ethernet driver, HTTPD_USE_CUSTOM_FSDATA...) and have been upgraded since.
Some modifications applied after the cubeMX code generation are probably no longer applicable with a newer package version.

Warning : New problems appear with more recent versions of CubeMx using old package or in recent CubeMx and H7 Package.
And ST doesn't provide example for Nucleo using cubeMX and LwIP and doesn't update Nucleo-H743 demos when drivers change. Changing package versions can be a laborious task.

With Windows Explorer, click "C:\git\ThunderballH7\ThunderballH7.ioc" to open CubeMX with the template configuration.
You'll certainly need to change IP, DMAs, Baudrates, Interrupts, FATFS, FREERTOS... in your application if you use this simple template as a basis.
The default STM32H743VIT6 Pinout is described in the datasheet and the CPU clock is adjust to the max (480Mhz).

  • Change IP Address Settings Change the settings in CubeMX->LWIP->General Settings

ThunderballH7_web_page

  • Modifications applied to generated source code after CubeMX automatic code generation:

    • Use origin web page by diseabling custom web page (@ line 93) in file "LWIP\Target\lwipopts.h": HTTPD_USE_CUSTOM_FSDATA 0
    • Generate "fsdata.c" by executing "./makefsdata.exe" in the folder: "Middlewares\Third_Party\LwIP\src\apps\http"
    • Compile the project with : make -j8 all
  • Todo creating a new project:

6. FAQ & TROUBLESHOOTING

6.1. Forum

6.2. Ethernet does not work properly

🔴 There are 2 Ethernet driver bugs (H743 too fast & auto-negociation) in the "STM32Cube MCU Package for STM32H7" version 1.9.1 : 🔴

Waiting for an official Fix from ST :

  • We had to introduce a delay of 500 to 1500ms at the boot (main.c, line 149)
  • Without this tempo, Ethernet will be at 10Mbs from SWD debug reset and ethernet operation will not be ensured from a power up
  • The duration is depending of the soft reset vs power up and of the ethernet switch auto-negotiation time (switch model, 100MB or 1GB)
  • Note : A delay may be already in lan8742.c on a newer package

To configure cubeMX, read the ST tutorials :

6.3. RS485 does not work properly

See Termination and biasing resistors problem on the datasheet

6.4. USB Bootloader does not work properly

There is a new problem which appeared with STM32CubeProgrammer, this error has been reported on the forums in October 2023.
The USB bootload stops during flashing when the bootload launch was done with a software jump.
We have found that performing a "Verify" before "Download" significantly improves the probability of success.
🟢 It works properly with an hardware launch when powering using USB-C (when BOOT0 is maintained at 1 the entire flashing procedure) 🟢

7. TUTORIALS

7.1. Ethernet & Web UI

7.2. FreeRTOS

UM1722
FreeRTOS emcraft

7.3. CANbus

FDCAN in Normal mode

8. DISCLAIMERS

Copyright (C) 2022 Austral Electronics SARL. Changes to the specifications and features in this manual may be made by Austral without prior notice. Specifications and information provided in this manual are for informational use only. Austral assumes no responsibility or liability for any errors or inaccuracies that may appear in this manual including the product & / or software. All trademarks mentioned in this manual are property of their respective owners. This product contains copyrighted software which are released under multiple open source licenses including but not limited to the GNU GPL, LGPL, and MIT BSD licenses. Such software is provided without warranty. Copies of these licenses are included in the software itself in further detail. For the latest up to date information, please visit our Github Repository at https://github.com/austral-electronics/ThunderballH7

thunderballh7's People

Contributors

austral-electronics avatar

Watchers

 avatar

Forkers

mfkiwl rokpusavec

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.