Particle IO Photon

Pinout

../_images/photon-pinout.png

Default system features

The default configuration includes those major features. They are all initialized by sys_start() at the startup of the application.

Library Reference

Read more about board specific functionality in the Particle IO Photon module documentation in the Library Reference.

Memory usage

Below is the memory usage of two applications:

  • The minimal-configuration application is configured to only include the bare minimum of functionality for the low level kernel to run. That is, the thread scheduler and system tick.
  • The default-configuration application is built with the default configuration, including a lot more functionality. See the list of Default system features above for a summary.
Application Flash RAM
minimal-configuration 14368 3520
default-configuration 59532 6654

Default configuration

Default Standard Library configuration.

Name Value
CONFIG_ASSERT 1
CONFIG_DEBUG 1
CONFIG_FS_CMD_DS18B20_LIST 1
CONFIG_FS_CMD_ESP_WIFI_STATUS 0
CONFIG_FS_CMD_FS_APPEND 1
CONFIG_FS_CMD_FS_COUNTERS_LIST 1
CONFIG_FS_CMD_FS_COUNTERS_RESET 1
CONFIG_FS_CMD_FS_FILESYSTEMS_LIST 1
CONFIG_FS_CMD_FS_FORMAT 1
CONFIG_FS_CMD_FS_LIST 1
CONFIG_FS_CMD_FS_PARAMETERS_LIST 1
CONFIG_FS_CMD_FS_READ 1
CONFIG_FS_CMD_FS_WRITE 1
CONFIG_FS_CMD_I2C_READ 1
CONFIG_FS_CMD_I2C_WRITE 1
CONFIG_FS_CMD_LOG_LIST 1
CONFIG_FS_CMD_LOG_PRINT 1
CONFIG_FS_CMD_LOG_SET_LOG_MASK 1
CONFIG_FS_CMD_NETWORK_INTERFACE_LIST 1
CONFIG_FS_CMD_PING_PING 1
CONFIG_FS_CMD_PIN_READ 1
CONFIG_FS_CMD_PIN_SET_MODE 1
CONFIG_FS_CMD_PIN_WRITE 1
CONFIG_FS_CMD_SERVICE_LIST 1
CONFIG_FS_CMD_SERVICE_START 1
CONFIG_FS_CMD_SERVICE_STOP 1
CONFIG_FS_CMD_SETTINGS_LIST 1
CONFIG_FS_CMD_SETTINGS_READ 1
CONFIG_FS_CMD_SETTINGS_RESET 1
CONFIG_FS_CMD_SETTINGS_WRITE 1
CONFIG_FS_CMD_SYS_CONFIG 1
CONFIG_FS_CMD_SYS_INFO 1
CONFIG_FS_CMD_SYS_UPTIME 1
CONFIG_FS_CMD_THRD_LIST 1
CONFIG_FS_CMD_THRD_SET_LOG_MASK 1
CONFIG_FS_CMD_USB_DEVICE_LIST 1
CONFIG_FS_CMD_USB_HOST_LIST 1
CONFIG_FS_PATH_MAX 64
CONFIG_MONITOR_THREAD 1
CONFIG_PREEMPTIVE_SCHEDULER 0
CONFIG_PROFILE_STACK 1
CONFIG_SETTINGS_AREA_SIZE 256
CONFIG_SHELL_COMMAND_MAX 64
CONFIG_SHELL_HISTORY_SIZE 768
CONFIG_SHELL_MINIMAL 0
CONFIG_SHELL_PROMPT “$ “
CONFIG_SOCKET_RAW 1
CONFIG_SPIFFS 0
CONFIG_START_CONSOLE CONFIG_START_CONSOLE_UART
CONFIG_START_CONSOLE_DEVICE_INDEX 0
CONFIG_START_CONSOLE_UART_BAUDRATE 38400
CONFIG_START_CONSOLE_USB_CDC_CONTROL_INTERFACE 0
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_IN 2
CONFIG_START_CONSOLE_USB_CDC_ENDPOINT_OUT 3
CONFIG_START_CONSOLE_USB_CDC_WAIT_FOR_CONNETION 1
CONFIG_START_FILESYSTEM 0
CONFIG_START_FILESYSTEM_ADDRESS 0
CONFIG_START_FILESYSTEM_SIZE 65536
CONFIG_START_NETWORK 0
CONFIG_START_NETWORK_INTERFACE_WIFI_CONNECT_TIMEOUT 30
CONFIG_START_NETWORK_INTERFACE_WIFI_PASSWORD MyWiFiPassword
CONFIG_START_NETWORK_INTERFACE_WIFI_SSID MyWiFiSSID
CONFIG_START_SHELL 1
CONFIG_START_SHELL_PRIO 30
CONFIG_START_SHELL_STACK_SIZE 768
CONFIG_STD_OUTPUT_BUFFER_MAX 16
CONFIG_SYSTEM_TICK_FREQUENCY 100
CONFIG_SYS_CONFIG_STRING 1
CONFIG_SYS_SIMBA_MAIN_STACK_MAX 4096
CONFIG_THRD_CPU_USAGE 1
CONFIG_THRD_ENV 1
CONFIG_THRD_IDLE_STACK_SIZE 384
CONFIG_THRD_TERMINATE 1
CONFIG_USB_DEVICE_PID 0x8037
CONFIG_USB_DEVICE_VID 0x2341

Detailed pinout

Right side pins

../_images/photon-pinout1.png

Left side pins

../_images/photon-pinout2.png

User I/O

../_images/photon-pinout3.png

Prerequisities

Install the dfu-utility.

git clone git://git.code.sf.net/p/dfu-util/dfu-util
cd dfu-util
sudo apt-get build-dep dfu-util
./autogen.sh
./configure
make
sudo make install
cd ..

# Give users access to the device.
sudo cp simba/environment/udev/49-photon.rules /etc/udec/rules.d

Flashing

The Photon must enter DFU mode before software can be uploaded to it. It’s recommended to use the manual method to verify that software can be successfully uploaded to the board, and then start using the automatic method to reduce the manual work for each software upload.

Manual

To enter DFU Mode:

  1. Hold down the RESET and SETUP buttons.
  2. Release only the RESET button, while holding down the SETUP button.
  3. Wait for the LED to start flashing yellow (it will flash magenta first).
  4. Release the SETUP button.

NOTE: Do not connect DTR and/or RTS using manual upload. They must only be connected using the automatic method.

Upload the software with make BOARD=photon upload.