Last Update: Preliminary information, subject to change.
This is an Application Note discussing how to configure a Decaf IOC-M-411 board for use on a LAN.
This board uses a 96MHz STM32F411CEU6 that provides 7 digital inputs, 4 digital outputs (active H), 3 device control outputs (active L) and 4 analog inputs (0-3.3v). Four wire SPI connects to an ENC28J60 10Mnet PHY device, and to an on-board 4MB EEROM for storage of network server pages.
As built, the default IPv4 and MAC addresses are 192.168.0.190 and hexadecimal 04:02:35:00:00:01 respectively.
Step #1: Identify the available IPv4 addresses on the target LAN
At this point, the IOC-M-411 is NOT connected to the LAN. Using a browser, open your router admin console in expert (or similarly named) mode, and find the DHCP client list. The common default IPv4 device range is 192.168.0.n. Choose a new IPv4 or retain the default. IPv4 addresses must be unique. Similarly, choose a new, unique, MAC address. This is vital when multiple Decaf or other devices are present on the LAN.
Step #2: Configure the IOC-M-411
Connect the board to a USB port, then using the provided PiXCL ConfigIOC app (or create your own), connect to the board and enter the new IPv4 and MAC. These addresses are stored in Flash (using the USBSetNetworkParams command), and hence are retained when the board is powered off. The ConfigIOC app calls the USBGetNetworkParams command to verify that the new addresses have been stored.
Step #3: Connect to the LAN
Leaving the USB cable connected (this powers the board), plug a network cable into the board. If the board is functioning properly it will appear in the router DHCP Client list as the defined IPv4 address. It is a good idea to reserve the IPv4 address using the board MAC, so it will always appear correctly at the same address. If the address is not reserved, adding additional devices can result in the router assigning a new DHCP address. This reassignment can result in apps (USB or Browser) not functioning unless they have been designed to locate a target device regardless of the IPv4 address.
Step #4: Connecting and Testing Sensors and Controls
While it is possible to run the board with a USB app and well as a browser app, an external 5Vdc power supply is needed when USB is not connected. Sensors and controls should now be connected, and development of a browser app can begin. See the PiXCL Network SDK for the command syntax: you’ll find that it is very similar to the USB command list.
A useful approach is to first create a PiXCL app that exercises the sensors and controls to verify the operation and expected results and returned values. This will also identify any operational issues that require adjustment before the IOC-M-411 LAN node is set to operational status.
If an external SPI device is to be added, the device Chip Select (active L) can be chosen from CTRL_OUT_0, _1 or _2 by setting the jumper under the Ethernet PHY module.
< More to be added. Check back soon! >
Copyright © 2023 PiXCL Automation Tech Notes, Canada. All Rights Reserved.