GithubHelp home page GithubHelp logo

BSFrance Arduino core for STM32 boards

This core will allow you to use BSFrance AVR based boards with the Arduino ecosystem, it ibsed on STM32 HAL.

How to install

At first drivers for the usb-serial (VCP, Virtual Com Port) and DFU (Device Firmware Upgrade) have to be installed. This applies to Windows only, Mac OSX and Linux users wont have to install drivers (in most cases).

  • Plug the board to USB, press the reset button twice within 0.5 second to set the board in DFU mode.
  • Launch Zadig installer, the board will be recognized as STM32 BOOTLOADER, install the driver.
  • Press the reset button once so the board restart in normal mode (run) and install the STM32 Virtual COM Port driver.

You can now proceed with the Arduino core installation :

  • download the core repository and unzip it to Documents / Arduino / hardware folder see note below.

  • Launch Arduino IDE, select BSFrance LoRaMx boards in the Tool / board menu, select your variant in the Tools / Specific board menu, finally select the correct serial port in the Tool / port menu. Your board is now ready to use with Arduino IDE.

Note : Documents / Arduino is the default location of user fodlder set by Arduino IDE, if you use another location the principle is the same. If no Hardware folder is present in Documents / Arduino, create it, and move the BSFrance-stm32 repository inside. You might want to rename the unzipped directory BSFRance-stm32.

USB serial port

The LoRaMx boards are providing a serial port via the native USB interface, this serial port can be used for debug or communication purpose, it is also used by Arduino to provide automatic upload.

DFU

The DFU or Device Firmare Upgrade is a standard widely used to provide simple firmware upgrade on many devices and baords. On LoRaMx boards it provides automatic upload of user code via USB from Arduino IDE with no need for user action or external programmer. Our STM32 boards are fitted with an extremely compact DFU capable firmware (4K, smallest on the market), some variants are also using the internal STM32 DFU bootlaoder, effectively using 0 octet of user flash. Note : all boards with the 4K bootloader will blink the white LED fast when set to DFU mode, all boards using the internal bootlader (STM32F3xx, STM32F4xx, STML4xx) won't blink white LED when set to DFU mode.

Manual DFU mode

We implemented a failsafe mecanism to enter in DFU mode manually, by pressing the reset button twice within 0.5 second (like a double clic) the board will enter and stay in DFU mode until a firmware is uploaded or reset button is pressed (once).

This mecanism is very important for any board with native USB serial because if user code locks-up the main loop then serial port wont be served anymore and Arduino IDE will lose the ability to reset board into DFU mode for automatic uploading. So in such case the DFU mode has to be set manually by pressing the reset button twice within 0.5 second, uploading can then be done in Arduino IDE with the upload button as usual.

Note : when set to manual DFU mode the serial port wont be visible in Tools / port menu anymore, this is normal behavior and wont prevent uploading. The serial port cannot coexist with the DFU port due to OS limitations, during the upload process the existing serial port is used by Arduino to reset the board into DFU mode. When the board is set to manual DFU mode Arduino will detect it is already in DFU mode and will upload directly.

SWD (STlink)

Alternatively STLink debugger can be used for uploading, make sure to select STLink in the Tools / upload method menu. Connect your STLink to the SWD interface (3V3 GND DIO CLK), there is no need to connect the RST line, reset is issued in software.

bsfrance's Projects

bsfrance doesnโ€™t have any public repositories yet.

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.