diff --git a/config/diagrams/m-hat.json b/config/diagrams/m-hat.json new file mode 100644 index 0000000000..60246cf8ef --- /dev/null +++ b/config/diagrams/m-hat.json @@ -0,0 +1,130 @@ +{ + "id": "m-hat", + "labels": [ + { + "id": "usb", + "label": "1", + "title": "USB-C", + "x": 276, + "y": 1011 + }, + { + "id": "pd-led", + "label": "2", + "title": "USB-C PD LED", + "x": 396, + "y": 1011 + }, + { + "id": "dc-in", + "label": "3", + "title": "DC IN", + "x": 506, + "y": 1011 + }, + { + "id": "chg-led", + "label": "4", + "title": "Charge LED", + "x": 601, + "y": 1011 + }, + { + "id": "bat-conn", + "label": "5", + "title": "LiPo Battery", + "x": 712, + "y": 1011 + }, + { + "id": "ioex-conn", + "label": "6", + "title": "I/O Expansion", + "x": 935, + "y": 1011 + }, + { + "id": "rtc-conn", + "label": "7", + "title": "RTC Battery", + "x": 1177, + "y": 1011 + }, + { + "id": "grove-conn", + "label": "8", + "title": "Grove connector", + "x": 1382, + "y": 861 + }, + { + "id": "qwiic-conn", + "label": "9", + "title": "Qwiic connector", + "x": 932, + "y": 845 + }, + { + "id": "sma-gnss", + "label": "10", + "title": "SMA connector - GNSS", + "x": 1538, + "y": 671 + }, + { + "id": "sma-ble", + "label": "11", + "title": "SMA connector - BLE", + "x": 1538, + "y": 453 + }, + { + "id": "sma-cellular", + "label": "12", + "title": "SMA connector - Cellular", + "x": 1538, + "y": 228 + }, + { + "id": "reset-button", + "label": "13", + "title": "Particle RESET button", + "x": 1173, + "y": 89 + }, + { + "id": "hat", + "label": "14", + "title": "Raspberry Pi HAT 40-pin connector", + "x": 604, + "y": 172 + }, + { + "id": "m2-som", + "label": "15", + "title": "Particle M.2 SoM", + "x": 624, + "y": 500 + }, + { + "id": "mode-button", + "label": "16", + "title": "Particle MODE button", + "x": 60, + "y": 709 + }, + { + "id": "rgb-led", + "label": "17", + "title": "Particle RGB LED", + "x": 60, + "y": 788 + } + ], + "labelSets": [], + "config": { + "height": 1045, + "width": 1600, + "labelDiameter": 60 + } +} \ No newline at end of file diff --git a/config/sitemap.json b/config/sitemap.json index fcf7a382e0..cd94af7ee7 100644 --- a/config/sitemap.json +++ b/config/sitemap.json @@ -927,8 +927,8 @@ "hash": "8b9c0a383d0a23e8cec201d0cc62f82e97c902a354cd0fdccb5c62d59e677fea" }, "hardware/certification/antenna.md": { - "date": "2025-04-16", - "hash": "db9fd042b223436aa14252853d491bcefdc5e0721ecd36075c1d0298b2da8606" + "date": "2025-04-28", + "hash": "5fa71c3e185df05260f9890fd7295445289e5c0e7050b185d72e1f6dae86909b" }, "hardware/certification/battery-certification.md": { "date": "2023-09-01", @@ -8395,8 +8395,8 @@ "date": "2025-04-10" }, "reference/datasheets/m-series/muon-datasheet.md": { - "hash": "c9bacf81a2b2c52062c56322c9b889415104c597ceb51e1c2f2b67184d41ef49", - "date": "2025-04-01" + "hash": "b4240e4ef581bfe7b075e664af76e5a33cbdc7dc115b8e1f11dd86a6df786bb4", + "date": "2025-04-22" }, "hardware/expansion/monitor-one-muon-cards.md": { "hash": "c3972720c018e02b6de030bb3e83fd5d238fe52770d6768c9b43282dceeb3c62", @@ -9459,8 +9459,8 @@ "date": "2024-11-01" }, "reference/datasheets/m-series/m1-enclosure-datasheet.md": { - "hash": "55bd1c2cb4b7379251deb05c78ed7a08c0873a6129078cd39587475fff8ccef6", - "date": "2025-04-01" + "hash": "58101fc62021a5d29cd6cb2619f091635d9a3b0455b92476904c91f6f73e42a8", + "date": "2025-04-22" }, "reference/device-os/libraries/a/Adafruit_SSD1305_RK.md": { "hash": "0d2103aed0bae02ca0b94dc8bff2c011e9c5f7c3311ba47cb535ac613e3705b4", @@ -9703,8 +9703,8 @@ "date": "2025-03-03" }, "reference/datasheets/tachyon/tachyon-datasheet.md": { - "hash": "c171df98a2b559148f75d34fa0b8e558ef48f1dccc1bbdcf273dfb9d45e61b67", - "date": "2025-03-06" + "hash": "bcf1d246a004039597a7f5c711bf30a368502de5cbb6f3a5134205d99fe2f43f", + "date": "2025-04-21" }, "hardware/migration-guides/b404-b504-migration-guide.md": { "hash": "7e2540bf721eee32ac6be96598bb76a4f162b6f8c52984d817ccfd28e729b7ad", diff --git a/scripts/carriers-update/carriers-update.js b/scripts/carriers-update/carriers-update.js index de05f5c8fa..182457528d 100644 --- a/scripts/carriers-update/carriers-update.js +++ b/scripts/carriers-update/carriers-update.js @@ -2814,16 +2814,20 @@ const generatorConfig = require('./generator-config'); title: ' ', }); } - tableOptions.columns.push({ - key: 'analogWritePWM', - title: 'PWM', - align: 'center', - onlyCheckmark: true, - }); - tableOptions.columns.push({ - key: 'hardwarePin', - title: 'MCU' - }); + if (!options.noPWM) { + tableOptions.columns.push({ + key: 'analogWritePWM', + title: 'PWM', + align: 'center', + onlyCheckmark: true, + }); + } + if (!options.noHardwarePin) { + tableOptions.columns.push({ + key: 'hardwarePin', + title: 'MCU' + }); + } if (options.includeDesc) { tableOptions.columns.push({ key: 'desc', diff --git a/scripts/carriers-update/generator-config.js b/scripts/carriers-update/generator-config.js index 30bdaf5079..d660129b19 100644 --- a/scripts/carriers-update/generator-config.js +++ b/scripts/carriers-update/generator-config.js @@ -5275,6 +5275,355 @@ const schemaDocs = require('./schema-docs'); }); } }, + // M-HAT + { + // SKU list MHAT + guid:'47e37393-b9c0-4b04-9da6-e54cb2227cd1', + generatorFn:function(updater) { + return updater.generateSkuList({ + columns: ['name', 'desc', 'region', 'lifecycle'], + filterFn:function(skuObj) { + return !skuObj.name.startsWith('MHAT'); + } + }); + } + }, + { + guid: '5c7622c6-ae73-4a5b-88b6-e761ee69fa3f', + generatorFn:function(updater){ + return updater.generatePinInfo({ + style: 'pinFunction', + platformNew: 'm-hat-m2', + noPinNumbers: true, + sortByNum: false, + includeDesc: false, + noPWM: true, + noHardwarePin: true, + // pinFilterFn return true to hide pin + rightColumns: [ + { + key: 'net', + title: 'Schematic net' + }, + { + key: 'direction', + title: 'MCU direction' + }, + { + key: 'connectedTo', + title: 'Connected to' + }, + { + key: 'desc', + title: 'Description' + }, + { + key: 'num', + title: 'M.2 pin' + }, + ], + functionCols: [], + }); + } + }, + { + guid: 'bf89b87e-f66f-4de9-9a5e-fc88a792cf7b', + generatorFn:function(updater){ + return updater.generatePinInfo({ + style: 'pinFunction', + platformNew: 'm-hat-m2', + noPinNumbers: false, + sortByNum: true, + includeDesc: false, + noPWM: true, + noHardwarePin: true, + pinFilterFn: function(pinObj) { + return pinObj.connectedTo != 'IOEX connector'; + }, + rightColumns: [ + { + key: 'net', + title: 'Schematic net' + }, + { + key: 'direction', + title: 'MCU direction' + }, + { + key: 'desc', + title: 'Description' + }, + ], + functionCols: [], + }); + } + }, + { + guid: '3f9e11ff-5582-435d-af08-5e087b63414b', + generatorFn:function(updater){ + return updater.generatePinInfo({ + style: 'pinFunction', + platformNew: 'm-hat-m2', + noPinNumbers: false, + sortByNum: true, + includeDesc: false, + noPWM: true, + noHardwarePin: true, + pinFilterFn: function(pinObj) { + return pinObj.connectedTo != 'STUSB4500'; + }, + rightColumns: [ + { + key: 'net', + title: 'Schematic net' + }, + { + key: 'direction', + title: 'MCU direction' + }, + { + key: 'desc', + title: 'Description' + }, + ], + functionCols: [], + }); + } + }, + { + guid: 'f6622f00-cc13-43e4-99d4-c955ed253710', + generatorFn:function(updater){ + return updater.generatePinInfo({ + style: 'pinFunction', + platformNew: 'm-hat-m2', + noPinNumbers: false, + sortByNum: true, + includeDesc: false, + noPWM: true, + noHardwarePin: true, + pinFilterFn: function(pinObj) { + return pinObj.connectedTo != 'TMP112A'; + }, + rightColumns: [ + { + key: 'net', + title: 'Schematic net' + }, + { + key: 'direction', + title: 'MCU direction' + }, + { + key: 'desc', + title: 'Description' + }, + ], + functionCols: [], + }); + } + }, + { + guid: 'f77388d6-01aa-4a52-afa9-8d05985c5907', + generatorFn:function(updater){ + return updater.generatePinInfo({ + style: 'pinFunction', + platformNew: 'm-hat-m2', + noPinNumbers: false, + sortByNum: true, + includeDesc: false, + noPWM: true, + noHardwarePin: true, + pinFilterFn: function(pinObj) { + return !pinObj.connectedTo.startsWith('Grove'); + }, + rightColumns: [ + { + key: 'net', + title: 'Schematic net' + }, + { + key: 'direction', + title: 'MCU direction' + }, + { + key: 'desc', + title: 'Description' + }, + ], + functionCols: [], + }); + } + }, + { + guid: 'e37904f1-301c-4f2b-97a9-3bab92a6acd3', + generatorFn:function(updater){ + return updater.generatePinInfo({ + style: 'pinFunction', + platformNew: 'm-hat-m2', + noPinNumbers: false, + sortByNum: true, + includeDesc: false, + noPWM: true, + noHardwarePin: true, + pinFilterFn: function(pinObj) { + return pinObj.connectedTo != 'AB1805'; + }, + rightColumns: [ + { + key: 'net', + title: 'Schematic net' + }, + { + key: 'direction', + title: 'MCU direction' + }, + { + key: 'desc', + title: 'Description' + }, + ], + functionCols: [], + }); + } + }, + { + guid: 'cc5c6247-5bdb-43bd-8b18-24954f4adea4', + generatorFn:function(updater){ + return updater.generatePinInfo({ + style: 'pinFunction', + platformNew: 'm-hat-m2', + noPinNumbers: false, + sortByNum: true, + includeDesc: false, + noPWM: true, + noHardwarePin: true, + pinFilterFn: function(pinObj) { + return pinObj.connectedTo != 'PM-BAT'; + }, + rightColumns: [ + { + key: 'net', + title: 'Schematic net' + }, + { + key: 'direction', + title: 'MCU direction' + }, + { + key: 'desc', + title: 'Description' + }, + ], + functionCols: [], + }); + } + }, + { + guid: '7f56ea43-30ef-4cb1-988a-3d7e31247bc9', + generatorFn:function(updater){ + return updater.generatePinInfo({ + style: 'pinFunction', + platformNew: 'm-hat-m2', + noPinNumbers: false, + sortByNum: true, + includeDesc: false, + noPWM: true, + noHardwarePin: true, + pinFilterFn: function(pinObj) { + return pinObj.connectedTo != 'FSA2567'; + }, + rightColumns: [ + { + key: 'net', + title: 'Schematic net' + }, + { + key: 'direction', + title: 'MCU direction' + }, + { + key: 'desc', + title: 'Description' + }, + ], + functionCols: [], + }); + } + }, + { + guid: 'f90b1182-87f3-4aa6-8599-01504bfdff97', + generatorFn:function(updater){ + return updater.generatePinInfo({ + style: 'pinFunction', + platformNew: 'm-hat-m2', + noPinNumbers: false, + sortByNum: true, + includeDesc: false, + noPWM: true, + noHardwarePin: true, + pinFilterFn: function(pinObj) { + // return pinObj.connectedTo != 'DML3006'; + return !pinObj.net.match(/EN[0-9]_CTR/); + }, + rightColumns: [ + { + key: 'net', + title: 'Schematic net' + }, + { + key: 'direction', + title: 'MCU direction' + }, + { + key: 'desc', + title: 'Description' + }, + ], + functionCols: [], + }); + } + }, + { + guid: '04c52083-eb85-46a7-b2a7-c366be119571', + generatorFn:function(updater){ + return updater.generatePinInfo({ + style: 'pinFunction', + platformNew: 'm-hat-m2', + noPinNumbers: true, // num is M.2 pin number, which doesn't make sense + sortByNum: true, + includeDesc: false, + noPWM: true, + noHardwarePin: true, + pinFilterFn: function(pinObj) { + return pinObj.connectedTo != 'HAT'; + }, + rightColumns: [ + { + key: 'net', + title: 'Schematic net' + }, + { + key: 'direction', + title: 'MCU direction' + }, + { + key: 'desc', + title: 'Description' + }, + { + key: 'rpiGPIO', + title: 'Pi Pin', + }, + { + key: 'rpiFunction', + title: 'Pi Function', + } + ], + functionCols: [], + }); + } + }, + // Tethering { guid:'7dc335b7-4ddc-464d-ae96-6231944ccc76', diff --git a/scripts/pinmap-diagram/pinmap-diagram.js b/scripts/pinmap-diagram/pinmap-diagram.js index d191b36279..42a107a121 100644 --- a/scripts/pinmap-diagram/pinmap-diagram.js +++ b/scripts/pinmap-diagram/pinmap-diagram.js @@ -69,6 +69,9 @@ const svg = require('./svg'); diagram.expandMorePins(diagram.morePlatforms[key].pins); } } + if (options.mergePlatforms) { + options.mergePlatforms(diagram, options); + } if (options.comparePlatform) { diagram.comparePlatformInfo = diagram.pinInfo.platforms.find(e => e.name == options.comparePlatform); @@ -979,7 +982,41 @@ const svg = require('./svg'); await diagram.generate(options, files); }; - diagram.generateM2SoM = async function(generateOptions, files) { + diagram.generateM2SoM = async function(generateOptions, files) { + let defaultColumns = [ + { + width: 30, + keys: ['num'], + }, + { + width: 60, + keys: ['somPin'], + }, + { + width: 60, + keys: ['name'], + }, + { + width: 30, + keys: ['altName'], + }, + { + keys: ['isPower', 'isControl', 'i2c', 'swd'], + }, + { + keys: ['serial'], + }, + { + keys: ['spi', 'hardwareADC'], + }, + { + keys: ['analogWritePWM'], + }, + { + keys: ['hardwarePin'], + }, + ]; + let options = Object.assign(Object.assign(Object.assign({}, generateOptions, diagram.optionsCommon)), { platformName: generateOptions.platformName, // deviceImage: @@ -998,39 +1035,7 @@ const svg = require('./svg'); count: 75, xDir: -1, yDir: 0, - columns: [ - { - width: 30, - keys: ['num'], - }, - { - width: 60, - keys: ['somPin'], - }, - { - width: 60, - keys: ['name'], - }, - { - width: 30, - keys: ['altName'], - }, - { - keys: ['isPower', 'isControl', 'i2c', 'swd'], - }, - { - keys: ['serial'], - }, - { - keys: ['spi', 'hardwareADC'], - }, - { - keys: ['analogWritePWM'], - }, - { - keys: ['hardwarePin'], - }, - ], + columns: generateOptions.columns || defaultColumns, }, { // Right side num: 1, @@ -1042,39 +1047,7 @@ const svg = require('./svg'); count: 75, xDir: 1, yDir: 0, - columns: [ - { - width: 30, - keys: ['num'], - }, - { - width: 60, - keys: ['somPin'], - }, - { - width: 60, - keys: ['name'], - }, - { - width: 30, - keys: ['altName'], - }, - { - keys: ['isPower', 'isControl', 'i2c', 'swd'], - }, - { - keys: ['serial'], - }, - { - keys: ['spi', 'hardwareADC'], - }, - { - keys: ['analogWritePWM'], - }, - { - keys: ['hardwarePin'], - }, - ], + columns: generateOptions.columns || defaultColumns, }, ], incrementFn: function(num) { @@ -1969,6 +1942,66 @@ const svg = require('./svg'); await diagram.generate(options, files); } + // Generate image of 10-pin debug connector (also used for M-HAT IOEX) + diagram.generateDebug10 = async function(generateOptions, files) { + + let defaultOptions = { + // platformName: generateOptions.platformName, + // outputPath: generateOptions.outputPath, + width: 1000, + height: 200, + background: 'white', + pins: [ + { // Left side + num: 1, + x: 498, + y: 50, + numDelta: 2, + xDelta: 0, + yDelta: 21, + count: 5, + xDir: -1, + yDir: 0, + columns: generateOptions.columns, + }, + { // Right side + num: 2, + x: 502, + y: 50, + numDelta: 2, + xDelta: 0, + yDelta: 21, + count: 5, + xDir: 1, + yDir: 0, + columns: generateOptions.columns, + }, + ], + preDraw: function(options) { + options.draw.circle({ + cx: 485, + cy: 26, + r: 5, + fill: '#E6AB00', // gold + stroke: '#E6AB00', // gold + 'stroke-width': 1, + }); + + options.draw.path({ + d: 'M467 40 L467 35 L534 35 L534 147 L467 147 L467 100 M467 82 L467 40', + fill: 'none', + stroke: '#808080', + 'stroke-width': 2, + }); + + }, + } + + let options = Object.assign({}, diagram.optionsCommon, defaultOptions, generateOptions); + + + await diagram.generate(options, files); + } diagram.generatePi = async function(generateOptions, files) { @@ -2013,6 +2046,7 @@ const svg = require('./svg'); await diagram.generate(options, files); } + // Similar to generate pi, but rotated 90 CCW diagram.generateTachyon = async function(generateOptions, files) { @@ -2782,7 +2816,111 @@ const svg = require('./svg'); } + // M-HAT + await diagram.generateTachyon(Object.assign({ + platformName: 'm-hat', + columns: [ + { + width: 20, + keys: ['num'], + }, + { + width: 50, + keys: ['name'], + }, + { + width: 20, + keys: ['m2Pin'], + }, + { + width: 50, + keys: ['m2Name'], + }, + ], + outputPath: 'assets/images/m-hat/m-hat-pins.svg', + featureColorsOverride: { + name: '#CD2355', // Raspberry Pi color + m2Pin: '#5CECFF', // Particle blue + m2Name: '#5CECFF', // Particle blue + }, + }, generateOptions), files); + + await diagram.generateDebug10(Object.assign({ + platformName: 'm-hat-ioex', + columns: [ + { + width: 20, + keys: ['num'], + }, + { + width: 10, + keys: [], // Filler to leave space for connector boundary + }, + { + width: 50, + keys: ['name'], + }, + { + width: 50, + keys: ['net'], + }, + ], + outputPath: 'assets/images/m-hat/m-hat-ioex.svg', + featureColorsOverride: { + name: '#5CECFF', // Particle blue + }, + }, generateOptions), files); + + await diagram.generateM2SoM(Object.assign(Object.assign({}, generateOptions), { + platformName: 'm-hat-m2', + outputPath: 'assets/images/m-hat/m-hat-m2.svg', + columns: [ + { + width: 20, + keys: ['num'], + }, + { + width: 50, + keys: ['name', 'baseName'], + }, + { + width: 80, + keys: ['connectedTo'], + }, + { + width: 50, + keys: ['rpiFunction'], + }, + ], + featureColorsOverride: { + rpiFunction: '#CD2355', // Raspberry Pi color + baseName: '#D9F2F7', // @COLOR_Sky_500 + }, + mergePlatforms: function(diagram, options) { + basePinInfo = diagram.pinInfo.platforms.find(e => e.name == 'B5xx SoM'); + diagram.expandMorePins(basePinInfo.pins); + + // console.log('mergePlatforms', {diagram, options, basePinInfo}); + for(const basePin of basePinInfo.pins) { + if (!diagram.platformInfo.pins.find(e => e.num == basePin.num)) { + diagram.platformInfo.pins.push({ + num: basePin.num, + baseName: basePin.name, + }); + } + } + diagram.platformInfo.pins.sort(function(a, b) { + return a.num - b.num; + }); + + // console.log('pins after', diagram.platformInfo.pins); + }, + }), files); + + // + // M2 eval + // await diagram.generateM2Eval(Object.assign(Object.assign({}, generateOptions), { platformName: 'M.2 SoM breakout board header, B-SoM', outputPath: 'assets/images/pi/eval-serial.svg', diff --git a/scripts/update-shared.js b/scripts/update-shared.js index 59bdb96c16..840a0b331f 100644 --- a/scripts/update-shared.js +++ b/scripts/update-shared.js @@ -388,7 +388,7 @@ async function run(files, metalsmith) { continue; } - newContent += '| ' + labelObj.label + ' | ' + labelObj.title + ' |\n'; + newContent += '| ' + labelObj.label + ' | ' + labelObj.title + ' | \n'; } m.newContent = newContent; @@ -422,9 +422,26 @@ async function run(files, metalsmith) { } } if (f.newContent && f.content != f.newContent) { + const oldFileContents = fs.readFileSync(f.fsPath, 'utf8'); + + let separatorCount = 0; + let frontMatter = ''; + for(const line of oldFileContents.split(/\n/)) { + frontMatter += line + '\n'; + + if (line == '---') { + separatorCount++; + + if (separatorCount == 2) { + break; + } + } + } + console.log('update file', f.relativePath); files[f.relativePath].content = Buffer.from(f.newContent, 'utf8'); - fs.writeFileSync(f.fsPath, f.newContent); + + fs.writeFileSync(f.fsPath, frontMatter + f.newContent); } } // console.log('blurbs', updater.blurbs); diff --git a/src/assets/files/carriers.json b/src/assets/files/carriers.json index 55d088a82b..f3b61ec51a 100644 --- a/src/assets/files/carriers.json +++ b/src/assets/files/carriers.json @@ -29502,7 +29502,8 @@ "retail": false, "usb": "c", "batteryConn": "jst-ph-3", - "batteryRequired": false + "batteryRequired": false, + "skuRegion": "noram" }, { "name": "MHAT524e", @@ -29513,7 +29514,8 @@ "retail": false, "usb": "c", "batteryConn": "jst-ph-3", - "batteryRequired": false + "batteryRequired": false, + "skuRegion": "emeaa" }, { "name": "MON404E01C01KIT", diff --git a/src/assets/files/pinInfo.json b/src/assets/files/pinInfo.json index 3bbaac7635..04b054eb90 100644 --- a/src/assets/files/pinInfo.json +++ b/src/assets/files/pinInfo.json @@ -299,6 +299,773 @@ } ], "platforms": [ + { + "id": 0, + "name": "m-hat", + "pins": [ + { + "num": 1, + "name": "3V3", + "desc": "3.3V power", + "isPower": true, + "morePins": [ + 17 + ], + "net": "3V3_RPI" + }, + { + "num": 2, + "name": "5V", + "desc": "5V power", + "isPower": true, + "morePins": [ + 4 + ] + }, + { + "num": 3, + "name": "GPIO2", + "desc": "GPIO2, SDA", + "isIO": true, + "rpiGPIO": 2 + }, + { + "num": 5, + "name": "GPIO3", + "desc": "GPIO3, SCL", + "isIO": true, + "rpiGPIO": 3 + }, + { + "num": 6, + "name": "GND", + "desc": "Ground", + "isPower": true, + "morePins": [ + 9, + 14, + 20, + 25, + 30, + 34, + 39 + ], + "net": "GND" + }, + { + "num": 7, + "name": "GPIO4", + "desc": "GPIO4, GPCKL0", + "isIO": true, + "m2Name": "CS", + "m2Pin": 48, + "net": "WAKE_RPI_ON/OFF", + "rpiGPIO": 4 + }, + { + "num": 8, + "name": "GPIO14", + "desc": "GPIO14, TXD0", + "isIO": true, + "m2Name": "RXD", + "m2Pin": 38, + "net": "M2_RXD_E", + "rpiGPIO": 14, + "serial": "UART0_TX", + "uart0": "UART0_TX" + }, + { + "num": 10, + "name": "GPIO15", + "desc": "GPIO15, RXD0", + "isIO": true, + "m2Name": "TXD", + "m2Pin": 36, + "net": "M2_TXD_E", + "rpiGPIO": 15, + "serial": "UART0_RX", + "uart0": "UART0_RX" + }, + { + "num": 11, + "name": "GPIO17", + "desc": "GPIO17", + "isIO": true, + "m2Name": "CTS", + "m2Pin": 40, + "net": "M2_D3/CTS_E", + "rpiGPIO": 17, + "serial": "UART0_RTS", + "uart0": "UART0_RTS" + }, + { + "num": 12, + "name": "GPIO18", + "desc": "GPIO18", + "isIO": true, + "rpiGPIO": 18 + }, + { + "num": 13, + "name": "GPIO27", + "altName": "GPIO27", + "isIO": true, + "rpiGPIO": 27 + }, + { + "num": 15, + "name": "GPIO22", + "desc": "GPIO22", + "isIO": true, + "rpiGPIO": 22 + }, + { + "num": 16, + "name": "GPIO23", + "desc": "GPIO23", + "isIO": true, + "rpiGPIO": 23 + }, + { + "num": 18, + "name": "GPIO24", + "desc": "GPIO24", + "isIO": true, + "rpiGPIO": 24 + }, + { + "num": 19, + "name": "GPIO10", + "desc": "GPIO10, MOSI", + "isIO": true, + "rpiGPIO": 10 + }, + { + "num": 21, + "name": "GPIO9", + "desc": "GPIO9, MISO", + "isIO": true, + "rpiGPIO": 9 + }, + { + "num": 22, + "name": "GPIO25", + "desc": "GPIO25", + "isIO": true, + "rpiGPIO": 25 + }, + { + "num": 23, + "name": "GPIO11", + "desc": "GPIO11, SCLK", + "isIO": true, + "rpiGPIO": 11 + }, + { + "num": 24, + "name": "GPIO8", + "desc": "GPIO8, SPI CE0", + "isIO": true, + "rpiGPIO": 8 + }, + { + "num": 26, + "name": "GPIO7", + "desc": "GPIO7, SPI CE1", + "isIO": true, + "rpiGPIO": 7 + }, + { + "num": 27, + "name": "GPIO0", + "desc": "GPIO0, ID_SD", + "i2c": "I2S0_SDA", + "isIO": true, + "rpiGPIO": 0 + }, + { + "num": 28, + "name": "GPIO1", + "desc": "GPIO1 (ID_SC)", + "i2c": "I2S0_SCL", + "isIO": true, + "rpiGPIO": 1 + }, + { + "num": 29, + "name": "GPIO5", + "desc": "GPIO5", + "isIO": true, + "rpiGPIO": 5 + }, + { + "num": 31, + "name": "GPIO6", + "desc": "GPIO6", + "isIO": true, + "rpiGPIO": 6 + }, + { + "num": 32, + "name": "GPIO12", + "desc": "GPIO12, PWM0", + "isIO": true, + "pwm": "PWM0", + "rpiGPIO": 12 + }, + { + "num": 33, + "name": "GPIO13", + "desc": "GPIO13, PWM1", + "isIO": true, + "pwm": "PWM1", + "rpiGPIO": 13 + }, + { + "num": 35, + "name": "GPIO19", + "desc": "GPIO19, PCM_FS", + "i2s": "I2S WS", + "isIO": true, + "rpiGPIO": 19 + }, + { + "num": 36, + "name": "GPIO16", + "desc": "GPIO16", + "isIO": true, + "m2Name": "RTS", + "m2Pin": 42, + "net": "M2_D2/RTS_E", + "rpiGPIO": 16, + "serial": "UART0_CTS", + "uart0": "UART0_CTS" + }, + { + "num": 37, + "name": "GPIO26", + "desc": "GPIO26", + "isIO": true, + "rpiGPIO": 26 + }, + { + "num": 38, + "name": "GPIO20", + "desc": "GPIO20, PCM_DIN", + "isIO": true, + "rpiGPIO": 20 + }, + { + "num": 40, + "name": "GPIO21", + "desc": "GPIO21, PCM_DOUT", + "isIO": true, + "rpiGPIO": 21 + } + ], + "diagram": { + "columns": [ + "num", + "name", + [ + "isPower", + "hardwareADC", + "i2c" + ], + [ + "spi", + "swd" + ], + [], + [ + "hardwareTimer" + ], + [ + "serial" + ], + "hardwarePin" + ] + } + }, + { + "id": 0, + "name": "m-hat-ioex", + "pins": [ + { + "num": 1, + "name": "3V3", + "desc": "3.3V power", + "isPower": true, + "net": "3V3" + }, + { + "num": 2, + "name": "GND", + "desc": "Ground", + "isPower": true, + "net": "GND" + }, + { + "num": 3, + "name": "A5", + "altName": "D14", + "desc": "A5 Analog in, GPIO", + "analogRead": true, + "analogWriteDAC": false, + "analogWritePWM": false, + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "digitalRead": true, + "digitalWrite": true, + "hardwareADC": "ADC7", + "hardwarePin": "P0.31", + "internalPull": "13K", + "is5VTolerant": false, + "isIO": true, + "net": "M2_A5", + "somPin": "RESERVED", + "tone": false + }, + { + "num": 4, + "name": "D23", + "desc": "GPIO", + "analogRead": false, + "analogWriteDAC": false, + "analogWritePWM": false, + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "digitalRead": true, + "digitalWrite": true, + "hardwarePin": "P1.03", + "internalPull": "13K", + "is5VTolerant": false, + "isIO": true, + "net": "M2_D23", + "somPin": "GPIO1", + "tone": false + }, + { + "num": 5, + "name": "A6", + "desc": "A6 Analog in, PWM, GPIO", + "analogRead": true, + "analogWriteDAC": false, + "analogWritePWM": true, + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "digitalRead": true, + "digitalWrite": true, + "hardwareADC": "ADC3", + "hardwarePin": "P0.05", + "hardwareTimer": "PWM2", + "internalPull": "13K", + "is5VTolerant": false, + "isIO": true, + "net": "M2_A6", + "somPin": "RESERVED", + "tone": "A0, A1, A6, and A7 must have the same frequency." + }, + { + "num": 6, + "name": "D24", + "desc": "D24 on M-SoM, NC on B-SoM", + "isIO": true, + "net": "M2_D24" + }, + { + "num": 7, + "name": "SOM14", + "desc": "SOM14 (M.2 Pin 51), NC", + "isIO": true, + "net": "SOM14" + }, + { + "num": 8, + "name": "D25", + "desc": "D25 on M-SoM, NC on B-SoM", + "isIO": true, + "net": "M2_D25" + }, + { + "num": 9, + "name": "SOM17", + "desc": "SOM 17 (M.2 Pin 57), NC", + "isIO": true, + "net": "SOM17" + }, + { + "num": 10, + "name": "D6", + "desc": "PWM, GPIO", + "analogRead": false, + "analogWriteDAC": false, + "analogWritePWM": true, + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "digitalRead": true, + "digitalWrite": true, + "hardwarePin": "P1.04", + "hardwareTimer": "PWM1", + "internalPull": "13K", + "is5VTolerant": false, + "isIO": true, + "net": "M2_D6", + "somPin": "PWM2", + "tone": "D4, D5, and D6 must have the same frequency." + } + ], + "diagram": { + "columns": [ + "num", + "name", + [ + "isPower", + "hardwareADC", + "i2c" + ], + [ + "spi", + "swd" + ], + [], + [ + "hardwareTimer" + ], + [ + "serial" + ], + "hardwarePin" + ] + } + }, + { + "id": 0, + "name": "m-hat-m2", + "pins": [ + { + "num": 17, + "name": "D21", + "desc": "USB PD controller reset, pin is NFC1 on B-SoM", + "connectedTo": "STUSB4500", + "direction": "O", + "isIO": true, + "net": "PD_RST" + }, + { + "num": 19, + "name": "D20", + "desc": "USB PD controller alert, pin is NFC2 on B-SoM", + "connectedTo": "STUSB4500", + "direction": "I", + "isIO": true, + "net": "PD_ALERT" + }, + { + "num": 20, + "name": "SCL", + "desc": "I2C SCL", + "connectedTo": "Multiple", + "direction": "I/O", + "net": "M2_SCL" + }, + { + "num": 22, + "name": "SDA", + "desc": "I2C SDA", + "connectedTo": "Multiple", + "direction": "I/O", + "net": "M2_SDA" + }, + { + "num": 23, + "name": "A0", + "desc": "HIGH to enable SoM to Pi UART", + "connectedTo": "FSA2567", + "digitalWrite": true, + "direction": "O", + "isIO": true, + "net": "SEL" + }, + { + "num": 32, + "name": "MODE", + "desc": "MODE button for Particle SoM", + "connectedTo": "MODE button", + "direction": "I", + "net": "M2/MODE" + }, + { + "num": 33, + "name": "A1", + "desc": "Grove A1, Input, Output, ADC, PWM", + "analogRead": true, + "analogWriteDAC": false, + "analogWritePWM": true, + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "connectedTo": "Grove A1", + "digitalRead": true, + "digitalWrite": true, + "direction": "I/O", + "hardwareADC": "ADC2", + "hardwarePin": "P0.04", + "hardwareTimer": "PWM2", + "internalPull": "13K", + "is5VTolerant": false, + "isIO": true, + "net": "M2_A1/MISO", + "somPin": "ADC1", + "tone": "A0, A1, A6, and A7 must have the same frequency." + }, + { + "num": 34, + "name": "RESET", + "desc": "RESET button for Particle SoM", + "connectedTo": "RESET button", + "direction": "I", + "net": "M2/RESET" + }, + { + "num": 35, + "name": "A2", + "desc": "Grove A2, Input, Output, ADC", + "analogRead": true, + "analogWriteDAC": false, + "analogWritePWM": false, + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "connectedTo": "Grove A2", + "digitalRead": true, + "digitalWrite": true, + "direction": "I/O", + "hardwareADC": "ADC4", + "hardwarePin": "P0.28", + "internalPull": "13K", + "is5VTolerant": false, + "isIO": true, + "net": "M2_A2/SCK", + "somPin": "ADC2", + "tone": false + }, + { + "num": 36, + "name": "TXD", + "desc": "UART serial TXD, connects to Pi UART0 RXD", + "connectedTo": "HAT", + "direction": "O", + "isIO": true, + "net": "M2_TXD", + "rpiFunction": "UART0_RX", + "rpiGPIO": "GPIO15", + "serial": "Serial1 TX|TX. Use Serial1 object.", + "somPin": "TX" + }, + { + "num": 37, + "name": "A3", + "desc": "LiPo to 5V boost converter (HIGH to turn off, default on)", + "connectedTo": "DML3006", + "digitalWrite": true, + "direction": "O", + "isIO": true, + "net": "EN1_CTR" + }, + { + "num": 38, + "name": "RXD", + "desc": "UART serial RXD, connects to Pi UART0 TXD", + "connectedTo": "HAT", + "direction": "I", + "isIO": true, + "net": "M2_RXD", + "rpiFunction": "UART0_TX", + "rpiGPIO": "GPIO14", + "serial": "Serial1 RX|RX. Use Serial1 object.", + "somPin": "RX" + }, + { + "num": 40, + "name": "CTS", + "desc": "UART serial CTS, connects to Pi UART0 RTS", + "connectedTo": "HAT", + "direction": "I", + "isIO": true, + "net": "M2_D3/CTS", + "rpiFunction": "UART0_RTS", + "rpiGPIO": "GPIO17", + "serial": "Serial1 CTS|CTS. Use Serial1 object.", + "somPin": "RESERVED" + }, + { + "num": 41, + "name": "A4", + "desc": "DCIN or USB boost-buck converter (HIGH to turn off, default on)", + "connectedTo": "MP28167", + "digitalWrite": true, + "direction": "O", + "isIO": true, + "net": "EN2_CTR" + }, + { + "num": 42, + "name": "RTS", + "desc": "UART serial RTS, connects to Pi UART0 CTS", + "connectedTo": "HAT", + "direction": "O", + "isIO": true, + "net": "M2_D2/RTS", + "rpiFunction": "UART0_CTS", + "rpiGPIO": "GPIO16", + "serial": "Serial1 RTS|RTS. Use Serial1 object.", + "somPin": "RESERVED" + }, + { + "num": 47, + "name": "A7", + "desc": "PMIC and fuel gauge interrupt output", + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "connectedTo": "PM-BAT", + "digitalRead": true, + "direction": "I", + "isIO": true, + "net": "M2_A7/PMIC_INT" + }, + { + "num": 48, + "name": "CS", + "desc": "Pi power control by GPIO4", + "connectedTo": "HAT", + "digitalWrite": true, + "direction": "O", + "isIO": true, + "net": "WAKE_RPI_CTR", + "rpiFunction": "GPIO4", + "rpiGPIO": "GPIO4" + }, + { + "num": 51, + "name": "SOM14", + "desc": "NC on B-SoM", + "connectedTo": "IOEX connector", + "direction": "I/O", + "net": "SOM14" + }, + { + "num": 57, + "name": "SOM17", + "desc": "NC on B-SoM", + "connectedTo": "IOEX connector", + "direction": "I/O", + "net": "SOM17" + }, + { + "num": 58, + "name": "D24", + "desc": "On IOEX connector, NC on B-SoM", + "connectedTo": "IOEX connector", + "direction": "I/O", + "net": "M2_D24" + }, + { + "num": 59, + "name": "D26", + "desc": "USB PD controller attach interrupt, NC on B-SoM", + "connectedTo": "STUSB4500", + "direction": "I", + "net": "PD_ATTACH" + }, + { + "num": 60, + "name": "D25", + "desc": "On IOEX connector, NC on B-SoM", + "connectedTo": "IOEX connector", + "direction": "I/O", + "net": "M2_D25" + }, + { + "num": 62, + "name": "D22", + "desc": "HIGH when Pi is supplying 3V3 to the HAT connector", + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "connectedTo": "HAT connector", + "digitalRead": true, + "direction": "I", + "isIO": true, + "net": "3V3_DETECTION" + }, + { + "num": 64, + "name": "D23", + "desc": "GPIO on IOEX connector", + "analogRead": false, + "analogWriteDAC": false, + "analogWritePWM": false, + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "connectedTo": "IOEX connector", + "digitalRead": true, + "digitalWrite": true, + "direction": "I/O", + "hardwarePin": "P1.03", + "internalPull": "13K", + "is5VTolerant": false, + "isIO": true, + "net": "M2_D23", + "somPin": "GPIO1", + "tone": false + }, + { + "num": 66, + "name": "D4", + "desc": "Temperature sensor ALERT output", + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "connectedTo": "TMP112A", + "digitalRead": true, + "direction": "I", + "isIO": true, + "net": "TEMP_ALERT" + }, + { + "num": 68, + "name": "D5", + "desc": "RTC/Watchdog FOUT/IRQ output", + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "connectedTo": "AB1805", + "digitalRead": true, + "direction": "I", + "isIO": true, + "net": "RTC_INT" + }, + { + "num": 70, + "name": "D6", + "desc": "PWM, GPIO on IOEX connector", + "analogRead": false, + "analogWriteDAC": false, + "analogWritePWM": true, + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "connectedTo": "IOEX connector", + "digitalRead": true, + "digitalWrite": true, + "direction": "I/O", + "hardwarePin": "P1.04", + "hardwareTimer": "PWM1", + "internalPull": "13K", + "is5VTolerant": false, + "isIO": true, + "net": "M2_D6", + "somPin": "PWM2", + "tone": "D4, D5, and D6 must have the same frequency." + }, + { + "num": 72, + "name": "D7", + "desc": "3V3_AUX power control (HIGH to turn on)", + "connectedTo": "PM-BAT", + "digitalWrite": true, + "direction": "O", + "isIO": true, + "net": "D7/AUX_POWER_EN" + } + ], + "diagram": { + "columns": [] + } + }, { "id": 0, "name": "M.2 SoM breakout board Feather, B-SoM", diff --git a/src/assets/files/tether-mhat.cpp b/src/assets/files/tether-mhat.cpp new file mode 100644 index 0000000000..2ad33323f8 --- /dev/null +++ b/src/assets/files/tether-mhat.cpp @@ -0,0 +1,29 @@ +#include "Particle.h" + +SerialLogHandler logHandler(LOG_LEVEL_INFO); + +SYSTEM_MODE(SEMI_AUTOMATIC); + +SYSTEM_THREAD(ENABLED); + +const pin_t hatUartControlPin = A0; + +void setup() { + // Enable the UART connection to the M-HAT + pinMode(hatUartControlPin, OUTPUT); + digitalWrite(hatUartControlPin, HIGH); + + // Enable Cellular + Cellular.on(); + Cellular.connect(); + + // Bind Tether interface to Serial1 @ 921600 baudrate with default settings (8n1 + RTS/CTS flow control) + Tether.bind(TetherSerialConfig().baudrate(921600).serial(Serial1)); + + // Turn on Tether interface and bring it up + Tether.on(); + Tether.connect(); +} + +void loop() { +} diff --git a/src/assets/files/tether.cpp b/src/assets/files/tether.cpp index af0b9fb7b6..fc7ab8f8e6 100644 --- a/src/assets/files/tether.cpp +++ b/src/assets/files/tether.cpp @@ -1,19 +1,23 @@ #include "Particle.h" -SerialLogHandler dbg(115200, LOG_LEVEL_INFO); +SerialLogHandler logHandler(LOG_LEVEL_INFO); SYSTEM_MODE(SEMI_AUTOMATIC); SYSTEM_THREAD(ENABLED); -/* executes once at startup */ void setup() { // waitUntil(Serial.isConnected); // Enable Cellular Cellular.on(); Cellular.connect(); + // Bind Tether interface to Serial1 @ 921600 baudrate with default settings (8n1 + RTS/CTS flow control) Tether.bind(TetherSerialConfig().baudrate(921600).serial(Serial1)); + + // Without flow control, use this instead: + // Tether.bind(TetherSerialConfig().baudrate(921600).config(SERIAL_8N1).serial(Serial1)); + // Turn on Tether interface and bring it up Tether.on(); Tether.connect(); diff --git a/src/assets/images/m-hat/m-hat-board.png b/src/assets/images/m-hat/m-hat-board.png new file mode 100644 index 0000000000..7bc4cb59a7 Binary files /dev/null and b/src/assets/images/m-hat/m-hat-board.png differ diff --git a/src/assets/images/m-hat/m-hat-ioex.svg b/src/assets/images/m-hat/m-hat-ioex.svg new file mode 100644 index 0000000000..f5edc148d5 --- /dev/null +++ b/src/assets/images/m-hat/m-hat-ioex.svg @@ -0,0 +1,208 @@ + + + + + + + + + + + + + +1 + + + + + +3V3 + + + + + +3V3 + + + + + + + +3 + + + + + +A5 + + + + + +M2_A5 + + + + + + + +5 + + + + + +A6 + + + + + +M2_A6 + + + + + + + +7 + + + + + +SOM14 + + + + + +SOM14 + + + + + + + +9 + + + + + +SOM17 + + + + + +SOM17 + + + + + + + +2 + + + + + +GND + + + + + +GND + + + + + + + +4 + + + + + +D23 + + + + + +M2_D23 + + + + + + + +6 + + + + + +D24 + + + + + +M2_D24 + + + + + + + +8 + + + + + +D25 + + + + + +M2_D25 + + + + + + + +10 + + + + + +D6 + + + + + +M2_D6 + + diff --git a/src/assets/images/m-hat/m-hat-labeled.png b/src/assets/images/m-hat/m-hat-labeled.png new file mode 100644 index 0000000000..d8a6c709a4 Binary files /dev/null and b/src/assets/images/m-hat/m-hat-labeled.png differ diff --git a/src/assets/images/m-hat/m-hat-m2.svg b/src/assets/images/m-hat/m-hat-m2.svg new file mode 100644 index 0000000000..4a720a68fa --- /dev/null +++ b/src/assets/images/m-hat/m-hat-m2.svg @@ -0,0 +1,1140 @@ + + + + + + + + + +2 + + + + + +VCC + + + + + + + +4 + + + + + +VCC + + + + + + + +6 + + + + + +VCC + + + + + + + +8 + + + + + +VCC + + + + + + + +10 + + + + + +3V3 + + + + + + + +12 + + + + + +3V3 + + + + + + + +14 + + + + + +NC + + + + + + + +16 + + + + + +VUSB + + + + + + + +18 + + + + + +NC + + + + + + + +20 + + + + + +SCL + + + + + +Multiple + + + + + + + +22 + + + + + +SDA + + + + + +Multiple + + + + + + + +32 + + + + + +MODE + + + + + +MODE button + + + + + + + +34 + + + + + +RESET + + + + + +RESET button + + + + + + + +36 + + + + + +TXD + + + + + +HAT + + + + + +UART0_RX + + + + + + + +38 + + + + + +RXD + + + + + +HAT + + + + + +UART0_TX + + + + + + + +40 + + + + + +CTS + + + + + +HAT + + + + + +UART0_RTS + + + + + + + +42 + + + + + +RTS + + + + + +HAT + + + + + +UART0_CTS + + + + + + + +44 + + + + + +CELL USBD+ + + + + + + + +46 + + + + + +CELL USBD- + + + + + + + +48 + + + + + +CS + + + + + +HAT + + + + + +GPIO4 + + + + + + + +50 + + + + + +MISO + + + + + + + +52 + + + + + +MOSI + + + + + + + +54 + + + + + +SCK + + + + + + + +56 + + + + + +GND + + + + + + + +58 + + + + + +D24 + + + + + +IOEX connector + + + + + + + +60 + + + + + +D25 + + + + + +IOEX connector + + + + + + + +62 + + + + + +D22 + + + + + +HAT connector + + + + + + + +64 + + + + + +D23 + + + + + +IOEX connector + + + + + + + +66 + + + + + +D4 + + + + + +TMP112A + + + + + + + +68 + + + + + +D5 + + + + + +AB1805 + + + + + + + +70 + + + + + +D6 + + + + + +IOEX connector + + + + + + + +72 + + + + + +D7 + + + + + +PM-BAT + + + + + + + +74 + + + + + +CELL VBUS + + + + + + + +1 + + + + + +GND + + + + + + + +3 + + + + + +GND + + + + + + + +5 + + + + + +GND + + + + + + + +7 + + + + + +GND + + + + + + + +9 + + + + + +GND + + + + + + + +11 + + + + + +USBDATA+ + + + + + + + +13 + + + + + +USBDATA- + + + + + + + +15 + + + + + +GND + + + + + + + +17 + + + + + +D21 + + + + + +STUSB4500 + + + + + + + +19 + + + + + +D20 + + + + + +STUSB4500 + + + + + + + +21 + + + + + +GND + + + + + + + +23 + + + + + +A0 + + + + + +FSA2567 + + + + + + + +33 + + + + + +A1 + + + + + +Grove A1 + + + + + + + +35 + + + + + +A2 + + + + + +Grove A2 + + + + + + + +37 + + + + + +A3 + + + + + +DML3006 + + + + + + + +39 + + + + + +AGND + + + + + + + +41 + + + + + +A4 + + + + + +MP28167 + + + + + + + +43 + + + + + +A5 + + + + + + + +45 + + + + + +A6 + + + + + + + +47 + + + + + +A7 + + + + + +PM-BAT + + + + + + + +49 + + + + + +AGND + + + + + + + +51 + + + + + +SOM14 + + + + + +IOEX connector + + + + + + + +53 + + + + + +NC + + + + + + + +55 + + + + + +NC + + + + + + + +57 + + + + + +SOM17 + + + + + +IOEX connector + + + + + + + +59 + + + + + +D26 + + + + + +STUSB4500 + + + + + + + +61 + + + + + +RGBR + + + + + + + +63 + + + + + +RGBG + + + + + + + +65 + + + + + +RGBB + + + + + + + +67 + + + + + +SIM_VCC + + + + + + + +69 + + + + + +SIM_RST + + + + + + + +71 + + + + + +SIM_CLK + + + + + + + +73 + + + + + +SIM_DATA + + + + + + + +75 + + + + + +RI + + diff --git a/src/assets/images/m-hat/m-hat-pins.svg b/src/assets/images/m-hat/m-hat-pins.svg new file mode 100644 index 0000000000..fb6351b093 --- /dev/null +++ b/src/assets/images/m-hat/m-hat-pins.svg @@ -0,0 +1,630 @@ + + + + + + + + + + + + + + + +1 + + + + + +3V3 + + + + + + + +3 + + + + + +GPIO2 + + + + + + + +5 + + + + + +GPIO3 + + + + + + + +7 + + + + + +GPIO4 + + + + + +48 + + + + + +CS + + + + + + + +9 + + + + + +GND + + + + + + + +11 + + + + + +GPIO17 + + + + + +40 + + + + + +CTS + + + + + + + +13 + + + + + +GPIO27 + + + + + + + +15 + + + + + +GPIO22 + + + + + + + +17 + + + + + +3V3 + + + + + + + +19 + + + + + +GPIO10 + + + + + + + +21 + + + + + +GPIO9 + + + + + + + +23 + + + + + +GPIO11 + + + + + + + +25 + + + + + +GND + + + + + + + +27 + + + + + +GPIO0 + + + + + + + +29 + + + + + +GPIO5 + + + + + + + +31 + + + + + +GPIO6 + + + + + + + +33 + + + + + +GPIO13 + + + + + + + +35 + + + + + +GPIO19 + + + + + + + +37 + + + + + +GPIO26 + + + + + + + +39 + + + + + +GND + + + + + + + +2 + + + + + +5V + + + + + + + +4 + + + + + +5V + + + + + + + +6 + + + + + +GND + + + + + + + +8 + + + + + +GPIO14 + + + + + +38 + + + + + +RXD + + + + + + + +10 + + + + + +GPIO15 + + + + + +36 + + + + + +TXD + + + + + + + +12 + + + + + +GPIO18 + + + + + + + +14 + + + + + +GND + + + + + + + +16 + + + + + +GPIO23 + + + + + + + +18 + + + + + +GPIO24 + + + + + + + +20 + + + + + +GND + + + + + + + +22 + + + + + +GPIO25 + + + + + + + +24 + + + + + +GPIO8 + + + + + + + +26 + + + + + +GPIO7 + + + + + + + +28 + + + + + +GPIO1 + + + + + + + +30 + + + + + +GND + + + + + + + +32 + + + + + +GPIO12 + + + + + + + +34 + + + + + +GND + + + + + + + +36 + + + + + +GPIO16 + + + + + +42 + + + + + +RTS + + + + + + + +38 + + + + + +GPIO20 + + + + + + + +40 + + + + + +GPIO21 + + diff --git a/src/assets/images/m-hat/m-hat.png b/src/assets/images/m-hat/m-hat.png new file mode 100644 index 0000000000..720719568b Binary files /dev/null and b/src/assets/images/m-hat/m-hat.png differ diff --git a/src/assets/images/m-hat/ts-jumper.png b/src/assets/images/m-hat/ts-jumper.png new file mode 100644 index 0000000000..676bc4d1a8 Binary files /dev/null and b/src/assets/images/m-hat/ts-jumper.png differ diff --git a/src/assets/js/collapse.js b/src/assets/js/collapse.js index 1d134b6dad..6b80c0942e 100644 --- a/src/assets/js/collapse.js +++ b/src/assets/js/collapse.js @@ -370,7 +370,7 @@ imageOverlay.draw = function() { if (info.scaleX > 1 && info.scaleY > 1) { // Canvas is larger than the image in both dimensions (scale up) // The largest value indicates the minimum scaling so the image will fit entirely, possibly with empty space - info.scale = Math.max(info.scaleX, info.scaleY); + info.scale = Math.min(info.scaleX, info.scaleY); } else if (info.scaleX < 1 && info.scaleY >= 1) { @@ -401,7 +401,7 @@ imageOverlay.draw = function() { info.dx += Math.floor(imageOverlay.panX * imageOverlay.zoom); info.dy += Math.floor(imageOverlay.panY * imageOverlay.zoom); - // console.log('info', info); + // console.log('imageOverlay', {imageOverlay, info}); // drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight) ctx.drawImage(imageOverlay.image, 0, 0, imageOverlay.imageWidth, imageOverlay.imageHeight, info.dx, info.dy, info.dWidth, info.dHeight); diff --git a/src/assets/js/navmenu.js b/src/assets/js/navmenu.js index 7701b61919..8ca2ad0116 100644 --- a/src/assets/js/navmenu.js +++ b/src/assets/js/navmenu.js @@ -377,7 +377,7 @@ navMenu.generateNavHtmlInternal = function(submenuObj, options) { } - if (itemObj.internal) { + if (itemObj.internal && !itemObj.isActivePage) { if (typeof apiHelperAuth == 'undefined' || !apiHelperAuth.isInternal) { continue; } diff --git a/src/content/hardware/certification/antenna.md b/src/content/hardware/certification/antenna.md index 3a303351d8..cfd93fab6b 100644 --- a/src/content/hardware/certification/antenna.md +++ b/src/content/hardware/certification/antenna.md @@ -258,7 +258,7 @@ For prototyping and personal use you may be able to use different cellular anten All Particle cellular devices have a U.FL antenna connector. Most cellular antennas have a SMA connector, so you'll need an adapter. At Adafruit, you can get [this adapter](https://www.adafruit.com/product/851). At SparkFun [this adapter](https://www.sparkfun.com/products/9145). At Amazon [this adapter](https://www.amazon.com/gp/product/B01AJQ33Y4/ref=ppx_yo_dt_b_search_asin_title). -[This antenna from Amazon](https://www.amazon.com/Eightwood-Antenna-Magnetic-Connector-2100Mhz/dp/B010EU5C1W/ref=pd_ybh_a_77) is about 4" long, has a magnetic mount, and a 3 meter cable. It is helpful in improving reception in fringe areas. Or for more gain, a [12" antenna](https://www.wilsonamplifiers.com/12-inch-magnet-mount-antenna-12ft-sma-male-311125/). +One common option is a 4" magnetic mount whip antenna with a long cable and SMA connector. They are commonly used in automotive applications so the antenna can be mounted outside of the vehicle. ### Cellular boosters and micro cells diff --git a/src/content/reference/datasheets/m-series/m-hat-datasheet.md b/src/content/reference/datasheets/m-series/m-hat-datasheet.md new file mode 100644 index 0000000000..a6e5eef996 --- /dev/null +++ b/src/content/reference/datasheets/m-series/m-hat-datasheet.md @@ -0,0 +1,636 @@ +--- +title: M-HAT datasheet +columns: two +layout: commonTwo.hbs +description: M-HAT Datasheet +--- + +# M-HAT datasheet (preview) + +{{box op="start" cssClass="boxed warningBox"}} +This is a pre-review, preliminary datasheet, for internal use only. Changes are likely before release. +{{box op="end"}} + +![](/assets/images/m-hat/m-hat.png) + +

Rendering is of an older version of the M-HAT

+ + +## Overview + +The M-HAT is pass-through HAT (hardware attached on top) for the Raspberry Pi to provide cellular connectivity and power. + +It contains the power circuitry similar to the Muon, including the ability to power both the cellular modem and Raspberry Pi using USB-C PD, external DC power, or LiPo battery. + +It is intended for use with the B504e (LTE Cat 1 NorAm) and B524 (LTE Cat 1 EMEAA) to provide network connectivity to the Raspberry Pi using [tethering](reference/device-os/tethering/). + +The M-HAT provides a pass-through Raspberry Pi 40-pin expansion HAT connector to allow use with additional HATs. + +- [B504e datasheet](/reference/datasheets/b-series/b504-datasheet/) +- [B524 datasheet](/reference/datasheets/b-series/b524-b523-datasheet/) +- [Muon datasheet](/reference/datasheets/m-series/muon-datasheet/) + +If you are using additional Raspberry Pi HATs, you will typically stack them on top of the M-HAT. + +If you are using a PoE (Power over Ethernet) HAT, it must go directly against the Raspberry Pi, underneath the M-HAT. This is because PoE has a separate 4-pin connector that directly plugs into to a header next to the Ethernet jack in addition to accessing the 40-pin HAT connector. + +Other pass-through HATs could be used below the M-HAT, if they fit and have appropriate stand-offs so the M-HAT remains secure, as well. + +Note that the M-SoM does not support tethering and cannot be used to supply a cellular network connection to a Raspberry Pi with the M-HAT. + +## Diagram + +{{imageOverlay src="/assets/images/m-hat/m-hat-labeled.png" alt="Diagram"}} + + +| Label | Description | +| ---: | :--- | +| 1 | USB-C | +| 2 | USB-C PD LED | +| 3 | DC IN | +| 4 | Charge LED | +| 5 | LiPo Battery | +| 6 | I/O Expansion | +| 7 | RTC Battery | +| 8 | Grove connector | +| 9 | Qwiic connector | +| 10 | SMA connector - GNSS | +| 11 | SMA connector - BLE | +| 12 | SMA connector - Cellular | +| 13 | Particle RESET button | +| 14 | Raspberry Pi HAT 40-pin connector | +| 15 | Particle M.2 SoM | +| 16 | Particle MODE button | +| 17 | Particle RGB LED | + + +### USB-C (1) + +USB-C can be used for powering the M-HAT and the Raspberry Pi. + +This USB-C connector also provides USB access to the Particle M.2 SoM for programming over USB or accessing + USB serial debug. + +It is recommended that you use this USB-C connector instead of the one on the Pi, as the Pi may not provide +sufficient power for the cellular modem unless also used with a battery. You should not connect both +USB-C cables at the same time. + +See also [Power](#power), below. + +### USB-C PD LED (2) + +This LED will turn on when USB-C PD (power delivery) has been negotiated with the charger or host. + +### DC IN (3) + +Optional 5V - 12V DC power input (screw terminals). + +See also [Power](#power), below. + +### Charge LED (4) + +- When lit, the battery is being charged. +- When off, the battery is fully charged, or is not charging because of insufficient power. +- When blinking, there is a battery fault or charging fault. + +If you do not have a battery connected, the charge LED may flicker at boot and in DFU mode, and will periodically blink when the device attempts to determine if a battery has been connected. + + +### LiPo Battery (5) + +The M-HAT has a 3-pin JST-PH (2mm pitch) battery connector that is the same as the Monitor One, Muon, and Tachyon for connection to a 3.7V LiPo battery pack +with an integrated temperature sensor (10K NTC thermistor). + +Some other Particle devices have a 3.7V LiPo battery without a temperature sensor using 2-pin JST-PH connector. This battery is not compatible and cannot be used with the Muon. + +
+ +

Facing the plug on the battery side

+ +If you wish to use a battery without a 10K NTC temperature sensor, you must cut the normally closed trace jumper indicated, otherwise charging will never enable. It is located to the left of the power module (on the bottom side of the board), with the HAT connector on the side away from you. + +{{imageOverlay src="/assets/images/m-hat/ts-jumper.png" alt="TS jumper"}} + +

Facing the bottom of the M-HAT

+ +If purchasing a battery from a 3rd-party supplier, verify the polarity as the polarity is not standardized even for batteries using a JST-PH connector. + + +### I/O Expansion (6) + +The IOEX connector provides a way to access some of the unused GPIO on the Particle SoM. + +It is a 2x5 1.27mm IDC socket that connects using the same ribbon cable that is used for SWD/JTAG debugging on many Particle devices. + +{{imageOverlay src="/assets/images/m-hat/m-hat-ioex.svg" alt="IOEX connector"}} + +{{!-- BEGIN do not edit content below, it is automatically generated bf89b87e-f66f-4de9-9a5e-fc88a792cf7b --}} + +| Module Pin | Pin Name | Schematic net | MCU direction | Description | +| :---: | :--- | :--- | :--- | :--- | +| 51 | SOM14 | SOM14 | I/O | NC on B-SoM | +| 57 | SOM17 | SOM17 | I/O | NC on B-SoM | +| 58 | D24 | M2_D24 | I/O | On IOEX connector, NC on B-SoM | +| 60 | D25 | M2_D25 | I/O | On IOEX connector, NC on B-SoM | +| 64 | D23 | M2_D23 | I/O | GPIO on IOEX connector | +| 70 | D6 | M2_D6 | I/O | PWM, GPIO on IOEX connector | + + +{{!-- END do not edit content above, it is automatically generated--}} + + +### RTC Battery (7) + +This connector can power the RTC (AB1805) to maintain the real-time clock if all other power sources (USB, DC IN, LiPo) are removed. + +This 2-pin 1mm-pitch connector is designed to work with a standard RTC battery module for the Raspberry Pi 5 that typically contains a Lithium coin cell battery. + +### Grove connector (8) + +The Grove connector allows [Grove accessories](/reference/datasheets/accessories/gen3-accessories/#grove-starter-kit) to be added. Pins A1 and A2 are present on the connector. This allows the use of Grove analog and digital sensors. + +{{!-- BEGIN do not edit content below, it is automatically generated f77388d6-01aa-4a52-afa9-8d05985c5907 --}} + +| Module Pin | Pin Name | Schematic net | MCU direction | Description | +| :---: | :--- | :--- | :--- | :--- | +| 33 | A1 | M2_A1/MISO | I/O | Grove A1, Input, Output, ADC, PWM | +| 35 | A2 | M2_A2/SCK | I/O | Grove A2, Input, Output, ADC | + + +{{!-- END do not edit content above, it is automatically generated--}} + + + +### Qwiic connector (9) + +[Qwiic](/hardware/expansion/qwiic/) is a 3.3V I2C standard developed by SparkFun and adopted by other manufacturers. It's also compatible with Adafruit Stemma Qt expansion devices. You can use this to add displays, sensors, etc. and multiple devices can be connected to a single Qwiic port, as accessory boards have two connectors for chaining multiple sensors. + +### SMA connector - GNSS (10) + +The SMA connectors provide an alternative antenna connection. Each is connected to a U.FL pigtail that typically connects to the Particle SoM module such as the B-SoM. + +The GNSS antenna is only required if you are using GNSS. + +Many off-the-shelf GNSS antennas include a SMA connector, so the built-in adapter can be useful in this case. Since GNSS does not transmit, using an alternative GNSS antenna does not require intentional radiator certification. + +### SMA connector - BLE (11) + +The SMA connectors provide an alternative antenna connection. Each is connected to a U.FL pigtail that typically connects to the Particle SoM module such as the B-SoM. + +The BLE antenna is only required if you are using the BLE feature. The B-SoM does not have a built-in BLE chip antenna like the Boron, but BLE is not required for setup. + +Often you will attach the Particle 2.4 GHz BLE/Wi-Fi antenna directly to the B-SoM instead of using the SMA connector. + +Using an alternative BLE antenna with a SMA connector will require intentional radiator certification. + +### SMA connector - Cellular (12) + +The SMA connectors provide an alternative antenna connection. Each is connected to a U.FL pigtail that typically connects to the Particle SoM module such as the B-SoM. + +The cellular antenna is required on the B-SoM. Often you will attach the Particle cellular antenna directly to the B-SoM instead of using the SMA connector. + +Using an alternative cellular antenna with a SMA connector will require intentional radiator certification. + +### Particle RESET button (13) + +The RESET button resets the Particle SoM module. It does not reset the Raspberry Pi. + +### Raspberry Pi HAT 40-pin connector (14) + +This is a two-sided pass-through 40-pin Raspberry Pi HAT connector. + +It is designed to sit on top of a Raspberry Pi, and allows additional HATs to sit on top of the M-HAT. + +The 40-pin Raspberry Pi HAT connector is primarily left for use by the Pi and additional HATs, however the following connections are included between the Particle M.2 SoM and the Pi. + +{{imageOverlay src="/assets/images/m-hat/m-hat-pins.svg" alt="Pin Diagram"}} + +{{!-- BEGIN do not edit content below, it is automatically generated 04c52083-eb85-46a7-b2a7-c366be119571 --}} + +| Pin Name | Schematic net | MCU direction | Description | Pi Pin | Pi Function | +| :--- | :--- | :--- | :--- | :--- | :--- | +| TXD | M2_TXD | O | UART serial TXD, connects to Pi UART0 RXD | GPIO15 | UART0_RX | +| RXD | M2_RXD | I | UART serial RXD, connects to Pi UART0 TXD | GPIO14 | UART0_TX | +| CTS | M2_D3/CTS | I | UART serial CTS, connects to Pi UART0 RTS | GPIO17 | UART0_RTS | +| RTS | M2_D2/RTS | O | UART serial RTS, connects to Pi UART0 CTS | GPIO16 | UART0_CTS | +| CS | WAKE_RPI_CTR | O | Pi power control by GPIO4 | GPIO4 | GPIO4 | + + +{{!-- END do not edit content above, it is automatically generated--}} + +#### GPIO4 - HAT connector + +GPIO4 on the Pi is used for on/off control. While the Pi does not have a true sleep mode like Particle devices, it does use +less power in HALT mode and this pin can optionally be used for power control. + +The GPIO4 pin has a 10K hardware pull-up resistor to the Pi 3V3. + +From the Particle SoM, settings `CS` pin, also known as `D8`, to `OUTPUT` and using `digitalWrite(D8, LOW)` will set GPIO4 low. + +#### UART serial - HAT connector + +The Raspberry Pi UART0 is connected to the Particle M.2 SoM `Serial1` UART, with hardware flow control. As is typically the case: + +- RXD ↔ TXD +- CTS ↔ RTS + +By default, this mapping is isolated. By the `SEL` pin, see [FSA2567](#fsa2567), below, you can enable the UART connection, which is needed for tethering. + + +### Particle M.2 SoM (15) + +The M-HAT is typically use with a Particle B-SoM B504e or B524 module. + +### Particle MODE button (16) + +The RESET button resets the Particle SoM module. It does not reset the Raspberry Pi. + +### Particle RGB LED (17) + +This is a standard Particle RGB status LED. It is unaffected by the Raspberry Pi. + +See the [Status LED and device modes page](/troubleshooting/led/) for an explanation of colors and patterns. + +## Power + +Power can be supplied to M-HAT by: + +- USB-C +- VIN (5 - 12 VDC, via screw terminals) +- LiPo battery (via 3-pin JST battery connector) +- Expansion card (HAT) + +#### USB-C cable warning + +You must use an actual USB-C port or USB-C power adapter to power the M-HAT by USB. + +**A USB-A to USB-C cable will not power the M-HAT or charge the battery** + +The reason is that the M-HAT uses USB-C PD to change the USB port voltage to 9V and request enough +current to power the M-HAT. + +When using a USB-2 or USB-3 port with USB-A to USB-C adapter cable, the USB port voltage cannot +be changed and the port will not be able to power the M-HAT. + +Also beware of some wall adapters that have a USB-C cable, but do not support USB-C PD. Some +of these are advertised as Raspberry Pi power adapters, which only support 5V and cannot be used +to power the M-HAT. + +See [Muon USB Power](/troubleshooting/guides/device-troubleshooting/muon-usb-power/) for more information. + +#### Expansion and peripheral power + +The onboard peripherals including QWIIC and Grove connector are powered by the 3V3_AUX power supply. + +If you use [setup.particle.io](https://setup.particle.io/) to set up your M-HAT, 3V3_AUX will be set up +automatically. + +If you want to do it manually, the see the section [Firmware settings](#firmware-settings), below, +for the sample code and the technical reasons why it is necessary. + + +#### HAT power direction jumper + +A jumper located on the bottom side of the M-HAT selects the direction of expansion card (HAT) 5V power (label 20, above). + +- Connecting `5V_IN` and center pin: Expansion header powers the M-HAT (typically from a PoE HAT) +- Connecting `5V_OUT` and center pin: The M-HAT powers expansion card (from USB-C, USB, or LiPo) + +{{imageOverlay src="/assets/images/m-series/muon-5v-jumper.jpg" alt="5V Jumper"}} + +

This picture is of the Muon; the appearance of the M-HAT may differ

+ +When the jumper is set to 5V_IN, the M-HAT powers the Raspberry Pi HAT connector 5V pin, which is turn powers the Raspberry Pi itself. When using 5V_IN +mode you must not power both the M-HAT USB-C and the Pi USB-C at the same time, as both will attempt to power the HAT 5V pin, which could damage +either or both devices. + +There are two separate ways 5V on the HAT connector can be generated when powering from M-HAT: +- LiPo boost converter +- DCIN or USB boost-buck converter + +The outputs are ORed together using a circuit similar to an ideal diode so none, one, or both can be safely powered at the same time. + +Both of these default to on, but can be disabled using GPIO. + +{{!-- BEGIN do not edit content below, it is automatically generated f90b1182-87f3-4aa6-8599-01504bfdff97 --}} + +| Module Pin | Pin Name | Schematic net | MCU direction | Description | +| :---: | :--- | :--- | :--- | :--- | +| 37 | A3 | EN1_CTR | O | LiPo to 5V boost converter (HIGH to turn off, default on) | +| 41 | A4 | EN2_CTR | O | DCIN or USB boost-buck converter (HIGH to turn off, default on) | + + +{{!-- END do not edit content above, it is automatically generated--}} + +The LiPo boost converter is isolated by a DML3006 load switch, so when disconnected, the boost converter (TPS61088) is not powered. The EN1_CTR control line connects to the load switch via a 2N7002 N-channel MOSFET to handle the inversion and voltage-level differences. + +The EN2_CTR control line connects to the MP28167 boost-buck converter EN pin via a 2N7002 N-channel MOSFET to handle the inversion and voltage-level differences. + +## Internal peripherals + +### STUSB4500 - Internal peripherals + +The STUSB4500 USB PD controller has three connections, however they are not frequently needed and are hard to access on the B-SoM. + +{{!-- BEGIN do not edit content below, it is automatically generated 3f9e11ff-5582-435d-af08-5e087b63414b --}} + +| Module Pin | Pin Name | Schematic net | MCU direction | Description | +| :---: | :--- | :--- | :--- | :--- | +| 17 | D21 | PD_RST | O | USB PD controller reset, pin is NFC1 on B-SoM | +| 19 | D20 | PD_ALERT | I | USB PD controller alert, pin is NFC2 on B-SoM | +| 59 | D26 | PD_ATTACH | I | USB PD controller attach interrupt, NC on B-SoM | + + +{{!-- END do not edit content above, it is automatically generated--}} + +If using the B-SoM, it is recommended that you disable NFC in the UICR bytes of the nRF52840. This will allow the MCU to +use the NFC pins (NFC1 and NFC2) as GPIO, which will allow you to access the PD_RST and PD_ATTACH pins. + +A [library and instructions]((https://github.com/rickkas7/NFC_UICR_RK/) are available for doing so. + +#### PD_RST + +This is the PD_RST line to reset the STUSB4500 USB PD controller. You normally will not need to use this. + +This is the NFC1 pin on the B-SoM. The NFC pins can be converted from NFC Tag to GPIO, but doing so requires changing the UICR bytes in the nRF52840 configuration flash and rebooting the MCU. After that, the pins will remain as GPIO. + +There is a 10K hardware pull-down resistor on this pin. If you set the pin to OUTPUT and HIGH, it will reset the chip. + +#### PD_ALERT + +This is the PD_ALERT output from the STUSB4500 USB PD controller. It is not enabled by default. + +This is the NFC2 pin on the B-SoM. The NFC pins can be converted from NFC Tag to GPIO, but doing so requires changing the UICR bytes in the nRF52840 configuration flash and rebooting the MCU. After that, the pins will remain as GPIO. + + +#### PD_ATTACH + +This is the PD_ATTACH output from the STUSB4500 USB PD controller. + +This pin is not available on the B-SoM. + +### FSA2567 - Internal peripherals + +This chip isolates the UART pins (RX, TX, CTS, RTS) between the Particle M.2 SoM and the Pi. + +If the A0 pin is set HIGH, then the UART is connected: + +- RXD ↔ TXD +- CTS ↔ RTS + +{{!-- BEGIN do not edit content below, it is automatically generated 7f56ea43-30ef-4cb1-988a-3d7e31247bc9 --}} + +| Module Pin | Pin Name | Schematic net | MCU direction | Description | +| :---: | :--- | :--- | :--- | :--- | +| 23 | A0 | SEL | O | HIGH to enable SoM to Pi UART | + + +{{!-- END do not edit content above, it is automatically generated--}} + +By default, the serial connection is isolated. + +To enable the UART connection, you would typically use code like this in your firmware that enabled tethering: + +```cpp +pinMode(A0, OUTPUT); +digitalWrite(A0, HIGH); // enable UART connection +``` + +### TMP112A - Internal peripherals + +This is the temperature sensor on the M-HAT, which is connected by I2C. There is an optional alert output that can be enabled +on the sensor. It is an open-collector output and is connected to D4. If you are using this feature, be sure to set +`pinMode(D4, INPUT_PULLUP)` so the input does not float. There is no hardware pull-up on tbe M-HAT on this line. + +{{!-- BEGIN do not edit content below, it is automatically generated f6622f00-cc13-43e4-99d4-c955ed253710 --}} + +| Module Pin | Pin Name | Schematic net | MCU direction | Description | +| :---: | :--- | :--- | :--- | :--- | +| 66 | D4 | TEMP_ALERT | I | Temperature sensor ALERT output | + + +{{!-- END do not edit content above, it is automatically generated--}} + +### AB1805 - Internal peripherals + +The AB1805 RTC/Watchdog provides additional RTC and hardware watchdog options. It can be powered by: + +- USB-C power +- DCIN +- HAT connector (when the jumper is selected to power from HAT) +- LiPo battery + +Note that the LiPo battery will power the chip even when the PMIC BATFET is disabled. + +The FOUT/IRQ output from the AB1805 is an open-collector output and defaults to Hi-Z in the chip. If you are using this feature, be sure to set +`pinMode(D5, INPUT_PULLUP)` so the input does not float. There is no hardware pull-up on tbe M-HAT on this line. + +{{!-- BEGIN do not edit content below, it is automatically generated e37904f1-301c-4f2b-97a9-3bab92a6acd3 --}} + +| Module Pin | Pin Name | Schematic net | MCU direction | Description | +| :---: | :--- | :--- | :--- | :--- | +| 68 | D5 | RTC_INT | I | RTC/Watchdog FOUT/IRQ output | + + +{{!-- END do not edit content above, it is automatically generated--}} + +Additionally, the RTC Battery (7) connector is connected to +the VBAT in of the AB1805. This allows the RTC to maintain time when all other sources of power are removed. This feature is optional. + +### PM-BAT - Internal peripherals + +[PM-BAT](/hardware/power/pm-bat-datasheet/) power module includes an open-collector output for interrupts from the bq24195 PMIC +and the MAX17043 fuel gauge. If using this feature, be sure to set `pinMode(A7, INPUT_PULLUP)` so the input does not float. + +{{!-- BEGIN do not edit content below, it is automatically generated cc5c6247-5bdb-43bd-8b18-24954f4adea4 --}} + +| Module Pin | Pin Name | Schematic net | MCU direction | Description | +| :---: | :--- | :--- | :--- | :--- | +| 47 | A7 | M2_A7/PMIC_INT | I | PMIC and fuel gauge interrupt output | +| 72 | D7 | D7/AUX_POWER_EN | O | 3V3_AUX power control (HIGH to turn on) | + + +{{!-- END do not edit content above, it is automatically generated--}} + +This output controls the 3V3_AUX power, which also powers: + +- Qwiic connector +- Grove connector + +Unlike the Muon, AUX_PWR_EN does not control 3.3V and 5V power to the HAT connector. + +### GPIO - Internal peripherals + +{{imageOverlay src="/assets/images/m-hat/m-hat-m2.svg" alt="Pin Diagram"}} + +{{!-- BEGIN do not edit content below, it is automatically generated 5c7622c6-ae73-4a5b-88b6-e761ee69fa3f --}} + +| Pin Name | Schematic net | MCU direction | Connected to | Description | M.2 pin | +| :--- | :--- | :--- | :--- | :--- | :--- | +| A0 | SEL | O | FSA2567 | HIGH to enable SoM to Pi UART | 23 | +| A1 | M2_A1/MISO | I/O | Grove A1 | Grove A1, Input, Output, ADC, PWM | 33 | +| A2 | M2_A2/SCK | I/O | Grove A2 | Grove A2, Input, Output, ADC | 35 | +| A3 | EN1_CTR | O | DML3006 | LiPo to 5V boost converter (HIGH to turn off, default on) | 37 | +| A4 | EN2_CTR | O | MP28167 | DCIN or USB boost-buck converter (HIGH to turn off, default on) | 41 | +| A7 | M2_A7/PMIC_INT | I | PM-BAT | PMIC and fuel gauge interrupt output | 47 | +| CS | WAKE_RPI_CTR | O | HAT | Pi power control by GPIO4 | 48 | +| CTS | M2_D3/CTS | I | HAT | UART serial CTS, connects to Pi UART0 RTS | 40 | +| D4 | TEMP_ALERT | I | TMP112A | Temperature sensor ALERT output | 66 | +| D5 | RTC_INT | I | AB1805 | RTC/Watchdog FOUT/IRQ output | 68 | +| D6 | M2_D6 | I/O | IOEX connector | PWM, GPIO on IOEX connector | 70 | +| D7 | D7/AUX_POWER_EN | O | PM-BAT | 3V3_AUX power control (HIGH to turn on) | 72 | +| D20 | PD_ALERT | I | STUSB4500 | USB PD controller alert, pin is NFC2 on B-SoM | 19 | +| D21 | PD_RST | O | STUSB4500 | USB PD controller reset, pin is NFC1 on B-SoM | 17 | +| D22 | 3V3_DETECTION | I | HAT connector | HIGH when Pi is supplying 3V3 to the HAT connector | 62 | +| D23 | M2_D23 | I/O | IOEX connector | GPIO on IOEX connector | 64 | +| D24 | M2_D24 | I/O | IOEX connector | On IOEX connector, NC on B-SoM | 58 | +| D25 | M2_D25 | I/O | IOEX connector | On IOEX connector, NC on B-SoM | 60 | +| D26 | PD_ATTACH | I | STUSB4500 | USB PD controller attach interrupt, NC on B-SoM | 59 | +| MODE | M2/MODE | I | MODE button | MODE button for Particle SoM | 32 | +| RESET | M2/RESET | I | RESET button | RESET button for Particle SoM | 34 | +| RTS | M2_D2/RTS | O | HAT | UART serial RTS, connects to Pi UART0 CTS | 42 | +| RXD | M2_RXD | I | HAT | UART serial RXD, connects to Pi UART0 TXD | 38 | +| SCL | M2_SCL | I/O | Multiple | I2C SCL | 20 | +| SDA | M2_SDA | I/O | Multiple | I2C SDA | 22 | +| SOM14 | SOM14 | I/O | IOEX connector | NC on B-SoM | 51 | +| SOM17 | SOM17 | I/O | IOEX connector | NC on B-SoM | 57 | +| TXD | M2_TXD | O | HAT | UART serial TXD, connects to Pi UART0 RXD | 36 | + + +{{!-- END do not edit content above, it is automatically generated--}} + +### I2C + +The I2C bus is not shared between the Raspberry Pi and the Particle M.2 SoM. The following internal peripherals are present on the Particle M.2 SoM primary I2C bus (`Wire`): + +| I2C Address | Peripheral | +| :--- | :--- | +| 0x28 | STUSB4500 USB-C power controller | +| 0x36 | MAX17043 Fuel Gauge | +| 0x48 | TMP112A temperature sensor | +| 0x69 | AM1805 RTC/Watchdog | +| 0x6B | bq24195 PMIC | + + +## Other + +### NFC + +The M-HAT does not support NFC tag. NFC tag is not supported on the M-SoM, and there is no connector for use with the B-SoM. + +### SWD/JTAG + +The 10-pin SWD/JTAG debugging connector is not populated on the M-HAT. + +Additionally, the Particle M.2 SoM SWD pogo pins are not available on the M-HAT, so SWD would only work +on M-SoM, not B-SoM, even if populated. + +Note that the 2x5 connector on the top of the M-HAT is the IOEX connector, not the debug connector, even though the debug +cable does fit in the connector. + + +## Firmware settings + +Devices using the [Particle Power Module](/hardware/power/pm-bat-datasheet/) include a `3V3_AUX` power output +that can be controlled by a GPIO. On the M-HAT, it controls the Qwiic and Grove connectors. +On the M.2 SoM breakout board, this powers the Feather connector. On the Muon, +it powers the Ethernet port, LoRaWAN module, 40-pin expansion HAT connector, and QWIIC connector. + +The main reason for this is that until the PMIC is configured, the input current with no battery +connected is limited to 100 mA. This is insufficient for the M-SoM to boot when +using a peripheral that requires a lot of current, like the WIZnet W5500 Ethernet module. The +system power manager prevents turning on `3V3_AUX` until after the PMIC is configured +and the PMIC has negotiated a higher current from the USB host (if powered by USB). + +This setting is persistent and only needs to be set once. In fact, the PMIC initialization +normally occurs before user firmware is run. This is also necessary because if you are using Ethernet +and enter safe mode (breathing magenta), it's necessary to enable `3V3_AUX` so if you are using +Ethernet, you can still get OTA updates while in safe mode. + +After changing the auxiliary power configuration you must reset the device. + +### Tethering code - Firmware settings + +The following code can be added to your application to enable the UART interface connection and enable +tethering so the Raspberry Pi can use the B-SoM cellular connection. + +{{> codebox content="/assets/files/tether-mhat.cpp" format="cpp" height="400" flash="true"}} + +- For general information, see [Tethering](reference/device-os/tethering/). +- For information about the `Tether` class, see the [Device OS API reference](/reference/device-os/api/tether/). + +Note that the M-SoM does not support tethering and cannot be used to supply a cellular network connection to a Raspberry Pi with the M-HAT. + +### One-time configuration - Firmware settings +The following code can be used to enable Ethernet on the M-HAT. This only needs to be done +once and the device must be reset after configuration for the changes to take effect. It requires Device OS 5.9.0 or later. + +```cpp +// Enable 3V3_AUX +SystemPowerConfiguration powerConfig = System.getPowerConfiguration(); +powerConfig.auxiliaryPowerControlPin(D7).interruptPin(A7); +System.setPowerConfiguration(powerConfig); +``` + +### Manual configuration - Firmware settings + +If you wish to manage the 3V3_AUX power manually from your firmware, +you can set the `auxiliaryPowerControlPin` to `PIN_INVALID` and reset the device. It will then no longer +turn on at boot. + +```cpp +// Manual management of 3V3_AUX +SystemPowerConfiguration powerConfig = System.getPowerConfiguration(); +powerConfig.auxiliaryPowerControlPin(PIN_INVALID).interruptPin(A7); +System.setPowerConfiguration(powerConfig); +``` + +To control `3V3_AUX` manually from your firmware, use `pinMode(D7, OUTPUT)` in `setup()`. Use +`digitalWrite(D7, 1)` to turn `3V3_AUX` on and `digitalWrite(D7, 0)` to turn it off. + + +## Schematics + +To be provided at a later date. + +## Certification + +The cellular (intentional radiator) certification depends on the cellular module you have selected. + +- [B504e certification documents](/hardware/certification/certification-documents/#b504-b-series-som) +- [B524 certification documents](/hardware/certification/certification-documents/#b523-b524-b-series-som) + +If you are building a product with the M-HAT and are using the Particle certified cellular antenna you may not need to complete intentional radiator testing. + +You will likely need to perform unintentional radiator testing with your compete module, however. Fortunately this is generally the least expensive and least complicated test. + + +## Cellular carriers + +The carriers are dependent on the Particle M.2 SoM you have selected for your M-HAT. + +- [B504e carriers](/reference/cellular/cellular-carriers/?tab=ByDevice&device=B-Series%20B504%20LTE%20CAT1%2F3G%20(NorAm)%20EtherSIM®ion=All) +- [B524 carriers](/reference/cellular/cellular-carriers/?tab=ByDevice&device=B-Series%20B524%20LTE%20CAT1%2F3G%2F2G%20(EMEAA)%20EtherSIM®ion=All) + +--- +## Ordering information + +{{!-- BEGIN do not edit content below, it is automatically generated 47e37393-b9c0-4b04-9da6-e54cb2227cd1 --}} + +| SKU | Description | Region | Lifecycle | +| :--- | :--- | :--- | :--- | +| MHAT | M-HAT | Global | In development | +| MHAT504e | M-HAT with LTE CAT1 for North America | NORAM | In development | +| MHAT524e | M-HAT with LTE CAT1 for Rest of World | EMEAA | In development | + + +{{!-- END do not edit content above, it is automatically generated --}} + +- EMEAA: Selected countries in Europe, Middle East, Africa, and Asia, including Australia and New Zealand. See the [cellular carrier list](/reference/cellular/cellular-carriers/) for more information. + + +## Revision history + +| Revision | Date | Author | Comments | +|:---------|:-----|:-------|:---------| +| pre | 2024-04-21 | RK | Initial version | diff --git a/src/content/reference/datasheets/m-series/m1-enclosure-datasheet.md b/src/content/reference/datasheets/m-series/m1-enclosure-datasheet.md index dc39db138c..cfd53dd898 100644 --- a/src/content/reference/datasheets/m-series/m1-enclosure-datasheet.md +++ b/src/content/reference/datasheets/m-series/m1-enclosure-datasheet.md @@ -202,7 +202,7 @@ A jumper located on the bottom side of the Muon selects the direction of expansi - Connecting `5V_IN` and center pin: Expansion card powers the Muon (typically from PoE) - Connecting `5V_OUT` and center pin: The Muon powers expansion card (from USB-C, USB, or LiPo) -{{imageOverlay src="/assets/images/m-series/muon-5v-jumper.jpg" alt="5V Jumper" class="full-width"}} +{{imageOverlay src="/assets/images/m-series/muon-5v-jumper.jpg" alt="5V Jumper"}} ## Schematic diff --git a/src/content/reference/datasheets/m-series/muon-datasheet.md b/src/content/reference/datasheets/m-series/muon-datasheet.md index 3c756033bc..b52709160f 100644 --- a/src/content/reference/datasheets/m-series/muon-datasheet.md +++ b/src/content/reference/datasheets/m-series/muon-datasheet.md @@ -188,7 +188,7 @@ A jumper located on the bottom side of the Muon selects the direction of expansi - Connecting `5V_IN` and center pin: Expansion card powers the Muon (typically from PoE) - Connecting `5V_OUT` and center pin: The Muon powers expansion card (from USB-C, USB, or LiPo) -{{imageOverlay src="/assets/images/m-series/muon-5v-jumper.jpg" alt="5V Jumper" class="full-width"}} +{{imageOverlay src="/assets/images/m-series/muon-5v-jumper.jpg" alt="5V Jumper"}} #### PoE power diff --git a/src/content/reference/datasheets/tachyon/tachyon-datasheet.md b/src/content/reference/datasheets/tachyon/tachyon-datasheet.md index df6bd0193e..a0715b003c 100644 --- a/src/content/reference/datasheets/tachyon/tachyon-datasheet.md +++ b/src/content/reference/datasheets/tachyon/tachyon-datasheet.md @@ -127,27 +127,27 @@ Power can be supplied by: | Label | Description | | ---: | :--- | -| 1 | Primary USB (USB1) | -| 2 | Secondary USB (USB2) | -| 4 | Activity LED | -| 5 | LiPo battery connector | -| 6 | DSI/CSI connector - DISP_CAM1 (display or camera) | -| 7 | CSI connector - CAM2 (camera only) | -| 8 | GNSS antenna | -| 9 | Built-in cellular antenna | -| 10 | QWIIC connector (3.3V I2C) | -| 11 | SD card (optional) | -| 12 | Debug connector (optional) | -| 13 | Raspberry Pi 40-pin expansion HAT connector | -| 14 | HAT 5V power direction jumper | -| 15 | Wi-Fi chip antenna | -| 16 | PCIe expansion connector | -| 17 | Device info (serial number data matrix code) | -| 18 | Button (power and mode) | -| 19 | Primary LED | -| 20 | Audio card connector | -| 21 | RTC battery connector (optional) | -| 22 | Connection for external button (optional) | +| 1 | Primary USB (USB1) | +| 2 | Secondary USB (USB2) | +| 4 | Activity LED | +| 5 | LiPo battery connector | +| 6 | DSI/CSI connector - DISP_CAM1 (display or camera) | +| 7 | CSI connector - CAM2 (camera only) | +| 8 | GNSS antenna | +| 9 | Built-in cellular antenna | +| 10 | QWIIC connector (3.3V I2C) | +| 11 | SD card (optional) | +| 12 | Debug connector (optional) | +| 13 | Raspberry Pi 40-pin expansion HAT connector | +| 14 | HAT 5V power direction jumper | +| 15 | Wi-Fi chip antenna | +| 16 | PCIe expansion connector | +| 17 | Device info (serial number data matrix code) | +| 18 | Button (power and mode) | +| 19 | Primary LED | +| 20 | Audio card connector | +| 21 | RTC battery connector (optional) | +| 22 | Connection for external button (optional) | diff --git a/src/content/reference/newMenu.json b/src/content/reference/newMenu.json index bc92271e8e..769d325e51 100644 --- a/src/content/reference/newMenu.json +++ b/src/content/reference/newMenu.json @@ -389,16 +389,6 @@ "dir": "msom-datasheet", "title": "M-SoM datasheet" }, - { - "dir": "muon-preview-datasheet", - "title": "Muon datasheet (preview)", - "internal": true - }, - { - "dir": "muon-samples", - "title": "Muon engineering samples", - "internal": true - }, { "dir": "muon-datasheet", "title": "Muon datasheet" @@ -410,6 +400,21 @@ { "dir": "m1-enclosure-datasheet", "title": "M1 Enclosure datasheet" + }, + { + "dir": "m-hat-datasheet", + "title": "M-HAT datasheet (preview)", + "internal": true + }, + { + "dir": "muon-preview-datasheet", + "title": "Muon datasheet (preview)", + "internal": true + }, + { + "dir": "muon-samples", + "title": "Muon engineering samples", + "internal": true } ] }, diff --git a/src/pinInfo/platforms/m-hat-ioex.json b/src/pinInfo/platforms/m-hat-ioex.json new file mode 100644 index 0000000000..a131064215 --- /dev/null +++ b/src/pinInfo/platforms/m-hat-ioex.json @@ -0,0 +1,148 @@ +{ + "id": 0, + "name": "m-hat-ioex", + "pins": [ + { + "num": 1, + "name": "3V3", + "desc": "3.3V power", + "isPower": true, + "net": "3V3" + }, + { + "num": 2, + "name": "GND", + "desc": "Ground", + "isPower": true, + "net": "GND" + }, + { + "num": 3, + "name": "A5", + "altName": "D14", + "desc": "A5 Analog in, GPIO", + "analogRead": true, + "analogWriteDAC": false, + "analogWritePWM": false, + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "digitalRead": true, + "digitalWrite": true, + "hardwareADC": "ADC7", + "hardwarePin": "P0.31", + "internalPull": "13K", + "is5VTolerant": false, + "isIO": true, + "net": "M2_A5", + "somPin": "RESERVED", + "tone": false + }, + { + "num": 4, + "name": "D23", + "desc": "GPIO", + "analogRead": false, + "analogWriteDAC": false, + "analogWritePWM": false, + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "digitalRead": true, + "digitalWrite": true, + "hardwarePin": "P1.03", + "internalPull": "13K", + "is5VTolerant": false, + "isIO": true, + "net": "M2_D23", + "somPin": "GPIO1", + "tone": false + }, + { + "num": 5, + "name": "A6", + "desc": "A6 Analog in, PWM, GPIO", + "analogRead": true, + "analogWriteDAC": false, + "analogWritePWM": true, + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "digitalRead": true, + "digitalWrite": true, + "hardwareADC": "ADC3", + "hardwarePin": "P0.05", + "hardwareTimer": "PWM2", + "internalPull": "13K", + "is5VTolerant": false, + "isIO": true, + "net": "M2_A6", + "somPin": "RESERVED", + "tone": "A0, A1, A6, and A7 must have the same frequency." + }, + { + "num": 6, + "name": "D24", + "desc": "D24 on M-SoM, NC on B-SoM", + "isIO": true, + "net": "M2_D24" + }, + { + "num": 7, + "name": "SOM14", + "desc": "SOM14 (M.2 Pin 51), NC", + "isIO": true, + "net": "SOM14" + }, + { + "num": 8, + "name": "D25", + "desc": "D25 on M-SoM, NC on B-SoM", + "isIO": true, + "net": "M2_D25" + }, + { + "num": 9, + "name": "SOM17", + "desc": "SOM 17 (M.2 Pin 57), NC", + "isIO": true, + "net": "SOM17" + }, + { + "num": 10, + "name": "D6", + "desc": "PWM, GPIO", + "analogRead": false, + "analogWriteDAC": false, + "analogWritePWM": true, + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "digitalRead": true, + "digitalWrite": true, + "hardwarePin": "P1.04", + "hardwareTimer": "PWM1", + "internalPull": "13K", + "is5VTolerant": false, + "isIO": true, + "net": "M2_D6", + "somPin": "PWM2", + "tone": "D4, D5, and D6 must have the same frequency." + } + ], + "diagram": { + "columns": [ + "num", + "name", + [ + "isPower", + "hardwareADC", + "i2c" + ], + [ + "spi", + "swd" + ], + [], + [ + "hardwareTimer" + ], + [ + "serial" + ], + "hardwarePin" + ] + } +} \ No newline at end of file diff --git a/src/pinInfo/platforms/m-hat-m2.json b/src/pinInfo/platforms/m-hat-m2.json new file mode 100644 index 0000000000..cf16701521 --- /dev/null +++ b/src/pinInfo/platforms/m-hat-m2.json @@ -0,0 +1,331 @@ +{ + "id": 0, + "name": "m-hat-m2", + "pins": [ + { + "num": 17, + "name": "D21", + "desc": "USB PD controller reset, pin is NFC1 on B-SoM", + "connectedTo": "STUSB4500", + "direction": "O", + "isIO": true, + "net": "PD_RST" + }, + { + "num": 19, + "name": "D20", + "desc": "USB PD controller alert, pin is NFC2 on B-SoM", + "connectedTo": "STUSB4500", + "direction": "I", + "isIO": true, + "net": "PD_ALERT" + }, + { + "num": 20, + "name": "SCL", + "desc": "I2C SCL", + "connectedTo": "Multiple", + "direction": "I/O", + "net": "M2_SCL" + }, + { + "num": 22, + "name": "SDA", + "desc": "I2C SDA", + "connectedTo": "Multiple", + "direction": "I/O", + "net": "M2_SDA" + }, + { + "num": 23, + "name": "A0", + "desc": "HIGH to enable SoM to Pi UART", + "connectedTo": "FSA2567", + "digitalWrite": true, + "direction": "O", + "isIO": true, + "net": "SEL" + }, + { + "num": 32, + "name": "MODE", + "desc": "MODE button for Particle SoM", + "connectedTo": "MODE button", + "direction": "I", + "net": "M2/MODE" + }, + { + "num": 33, + "name": "A1", + "desc": "Grove A1, Input, Output, ADC, PWM", + "analogRead": true, + "analogWriteDAC": false, + "analogWritePWM": true, + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "connectedTo": "Grove A1", + "digitalRead": true, + "digitalWrite": true, + "direction": "I/O", + "hardwareADC": "ADC2", + "hardwarePin": "P0.04", + "hardwareTimer": "PWM2", + "internalPull": "13K", + "is5VTolerant": false, + "isIO": true, + "net": "M2_A1/MISO", + "somPin": "ADC1", + "tone": "A0, A1, A6, and A7 must have the same frequency." + }, + { + "num": 34, + "name": "RESET", + "desc": "RESET button for Particle SoM", + "connectedTo": "RESET button", + "direction": "I", + "net": "M2/RESET" + }, + { + "num": 35, + "name": "A2", + "desc": "Grove A2, Input, Output, ADC", + "analogRead": true, + "analogWriteDAC": false, + "analogWritePWM": false, + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "connectedTo": "Grove A2", + "digitalRead": true, + "digitalWrite": true, + "direction": "I/O", + "hardwareADC": "ADC4", + "hardwarePin": "P0.28", + "internalPull": "13K", + "is5VTolerant": false, + "isIO": true, + "net": "M2_A2/SCK", + "somPin": "ADC2", + "tone": false + }, + { + "num": 36, + "name": "TXD", + "desc": "UART serial TXD, connects to Pi UART0 RXD", + "connectedTo": "HAT", + "direction": "O", + "isIO": true, + "net": "M2_TXD", + "rpiFunction": "UART0_RX", + "rpiGPIO": "GPIO15", + "serial": "Serial1 TX|TX. Use Serial1 object.", + "somPin": "TX" + }, + { + "num": 37, + "name": "A3", + "desc": "LiPo to 5V boost converter (HIGH to turn off, default on)", + "connectedTo": "DML3006", + "digitalWrite": true, + "direction": "O", + "isIO": true, + "net": "EN1_CTR" + }, + { + "num": 38, + "name": "RXD", + "desc": "UART serial RXD, connects to Pi UART0 TXD", + "connectedTo": "HAT", + "direction": "I", + "isIO": true, + "net": "M2_RXD", + "rpiFunction": "UART0_TX", + "rpiGPIO": "GPIO14", + "serial": "Serial1 RX|RX. Use Serial1 object.", + "somPin": "RX" + }, + { + "num": 40, + "name": "CTS", + "desc": "UART serial CTS, connects to Pi UART0 RTS", + "connectedTo": "HAT", + "direction": "I", + "isIO": true, + "net": "M2_D3/CTS", + "rpiFunction": "UART0_RTS", + "rpiGPIO": "GPIO17", + "serial": "Serial1 CTS|CTS. Use Serial1 object.", + "somPin": "RESERVED" + }, + { + "num": 41, + "name": "A4", + "desc": "DCIN or USB boost-buck converter (HIGH to turn off, default on)", + "connectedTo": "MP28167", + "digitalWrite": true, + "direction": "O", + "isIO": true, + "net": "EN2_CTR" + }, + { + "num": 42, + "name": "RTS", + "desc": "UART serial RTS, connects to Pi UART0 CTS", + "connectedTo": "HAT", + "direction": "O", + "isIO": true, + "net": "M2_D2/RTS", + "rpiFunction": "UART0_CTS", + "rpiGPIO": "GPIO16", + "serial": "Serial1 RTS|RTS. Use Serial1 object.", + "somPin": "RESERVED" + }, + { + "num": 47, + "name": "A7", + "desc": "PMIC and fuel gauge interrupt output", + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "connectedTo": "PM-BAT", + "digitalRead": true, + "direction": "I", + "isIO": true, + "net": "M2_A7/PMIC_INT" + }, + { + "num": 48, + "name": "CS", + "desc": "Pi power control by GPIO4", + "connectedTo": "HAT", + "digitalWrite": true, + "direction": "O", + "isIO": true, + "net": "WAKE_RPI_CTR", + "rpiFunction": "GPIO4", + "rpiGPIO": "GPIO4" + }, + { + "num": 51, + "name": "SOM14", + "desc": "NC on B-SoM", + "connectedTo": "IOEX connector", + "direction": "I/O", + "net": "SOM14" + }, + { + "num": 57, + "name": "SOM17", + "desc": "NC on B-SoM", + "connectedTo": "IOEX connector", + "direction": "I/O", + "net": "SOM17" + }, + { + "num": 58, + "name": "D24", + "desc": "On IOEX connector, NC on B-SoM", + "connectedTo": "IOEX connector", + "direction": "I/O", + "net": "M2_D24" + }, + { + "num": 59, + "name": "D26", + "desc": "USB PD controller attach interrupt, NC on B-SoM", + "connectedTo": "STUSB4500", + "direction": "I", + "net": "PD_ATTACH" + }, + { + "num": 60, + "name": "D25", + "desc": "On IOEX connector, NC on B-SoM", + "connectedTo": "IOEX connector", + "direction": "I/O", + "net": "M2_D25" + }, + { + "num": 62, + "name": "D22", + "desc": "HIGH when Pi is supplying 3V3 to the HAT connector", + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "connectedTo": "HAT connector", + "digitalRead": true, + "direction": "I", + "isIO": true, + "net": "3V3_DETECTION" + }, + { + "num": 64, + "name": "D23", + "desc": "GPIO on IOEX connector", + "analogRead": false, + "analogWriteDAC": false, + "analogWritePWM": false, + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "connectedTo": "IOEX connector", + "digitalRead": true, + "digitalWrite": true, + "direction": "I/O", + "hardwarePin": "P1.03", + "internalPull": "13K", + "is5VTolerant": false, + "isIO": true, + "net": "M2_D23", + "somPin": "GPIO1", + "tone": false + }, + { + "num": 66, + "name": "D4", + "desc": "Temperature sensor ALERT output", + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "connectedTo": "TMP112A", + "digitalRead": true, + "direction": "I", + "isIO": true, + "net": "TEMP_ALERT" + }, + { + "num": 68, + "name": "D5", + "desc": "RTC/Watchdog FOUT/IRQ output", + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "connectedTo": "AB1805", + "digitalRead": true, + "direction": "I", + "isIO": true, + "net": "RTC_INT" + }, + { + "num": 70, + "name": "D6", + "desc": "PWM, GPIO on IOEX connector", + "analogRead": false, + "analogWriteDAC": false, + "analogWritePWM": true, + "attachInterrupt": "Yes. You can only have 8 active interrupt pins.", + "connectedTo": "IOEX connector", + "digitalRead": true, + "digitalWrite": true, + "direction": "I/O", + "hardwarePin": "P1.04", + "hardwareTimer": "PWM1", + "internalPull": "13K", + "is5VTolerant": false, + "isIO": true, + "net": "M2_D6", + "somPin": "PWM2", + "tone": "D4, D5, and D6 must have the same frequency." + }, + { + "num": 72, + "name": "D7", + "desc": "3V3_AUX power control (HIGH to turn on)", + "connectedTo": "PM-BAT", + "digitalWrite": true, + "direction": "O", + "isIO": true, + "net": "D7/AUX_POWER_EN" + } + ], + "diagram": { + "columns": [] + } +} \ No newline at end of file diff --git a/src/pinInfo/platforms/m-hat.json b/src/pinInfo/platforms/m-hat.json new file mode 100644 index 0000000000..f9141d44e0 --- /dev/null +++ b/src/pinInfo/platforms/m-hat.json @@ -0,0 +1,288 @@ +{ + "id": 0, + "name": "m-hat", + "pins": [ + { + "num": 1, + "name": "3V3", + "desc": "3.3V power", + "isPower": true, + "morePins": [ + 17 + ], + "net": "3V3_RPI" + }, + { + "num": 2, + "name": "5V", + "desc": "5V power", + "isPower": true, + "morePins": [ + 4 + ] + }, + { + "num": 3, + "name": "GPIO2", + "desc": "GPIO2, SDA", + "isIO": true, + "rpiGPIO": 2 + }, + { + "num": 5, + "name": "GPIO3", + "desc": "GPIO3, SCL", + "isIO": true, + "rpiGPIO": 3 + }, + { + "num": 6, + "name": "GND", + "desc": "Ground", + "isPower": true, + "morePins": [ + 9, + 14, + 20, + 25, + 30, + 34, + 39 + ], + "net": "GND" + }, + { + "num": 7, + "name": "GPIO4", + "desc": "GPIO4, GPCKL0", + "isIO": true, + "m2Name": "CS", + "m2Pin": 48, + "net": "WAKE_RPI_ON/OFF", + "rpiGPIO": 4 + }, + { + "num": 8, + "name": "GPIO14", + "desc": "GPIO14, TXD0", + "isIO": true, + "m2Name": "RXD", + "m2Pin": 38, + "net": "M2_RXD_E", + "rpiGPIO": 14, + "serial": "UART0_TX", + "uart0": "UART0_TX" + }, + { + "num": 10, + "name": "GPIO15", + "desc": "GPIO15, RXD0", + "isIO": true, + "m2Name": "TXD", + "m2Pin": 36, + "net": "M2_TXD_E", + "rpiGPIO": 15, + "serial": "UART0_RX", + "uart0": "UART0_RX" + }, + { + "num": 11, + "name": "GPIO17", + "desc": "GPIO17", + "isIO": true, + "m2Name": "CTS", + "m2Pin": 40, + "net": "M2_D3/CTS_E", + "rpiGPIO": 17, + "serial": "UART0_RTS", + "uart0": "UART0_RTS" + }, + { + "num": 12, + "name": "GPIO18", + "desc": "GPIO18", + "isIO": true, + "rpiGPIO": 18 + }, + { + "num": 13, + "name": "GPIO27", + "altName": "GPIO27", + "isIO": true, + "rpiGPIO": 27 + }, + { + "num": 15, + "name": "GPIO22", + "desc": "GPIO22", + "isIO": true, + "rpiGPIO": 22 + }, + { + "num": 16, + "name": "GPIO23", + "desc": "GPIO23", + "isIO": true, + "rpiGPIO": 23 + }, + { + "num": 18, + "name": "GPIO24", + "desc": "GPIO24", + "isIO": true, + "rpiGPIO": 24 + }, + { + "num": 19, + "name": "GPIO10", + "desc": "GPIO10, MOSI", + "isIO": true, + "rpiGPIO": 10 + }, + { + "num": 21, + "name": "GPIO9", + "desc": "GPIO9, MISO", + "isIO": true, + "rpiGPIO": 9 + }, + { + "num": 22, + "name": "GPIO25", + "desc": "GPIO25", + "isIO": true, + "rpiGPIO": 25 + }, + { + "num": 23, + "name": "GPIO11", + "desc": "GPIO11, SCLK", + "isIO": true, + "rpiGPIO": 11 + }, + { + "num": 24, + "name": "GPIO8", + "desc": "GPIO8, SPI CE0", + "isIO": true, + "rpiGPIO": 8 + }, + { + "num": 26, + "name": "GPIO7", + "desc": "GPIO7, SPI CE1", + "isIO": true, + "rpiGPIO": 7 + }, + { + "num": 27, + "name": "GPIO0", + "desc": "GPIO0, ID_SD", + "i2c": "I2S0_SDA", + "isIO": true, + "rpiGPIO": 0 + }, + { + "num": 28, + "name": "GPIO1", + "desc": "GPIO1 (ID_SC)", + "i2c": "I2S0_SCL", + "isIO": true, + "rpiGPIO": 1 + }, + { + "num": 29, + "name": "GPIO5", + "desc": "GPIO5", + "isIO": true, + "rpiGPIO": 5 + }, + { + "num": 31, + "name": "GPIO6", + "desc": "GPIO6", + "isIO": true, + "rpiGPIO": 6 + }, + { + "num": 32, + "name": "GPIO12", + "desc": "GPIO12, PWM0", + "isIO": true, + "pwm": "PWM0", + "rpiGPIO": 12 + }, + { + "num": 33, + "name": "GPIO13", + "desc": "GPIO13, PWM1", + "isIO": true, + "pwm": "PWM1", + "rpiGPIO": 13 + }, + { + "num": 35, + "name": "GPIO19", + "desc": "GPIO19, PCM_FS", + "i2s": "I2S WS", + "isIO": true, + "rpiGPIO": 19 + }, + { + "num": 36, + "name": "GPIO16", + "desc": "GPIO16", + "isIO": true, + "m2Name": "RTS", + "m2Pin": 42, + "net": "M2_D2/RTS_E", + "rpiGPIO": 16, + "serial": "UART0_CTS", + "uart0": "UART0_CTS" + }, + { + "num": 37, + "name": "GPIO26", + "desc": "GPIO26", + "isIO": true, + "rpiGPIO": 26 + }, + { + "num": 38, + "name": "GPIO20", + "desc": "GPIO20, PCM_DIN", + "isIO": true, + "rpiGPIO": 20 + }, + { + "num": 40, + "name": "GPIO21", + "desc": "GPIO21, PCM_DOUT", + "isIO": true, + "rpiGPIO": 21 + } + ], + "diagram": { + "columns": [ + "num", + "name", + [ + "isPower", + "hardwareADC", + "i2c" + ], + [ + "spi", + "swd" + ], + [], + [ + "hardwareTimer" + ], + [ + "serial" + ], + "hardwarePin" + ] + } +} \ No newline at end of file diff --git a/test/crawler.js b/test/crawler.js index bf0f5b26bc..30b22a8c4a 100644 --- a/test/crawler.js +++ b/test/crawler.js @@ -49,6 +49,8 @@ var ignoreHosts = [ 'www.microchip.com', // 403 'www.papertrail.com', // 403 'www.mathworks.com', // 403 + 'memfault.com', // 403 + 'www.ptcrb.com', // 403 ]; var devices = ['photon', 'electron', 'argon', 'boron']; var isPullRequest = process.env.CIRCLE_PULL_REQUEST && process.env.CIRCLE_PULL_REQUEST !== 'false';