Skip to content

Commit

Permalink
Merge pull request #144 from mcci-catena/issue143
Browse files Browse the repository at this point in the history
Fix #143: added new board Catena 4802
  • Loading branch information
terrillmoore authored Dec 9, 2020
2 parents 27546bf + 29adbf2 commit f8c1f7d
Show file tree
Hide file tree
Showing 11 changed files with 1,184 additions and 19 deletions.
37 changes: 20 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This repository is MCCI's version of [Arduino_Core_STM32](https://github.com/stm

For general information, please check the stm32duino [README.md](https://github.com/stm32duino/Arduino_Core_STM32#arduino-core-support-for-stm32-based-boards), especially the [Getting Started](https://github.com/stm32duino/Arduino_Core_STM32#getting-started) section.

[![GitHub release](https://img.shields.io/github/release/mcci-catena/Arduino_Core_STM32.svg)](https://github.com/mcci-catena/Arduino_Core_STM32/releases/latest) [![GitHub commits](https://img.shields.io/github/commits-since/mcci-catena/Arduino_Core_STM32/latest.svg)](https://github.com/mcci-catena/Arduino_Core_STM32/compare/v2.7.0...master)
[![GitHub release](https://img.shields.io/github/release/mcci-catena/Arduino_Core_STM32.svg)](https://github.com/mcci-catena/Arduino_Core_STM32/releases/latest) [![GitHub commits](https://img.shields.io/github/commits-since/mcci-catena/Arduino_Core_STM32/latest.svg)](https://github.com/mcci-catena/Arduino_Core_STM32/compare/v2.8.0...master)

**Contents:**
<!-- markdownlint-disable MD033 -->
Expand All @@ -18,7 +18,7 @@ For general information, please check the stm32duino [README.md](https://github.
- [Catena 461x Series](#catena-461x-series)
- [Sensors on Catena 4612, 4617, and 4618](#sensors-on-catena-4612-4617-and-4618)
- [Catena 4630 Features](#catena-4630-features)
- [Catena 4801 Features](#catena-4801-features)
- [Catena 480x Features](#catena-480x-features)
- [Troubleshooting](#troubleshooting)
- [Installing a Development Copy of this BSP](#installing-a-development-copy-of-this-bsp)
- [Release History](#release-history)
Expand Down Expand Up @@ -58,7 +58,8 @@ The Arduino IDE allows you to select the following items.
| MCCI Catena 4617 | Murata CMWX1ZZABZ module, STM32L082 | [461x](#catena-461x-series) | Primary battery, HS3001 |
| MCCI Catena 4618 | Murata CMWX1ZZABZ module, STM32L082 | [461x](#catena-461x-series) | Primary battery, SHT31-DIS-F |
| MCCI Catena 4630 | Murata CMWX1ZZABZ module, STM32L082 | [4630](#catena-4630-features) | LiPo battery,ZMOD4410, PMS7003 |
| MCCI Catena 4801 | Murata CMWX1ZZABZ module, STM32L082 | [4801](#catena-4801-features) | Primary battery, Modbus |
| MCCI Catena 4801 | Murata CMWX1ZZABZ module, STM32L082 | [480x](#catena-480x-features) | Primary battery, Modbus |
| MCCI Catena 4802 | Murata CMWX1ZZABZ module, STM32L082 | [480x](#catena-480x-features) | Primary battery, Modbus, SHT31-DIS-F, I2C Expander |

### Catena 461x Series

Expand Down Expand Up @@ -104,22 +105,22 @@ The 4630 is a Feather-compatible board designed for field air-quality monitoring
| Sensors | ZMOD4410 VOC sensor; BME280 temperature/pressure/humidity |
| External interfaces | TTL Serial, dedicated cable for connecting to PMS7003 PM2.5 sensor |

### Catena 4801 Features
### Catena 480x Features

The 4801 is a dedicated board for remote Modbus applications, using the Murata module.
The 480x is a dedicated board for remote Modbus applications, using the Murata module.

| Feature | 4801 |
|---------|------|
| TCXO Control | Controlled by code |
| Battery type | Primary battery, boost regulator (but can tolerate up to 3.7V battery) |
| System voltage | 2.2V to 3.3V, depending on whether boost regulator is enabled. |
| Regulator control | EN output from CPU controls boost regulator, and 4801 normally runs with boost regulator off for lower power. |
| High-side switch for power for external sensors | Yes |
| Screw terminals for external sensors | 1x4 pin |
| Feather physical compatibility | No |
| USB | Not supported |
| Sensors | none |
| External interfaces | Modbus, TTL serial |
| Feature | 4801 | 4802 |
|---------|------|------|
| TCXO Control | Controlled by code | Controlled by code |
| Battery type | Primary battery, boost regulator (but can tolerate up to 3.7V battery) | Primary battery, buck regulator (but can tolerate up to 5V battery) |
| System voltage | 2.2V to 3.3V, depending on whether boost regulator is enabled. | 3.6V to 5V |
| Regulator control | EN output from CPU controls boost regulator, and 4801 normally runs with boost regulator off for lower power. | Always enabled if +VIN present.
| High-side switch for power for external sensors | Yes | Yes |
| Screw terminals for external sensors | 1x4 pin | 2x4 pin |
| Feather physical compatibility | No | No |
| USB | Not supported | Not supported |
| Sensors | none | SHT31 |
| External interfaces | Modbus, TTL serial | Modbus, TTL serial, I2C Expander |

## Troubleshooting

Expand Down Expand Up @@ -155,6 +156,8 @@ Remember to restart the IDE whenever you change `platform.txt`, `boards.txt` or

## Release History

- [v2.8.0](https://github.com/mcci-catena/Arduino_Core_STM32/releases/tag/v2.8.0) Added support for new board: 4802, [#143](https://github.com/mcci-catena/Arduino_Core_STM32/issues/143).

- [v2.7.0](https://github.com/mcci-catena/Arduino_Core_STM32/releases/tag/v2.7.0) adds UI support for LoRaWAN network and subband selection, [#22](https://github.com/mcci-catena/Arduino_Core_STM32/issues/22). Note, though, that the UI options must be implemented by your target LoRaWAN stack in order to be effective.

- [v2.6.1](https://github.com/mcci-catena/Arduino_Core_STM32/releases/tag/v2.6.1) fixed numerous compile warnings. Also fixed [#78](https://github.com/mcci-catena/Arduino_Core_STM32/issues/78), which resulted in occasional reuse of the entire input ring buffer.
Expand Down
10 changes: 10 additions & 0 deletions boards.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,15 @@
}
]
},

{
"modelnumber": "4802",
"build_variant": "CATENA_4802",
"extra_sections": [
{ "name": "xserial",
"using": "xserial_nousb"
}
]
},
]
}
158 changes: 158 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1415,3 +1415,161 @@ mcci_catena_4801.menu.lorawan_subband.sb11.build.lorawan_subband_flags=-DARDUINO

#### end of configuration info for MCCI Catena 4801

#
# Configuration information for MCCI Catena 4802
# See template in https://github.com/mcci-catena/Arduino_Core_STM32/boards.template
#
mcci_catena_4802.name=MCCI Catena 4802

mcci_catena_4802.build.core=arduino
mcci_catena_4802.build.board=MCCI_CATENA_4802
mcci_catena_4802.build.product_line=STM32L082xx

mcci_catena_4802.upload.maximum_size=196608
mcci_catena_4802.upload.maximum_data_size=20480
mcci_catena_4802.build.mcu=cortex-m0
mcci_catena_4802.build.series=STM32L0xx
mcci_catena_4802.build.variant=CATENA_4802
mcci_catena_4802.build.variant_extra_flags=
mcci_catena_4802.build.cmsis_lib_gcc=arm_cortexM0l_math
mcci_catena_4802.build.extra_flags=-DARDUINO_STM32 -DARDUINO_{build.series} -DARDUINO_{build.product_line} -D{build.product_line} {build.sysclk_flags} {build.xSerial} -D__CORTEX_SC=0 -D{build.board} {build.lorawan_flags} {build.lorawan_network_flags} {build.lorawan_subband_flags} {build.variant_extra_flags}
# mcci_catena_4802.build.c.Werror=
# mcci_catena_4802.build.cpp.Werror=
# mcci_catena_4802.build.S.Werror=

#
# menu.upload_method

mcci_catena_4802.menu.upload_method.STLink=STLink
mcci_catena_4802.menu.upload_method.STLink.upload.protocol=STLink
mcci_catena_4802.menu.upload_method.STLink.upload.tool=stlink_upload

#mcci_catena_4802.menu.upload_method.Serial=Serial
#mcci_catena_4802.menu.upload_method.Serial.upload.protocol=Serial
#mcci_catena_4802.menu.upload_method.Serial.upload.tool=serial_upload

#
# menu.xserial
mcci_catena_4802.menu.xserial.generic=Generic Serial
mcci_catena_4802.menu.xserial.two=Two HW Serial
mcci_catena_4802.menu.xserial.none=No Serial
mcci_catena_4802.menu.xserial.generic.build.xSerial=-DARDUINO_BSP_CONFIG_SERIAL_MASK=0x2
mcci_catena_4802.menu.xserial.none.build.xSerial=-DARDUINO_BSP_CONFIG_SERIAL_MASK=0x0
mcci_catena_4802.menu.xserial.two.build.xSerial=-DARDUINO_BSP_CONFIG_SERIAL_MASK=0x6

#
# menu.sysclk
mcci_catena_4802.menu.sysclk.pll32m=32 MHz (most power)
mcci_catena_4802.menu.sysclk.pll24m=24 MHz
mcci_catena_4802.menu.sysclk.hsi16m=16 MHz
mcci_catena_4802.menu.sysclk.msi4194k=4.194 MHz (no USB)
mcci_catena_4802.menu.sysclk.msi2097k=2.097 MHz (no USB, least power)
mcci_catena_4802.menu.sysclk.pll32m.build.sysclk_flags=-DCATENA_CFG_SYSCLK=32
mcci_catena_4802.menu.sysclk.pll24m.build.sysclk_flags=-DCATENA_CFG_SYSCLK=24
mcci_catena_4802.menu.sysclk.hsi16m.build.sysclk_flags=-DCATENA_CFG_SYSCLK=16
mcci_catena_4802.menu.sysclk.msi4194k.build.sysclk_flags=-DCATENA_CFG_SYSCLK=4
mcci_catena_4802.menu.sysclk.msi2097k.build.sysclk_flags=-DCATENA_CFG_SYSCLK=2

#
# menu.opt
mcci_catena_4802.menu.opt.osstd=Smallest (-Os default)
mcci_catena_4802.menu.opt.osstd.build.flags.optimize=-Os
mcci_catena_4802.menu.opt.osstd.build.flags.ldspecs=
# mcci_catena_4802.menu.opt.oslto=Smallest (-Os) with LTO
# mcci_catena_4802.menu.opt.oslto.build.flags.optimize=-Os -flto
# mcci_catena_4802.menu.opt.oslto.build.flags.ldspecs=-flto
mcci_catena_4802.menu.opt.o1std=Fast (-O1)
mcci_catena_4802.menu.opt.o1std.build.flags.optimize=-O1
mcci_catena_4802.menu.opt.o1std.build.flags.ldspecs=
# mcci_catena_4802.menu.opt.o1lto=Fast (-O1) with LTO
# mcci_catena_4802.menu.opt.o1lto.build.flags.optimize=-O1 -flto
# mcci_catena_4802.menu.opt.o1lto.build.flags.ldspecs=-flto
mcci_catena_4802.menu.opt.o2std=Faster (-O2)
mcci_catena_4802.menu.opt.o2std.build.flags.optimize=-O2
mcci_catena_4802.menu.opt.o2std.build.flags.ldspecs=
# mcci_catena_4802.menu.opt.o2lto=Faster (-O2) with LTO
# mcci_catena_4802.menu.opt.o2lto.build.flags.optimize=-O2 -flto
# mcci_catena_4802.menu.opt.o2lto.build.flags.ldspecs=-flto
mcci_catena_4802.menu.opt.o3std=Fastest (-O3)
mcci_catena_4802.menu.opt.o3std.build.flags.optimize=-O3
mcci_catena_4802.menu.opt.o3std.build.flags.ldspecs=
# mcci_catena_4802.menu.opt.o3lto=Fastest (-O3) with LTO
# mcci_catena_4802.menu.opt.o3lto.build.flags.optimize=-O3 -flto
# mcci_catena_4802.menu.opt.o3lto.build.flags.ldspecs=-flto
mcci_catena_4802.menu.opt.ogstd=Debug (-g)
mcci_catena_4802.menu.opt.ogstd.build.flags.optimize=-Og -gdwarf-2
mcci_catena_4802.menu.opt.ogstd.build.flags.ldspecs=

#
# menu.lorawan_region
mcci_catena_4802.menu.lorawan_region.us915=North America 915 MHz
mcci_catena_4802.menu.lorawan_region.eu868=Europe 868 MHz
mcci_catena_4802.menu.lorawan_region.au915=Australia 915 MHz
mcci_catena_4802.menu.lorawan_region.as923=Asia 923 MHz
mcci_catena_4802.menu.lorawan_region.as923jp=Japan 923 MHz
mcci_catena_4802.menu.lorawan_region.kr920=Korea 920 MHz
mcci_catena_4802.menu.lorawan_region.in866=India 866 MHz
mcci_catena_4802.menu.lorawan_region.projcfg=Use arduino-lmic/project_config/lmic_project_lmic_config_preconditions.h
mcci_catena_4802.menu.lorawan_region.us915.build.lorawan_flags=-DCFG_us915=1 -DCFG_sx1276_radio=1 -DARDUINO_LMIC_PROJECT_CONFIG_H=lmic_config_preconditions.h
mcci_catena_4802.menu.lorawan_region.eu868.build.lorawan_flags=-DCFG_eu868=1 -DCFG_sx1276_radio=1 -DARDUINO_LMIC_PROJECT_CONFIG_H=lmic_config_preconditions.h
mcci_catena_4802.menu.lorawan_region.au915.build.lorawan_flags=-DCFG_au921=1 -DCFG_au915=1 -DCFG_sx1276_radio=1 -DARDUINO_LMIC_PROJECT_CONFIG_H=lmic_config_preconditions.h
mcci_catena_4802.menu.lorawan_region.as923.build.lorawan_flags=-DCFG_as923=1 -DCFG_sx1276_radio=1 -DARDUINO_LMIC_PROJECT_CONFIG_H=lmic_config_preconditions.h
mcci_catena_4802.menu.lorawan_region.as923jp.build.lorawan_flags=-DCFG_as923=1 -DLMIC_COUNTRY_CODE=LMIC_COUNTRY_CODE_JP -DCFG_sx1276_radio=1 -DARDUINO_LMIC_PROJECT_CONFIG_H=lmic_config_preconditions.h
mcci_catena_4802.menu.lorawan_region.kr920.build.lorawan_flags=-DCFG_kr920=1 -DCFG_sx1276_radio=1 -DARDUINO_LMIC_PROJECT_CONFIG_H=lmic_config_preconditions.h
mcci_catena_4802.menu.lorawan_region.in866.build.lorawan_flags=-DCFG_in866=1 -DCFG_sx1276_radio=1 -DARDUINO_LMIC_PROJECT_CONFIG_H=lmic_config_preconditions.h
mcci_catena_4802.menu.lorawan_region.projcfg.build.lorawan_flags=

#
# menu.lorawan_network
mcci_catena_4802.menu.lorawan_network.ttn=The Things Network
mcci_catena_4802.menu.lorawan_network.ttn.build.lorawan_network_flags=-DARDUINO_LMIC_CFG_NETWORK_TTN=1
mcci_catena_4802.menu.lorawan_network.actility=Actility ThingsPark
mcci_catena_4802.menu.lorawan_network.actility.build.lorawan_network_flags=-DARDUINO_LMIC_CFG_NETWORK_ACTILITY=1
mcci_catena_4802.menu.lorawan_network.helium=Helium
mcci_catena_4802.menu.lorawan_network.helium.build.lorawan_network_flags=-DARDUINO_LMIC_CFG_NETWORK_HELIUM=1
mcci_catena_4802.menu.lorawan_network.machineq=machineQ
mcci_catena_4802.menu.lorawan_network.machineq.build.lorawan_network_flags=-DARDUINO_LMIC_CFG_NETWORK_MACHINEQ=1
mcci_catena_4802.menu.lorawan_network.senet=Senet
mcci_catena_4802.menu.lorawan_network.senet.build.lorawan_network_flags=-DARDUINO_LMIC_CFG_NETWORK_SENET=1
mcci_catena_4802.menu.lorawan_network.senra=Senra
mcci_catena_4802.menu.lorawan_network.senra.build.lorawan_network_flags=-DARDUINO_LMIC_CFG_NETWORK_SENRA=1
mcci_catena_4802.menu.lorawan_network.swisscom=Swisscom
mcci_catena_4802.menu.lorawan_network.swisscom.build.lorawan_network_flags=-DARDUINO_LMIC_CFG_NETWORK_SWISSCOM=1
mcci_catena_4802.menu.lorawan_network.chirpstack=ChirpStack
mcci_catena_4802.menu.lorawan_network.chirpstack.build.lorawan_network_flags=-DARDUINO_LMIC_CFG_NETWORK_CHIRPSTACK=1
mcci_catena_4802.menu.lorawan_network.generic=Generic
mcci_catena_4802.menu.lorawan_network.generic.build.lorawan_network_flags=-DARDUINO_LMIC_CFG_NETWORK_GENERIC=1
mcci_catena_4802.menu.lorawan_network.projcfg=Use arduino-lmic/project_config/lmic_project_lmic_config_preconditions.h
mcci_catena_4802.menu.lorawan_network.projcfg.build.lorawan_network_flags=

#
# menul.lorawan_subband
mcci_catena_4802.menu.lorawan_subband.default=Default, works everywhere
mcci_catena_4802.menu.lorawan_subband.default.build.lorawan_subband_flags=-DARDUINO_LMIC_CFG_SUBBAND=-1
mcci_catena_4802.menu.lorawan_subband.sb0=sb0, ch 0~7 (US/AU/CN470)
mcci_catena_4802.menu.lorawan_subband.sb0.build.lorawan_subband_flags=-DARDUINO_LMIC_CFG_SUBBAND=0
mcci_catena_4802.menu.lorawan_subband.sb1=sb1, ch 8~15 (US/AU/CN470)
mcci_catena_4802.menu.lorawan_subband.sb1.build.lorawan_subband_flags=-DARDUINO_LMIC_CFG_SUBBAND=1
mcci_catena_4802.menu.lorawan_subband.sb2=sb2, ch 16~23 (US/AU/CN470)
mcci_catena_4802.menu.lorawan_subband.sb2.build.lorawan_subband_flags=-DARDUINO_LMIC_CFG_SUBBAND=2
mcci_catena_4802.menu.lorawan_subband.sb3=sb3, ch 24~31 (US/AU/CN470)
mcci_catena_4802.menu.lorawan_subband.sb3.build.lorawan_subband_flags=-DARDUINO_LMIC_CFG_SUBBAND=3
mcci_catena_4802.menu.lorawan_subband.sb4=sb4, ch 32~39 (US/AU/CN470)
mcci_catena_4802.menu.lorawan_subband.sb4.build.lorawan_subband_flags=-DARDUINO_LMIC_CFG_SUBBAND=4
mcci_catena_4802.menu.lorawan_subband.sb5=sb5, ch 40~47 (US/AU/CN470)
mcci_catena_4802.menu.lorawan_subband.sb5.build.lorawan_subband_flags=-DARDUINO_LMIC_CFG_SUBBAND=5
mcci_catena_4802.menu.lorawan_subband.sb6=sb6, ch 48~55 (US/AU/CN470)
mcci_catena_4802.menu.lorawan_subband.sb6.build.lorawan_subband_flags=-DARDUINO_LMIC_CFG_SUBBAND=6
mcci_catena_4802.menu.lorawan_subband.sb7=sb7, ch 56~63 (US/AU/CN470)
mcci_catena_4802.menu.lorawan_subband.sb7.build.lorawan_subband_flags=-DARDUINO_LMIC_CFG_SUBBAND=7
mcci_catena_4802.menu.lorawan_subband.sb8=sb8, ch 64~71 (CN470)
mcci_catena_4802.menu.lorawan_subband.sb8.build.lorawan_subband_flags=-DARDUINO_LMIC_CFG_SUBBAND=8
mcci_catena_4802.menu.lorawan_subband.sb9=sb9, ch 72~79 (CN470)
mcci_catena_4802.menu.lorawan_subband.sb9.build.lorawan_subband_flags=-DARDUINO_LMIC_CFG_SUBBAND=9
mcci_catena_4802.menu.lorawan_subband.sb10=sb10, ch 80~87 (CN470)
mcci_catena_4802.menu.lorawan_subband.sb10.build.lorawan_subband_flags=-DARDUINO_LMIC_CFG_SUBBAND=10
mcci_catena_4802.menu.lorawan_subband.sb11=sb11, ch 88~95 (CN470)
mcci_catena_4802.menu.lorawan_subband.sb11.build.lorawan_subband_flags=-DARDUINO_LMIC_CFG_SUBBAND=11

#### end of configuration info for MCCI Catena 4802

2 changes: 1 addition & 1 deletion cores/arduino/Arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#define _mcci_arduino_version_calc(major, minor, patch, local) \
(((major) << 24u) | ((minor) << 16u) | ((patch) << 8u) | (local))

#define _mcci_arduino_version _mcci_arduino_version_calc(2, 7, 0, 0) /* v2.7.0.0 */
#define _mcci_arduino_version _mcci_arduino_version_calc(2, 8, 0, 0) /* v2.8.0.0 */

#define _mcci_arduino_version_get_major(v) \
(((v) >> 24u) & 0xFFu)
Expand Down
2 changes: 1 addition & 1 deletion platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification

name=MCCI Catena STM32 Boards
version=2.7.0
version=2.8.0

# STM compile variables
# ----------------------
Expand Down
Loading

0 comments on commit f8c1f7d

Please sign in to comment.