STM32 Nucleo

From Axel Public Wiki
Jump to navigation Jump to search

We're sorry, this page is under construction

This guide is intended for STM32 Nucleo F767ZI demo board, with Axel runtime.

Quickstart

USB connection

It is possible to connect the Nucleo board via USB-Serial connection; just refer to the following steps:

  • Connect USB cable into CN1 connector.
  • Open LogicLab.
  • Create new Nucleo_F767ZI project.
  • Select from LogicLab main menu bar On-line -> Set up communication.
  • Select Modbus protocol, click on Activate button and then on Properties button, the settings dialog will appear; configure it as shown in the image below:

Nucleo-USBConnection1.jpg

  • Click Ok
  • Now from the main menu bar, choose On-line -> Connect
  • Now, in the right-lower corner of the application window, you should see a green rectangle with the word CONNECTED written inside.

Ethernet connection

It is possible to connect the Nucleo board via Ethernet; just refer to the following steps:

  • Connect to Ethernet LAN plugging cable into CN14 connector.
  • Open LogicLab
  • Click Scan Network… button
  • If Nucleo board is recognized, you should see this results table:

Nucleo-EthScan.jpg

  • By default, IP address is assigned by DHCP
  • Click on the (+) button to automatically create a new nucleo project with the right communication settings

Nucleo-EthConfig.jpg

  • From the main menu bar choose On-line -> Connect
  • Now, in the right-lower corner of the application window, you should see a green rectangle with the word CONNECTED written inside.

Modify ethernet communication settings

If the IP address cannot be correctly assigned by DHCP, it is possible to manually configure a fixed IP address for the Nucleo board. See the following instruction:

  • Connect USB cable into CN1 connector
  • Open SoftTune
  • Create new Nucleo_F767ZI project
  • From the menu bar choose Target -> Communication settings
  • Select Modbus protocol, then click on Activate and then click on Properties
  • Configure the Modbus setting as shown in the following image (specify the USB virtual COM port as recognized by your system):

Nucleo-USBConnection1.jpg

  • Click OK
  • Click on the connection Icon
  • In the bottom-right corner of the application window, you should see a green rectangle with CONNECTED written inside
  • Inside the parameters tree, select All Parameters -> Communication -> Configure TCP IP address, and specify the desired IP address (this should write the parameter inside the target)
  • Save parameters and reboot (from the menu bar choose Target -> Save parameter, then Target -> Device reboot
  • Connect LogicLab to target via Ethernet (see 1.2 Ethernet connection)

Peripheral connection

Peripheral Connector Description Usage
Ethernet CN14 RJ45 port Modbus TCP slave
USB CN1 USB-RS232 virtual port Modbus RTU slave
GPIO - Out CN12 – Pin 11 (PA5) GPIO digital output pin I/O
GPIO - Out CN12 – Pin 13 (PA6) GPIO digital output pin I/O
GPIO - In CN12 – Pin 23 (PA8) GPIO digital input pin I/O
GPIO - In CN12 – Pin 21 (PA9) GPIO digital input pin I/O
CAN Rx CN11 – Pin 57 (PD0) CAN Rx signal CAN Open master
CAN Tx CN11 – Pin 55 (PD1) CAN Tx signal CAN Open master
USART1 Rx CN12 – Pin 26 (PB15) RS485 Rx signal Modbus RTU master
USART1 Tx CN12 – Pin 28 (PB14) RS485 Tx signal Modbus RTU master
USART1 DE CN12 – Pin 12 (PA12) RS485 Direction enable signal Modbus RTU master

Firmware upgrade

This is the procedure to prepare Nucleo F767ZI demo board to run Axel PLC.

N.B: all data on the flash will be erased, that means license key will be erased too.
If the target has been already licensed please be sure to have the license key available. You can read it from target using SoftTune before proceeding with the target upgrade.

  • Download “STM32 ST-LINK Utility” application from ST official website at the following link
    https://www.st.com/en/development-tools/stsw-link004.html#get-software
  • Connect Nucleo F767ZI demo board to PC using USB (CN1 connector)
  • Launch “STM32 ST-LINK Utility”
  • Connect to target (Target -> Connect)
  • Erase the flash (Target -> Erase chip)
  • Prepare to download (Target -> Program & Verify)
  • Choose the new firmware (Select the new firmware file from Axel Installation folder, for example "C:\Program Files (x86)\Axel PC Tools\Catalog\Nucleo_F767ZI_1p0\Firmware\NUCLEO_STM32F767ZI_RTOS_1p0.bin")


  • Execute the download (Click Start)

Plugin development

IOPluginLib user sample plugin

Project settings

IOPlugin interface description

Add plugin to main firmware

User plugin interface

= Plugin definition