Skip to content

Commit

Permalink
Merge pull request #223 from Luos-io/release/2.2.0
Browse files Browse the repository at this point in the history
release 2.2.0
  • Loading branch information
K0rdan authored Mar 15, 2022
2 parents 9cda2a4 + 5c9f166 commit 485e399
Show file tree
Hide file tree
Showing 57 changed files with 4,967 additions and 7 deletions.
1 change: 0 additions & 1 deletion docs/tools/tool.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ Luos provide many tools to interface control or monitor a product made with Luos
| [Pyluos](/docs/tools/pyluos) | Python library using JSON API to communicate with gate |
| [BootLoder](/docs/tools/boot) | Update node through Luos Network |
| [Monitoring](/docs/tools/monitoring) | all the utils that allow you to monitor a Luos network |
| [Freertos](/docs/tools/freertos) | How to use FreeRTOS with Luos |
8 changes: 3 additions & 5 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,19 +143,17 @@ module.exports = {
docs: {
sidebarPath: require.resolve('./sidebarsDocs.js'),
// Please change this to your repo.
editUrl:
'https://github.com/luos-io/Documentation',
editUrl: 'https://github.com/luos-io/Documentation',
versions: {
current: {
label: '2.2.0-beta 🚧',
label: '2.3.0-beta 🚧',
},
},
},
blog: {
showReadingTime: true,
// Please change this to your repo.
editUrl:
'https://github.com/luos-io/Documentation',
editUrl: 'https://github.com/luos-io/Documentation',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
Expand Down
1 change: 0 additions & 1 deletion versioned_docs/version-2.1.0/tools/tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ Luos provide many tools to interface control or monitor a product made with Luos
| [Pyluos](/docs/tools/pyluos) | Python library using JSON API to communicate with gate |
| [BootLoder](/docs/tools/boot) | Update node through Luos Network |
| [Monitoring](/docs/tools/monitoring) | all the utils that allow you to monitor a Luos network |
| [Freertos](/docs/tools/freertos) | How to use FreeRTOS with Luos |
368 changes: 368 additions & 0 deletions versioned_docs/version-2.2.0/api/api-json.mdx

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions versioned_docs/version-2.2.0/api/list.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
custom_edit_url: null
---

# API

This section details the APIs used by Luos. As of today, the only API is the JSON API. However, new APIs will complete the list in the future.

- [JSON API](/docs/api/api-json)
12 changes: 12 additions & 0 deletions versioned_docs/version-2.2.0/compatibility/ecosystem.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
custom_edit_url: null
---

import Image from '/src/components/Images.js';

# Ecosystem Compatibility

### Tools Compatibility

| Version | LUOS | LUOS ENGINE | SDK | Description |
| :--------------: | :---------------:| :------------:|:------------: |--------------------------------------------------: |
78 changes: 78 additions & 0 deletions versioned_docs/version-2.2.0/compatibility/mcu_demoboard.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
custom_edit_url: null
---

import Image from '/src/components/Images.js';

# MCU and Demo Board compatibility

Luos engine use ressource of MCU to create a network. This is already configure in LuosHAL file for many MCU To be plug and play.
This is the list of MCU directly compatible with Luos engine

### ST

| Family | MCU | Description |
| :--------------: | :---------------------------------: |-------------------------------------------------------: |
| STM32F0 | STM32F0X0 | |
| | STM32F0X1 | |
| | STM32F0X2 | LuosHAL default configuration on NUCLEO-F072RB |
| | STM32F0X8 | |
| STM32F4 | STM32F401 | Example on NUCLEO-F401RE |
| | STM32F405/415 | |
| | STM32F407/417 | |
| | STM32F410 | LuosHAL default configuration on NUCLEO-F410RB |
| | STM32F411 | |
| | STM32F412 | |
| | STM32F413/423 | |
| | STM32F427/437 | |
| | STM32F429/439 | |
| | STM32F446 | |
| | STM32F469/479 | |
| STM32G4 | STM32G4X1 | LuosHAL default configuration on NUCLEO-G431KB |
| | STM32G4X3 | |
| | STM32G4X4 | Example on NUCLEO-G474KE |
| STM32L4 | STM32L4x1 | |
| | STM32L4x2 | LuosHAL default configuration on NUCLEO-L432KC |
| | STM32L4x3 | |
| | STM32L4x5 | |
| | STM32L4x6 | |

### Atmel/Microship

| Family | MCU | Description |
| :--------------: | :---------------------------------: |-------------------------------------------------------: |
| ATSAMD | ATSAMD21Exx | |
| | ATSAMD21Gxx | |
| | ATSAMD21Jxx | LuosHAL default configuration on SAMDJ18A |

### Demo Board

| Board | Description |
| :----------------------------------: |-------------------------------------------------------------------------: |
| NUCLEO-F030R8 | |
| NUCLEO-F031K6 | |
| NUCLEO-F042K6 | |
| NUCLEO-F070RB | |
| NUCLEO-F072RB | Example with Luos |
| NUCLEO-F401RE | Example with Luos |
| NUCLEO-F410RB | Example with Luos |
| NUCLEO-F411RE | |
| NUCLEO-G431KB | Example with Luos |
| NUCLEO-G474KE | Example with Luos |
| NUCLEO-L412KB | |
| NUCLEO-L432KC | Example with Luos |
| NUCLEO-L433RC | |
| NUCLEO-L452RE | |
| ARDUINO_SAMD_ZERO | LuosHAL default configuration on ARDUINO |
| ARDUINO_SAMD_MKRZERO | |
| ARDUINO_SAMD_MKR1000 | |
| ARDUINO_SAMD_MKRWIFI1010 | |
| ARDUINO_SAMD_MKRFox1200 | |
| ARDUINO_SAMD_MKRWAN1300 | |
| ARDUINO_SAMD_MKRWAN1310 | |
| ARDUINO_SAMD_MKRGSM1400 | |
| ARDUINO_SAMD_MKRNB1500 | |
| ARDUINO_SAMD_NANO_33_IOT | |
| ARDUINO_SAMD_MKRVIDOR4000 | |


Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
custom_edit_url: null
---

import { customFields } from "/docusaurus.config.js";
import Tooltip from "@site/src/components/Tooltip.js";
import Image from "@site/src/components/Images.js";
import IconExternalLink from "@theme/IconExternalLink";

# Integrating Luos into an electronic board

To create and match with a default reference design, electronic boards must respect some design rules to work in a Luos network properly.

## Electronic design

A Luos-friendly electronic board must contain _at least_ the following elements:

- **1** <a href="https://en.wikipedia.org/wiki/Microcontroller" target="_blank">**MCU<IconExternalLink width="10"></IconExternalLink>**</a> (microcontroller unit): It hosts, as a node, the Luos firmware along with the different <Tooltip def={customFields.service_def} >services</Tooltip> (drivers and apps).
- **At least two connectors**: They allow to link boards together into a Luos network and link them as a daisy-chain or star mounting. Through PTP pins, nodes know if there is another node connected to the connector. This is used when the user wants to make a topology detection of the system.

## One-wire reference design

<div align="center">
<Image
src="/img/Luos_Network_Interface_OW.svg"
darkSrc="/img/Luos_Network_Interface_OW-dark.svg"
/>
</div>

Luos' One-wire official connector is <a href="https://octopart.com/df11-4dp-2ds%2852%29-hirose-261749" target="_blank">_DF11-4DP-2DS<IconExternalLink width="10"></IconExternalLink>_</a>.

## RS485 reference design

<div align="center">
<Image
src="/img/Luos_Network_Interface_485.svg"
darkSrc="/img/Luos_Network_Interface_485-dark.svg"
/>
</div>

Luos' RS485 official connector is <a href="https://octopart.com/df11-8dp-2ds%2824%29-hirose-39521447" target="_blank">_DF11-8DP-2DS<IconExternalLink width="10"></IconExternalLink>_</a>.

See the default pinout configuration in <a href="https://github.com/Luos-io/LuosHAL" target="_blank">_luos_hal_config.h<IconExternalLink width="10"></IconExternalLink>_</a> file for chosen the MCU family.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
custom_edit_url: null
---

import IconExternalLink from "@theme/IconExternalLink";

# Hardware consideration

When creating a Luos network, if you have a product with several nodes, it is mandatory to configure your MCU, to create the physical layer. In <a href="https://github.com/Luos-io/Examples/" target="_blank">Luos's examples on GitHub<IconExternalLink width="10"></IconExternalLink></a>, Luos uses RS485 with a driver or one-wire communication for this physical layer ([see Electronic design](./electronics) page), but other communication ways are possible.

Board examples and driver sources are available <a href="https://github.com/Luos-io/Examples/tree/master/Projects" target="_blank">on GitHub<IconExternalLink width="10"></IconExternalLink></a>. We encourage you to use them in the way you want.

You can find the schematic of a Luos-ready board called L0 <a href="https://github.com/Luos-io/Examples/tree/master/Hardware/l0" target="_blank">on Github<IconExternalLink width="10"></IconExternalLink></a> for a quick hardware example.
87 changes: 87 additions & 0 deletions versioned_docs/version-2.2.0/hardware-consideration/mcu.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
custom_edit_url: null
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Luos configuration

## Compatible MCUs

Luos can manage any type of microcontrollers as long as they are first added to the library manually. If your microcontroller is not supported yet, please contact us:

- by mail <a href="mailto:[email protected]">hello&#x40;luos.io</a>
- on <a href="https://github.com/Luos-io/Luos/issues/new?assignees=nicolas-rabault&labels=porting&template=porting-request.md&title=%5BMCU+PORTING%5D+" target="_blank">GitHub</a>

Check the list of MCU family Luos cover :<a href="https://github.com/Luos-io/LuosHAL" target="_blank">Hardware Abstraction Layers for MCU Families</a>,

## Default Configuration

Luos libraries is made to run on MCU and use hardware peripheral of the MCU to complete communication between services. In order to configure this low level part, Luos compagny provide, for many MCU family, a default configuration that can be follow to plug and play luos library with the chosen MCU family. The peripheral configuration is describe in files luos_hal_config.h in the repository <a href="https://github.com/Luos-io/LuosHAL" target="_blank">LuosHAL</a>, and can be redefined in the node_config.h file to fit with your design.

## Luos HAL configuration

To match pinout and fonctionality with your design, you can create or use the file `node_config.h` (see Luos example)
Base on the default configuration define in luos_hal_config.h, you can define in the file `node_config.h`, in the section "LUOS HAL LIBRARY DEFINITION", pinout usart timer etc.

This way you are able to change default hardware configuration so it need to be call in the preprossessor variable section of your IDE to be taken into consideration for your project

> **FYI:** Every example provide by luos has a node_config.h files and includes by the file platformio.ini
For example, redefine PTPA to fit with your design

in`luos_hal_config.h` this is defined as followed:

```c
#ifndef PTPA_PIN
#define PTPA_PIN GPIO_PIN_8
#endif
```

in`node_config.h` this should be redefined as followed:

```c
#define PTPA_PIN GPIO_PIN_11
```
There are many possible configurations that you can change, not all of them being necessary for your design:
<Tabs>
<TabItem value="Pinout" label="Pinout">
| Function | Description | Comments |
| :---------------------------------: | :-----------------------------------------------: | :------------------------------: |
| PORT_CLOCK_ENABLE | Activates clock for GPIO | Depends on port |
| RX_EN_PIN/TX_EN_PIN | Chooses pinout to activate Rx/Tx comms | Necessary for special comms |
| COM_TX_PIN/COM_RX_PIN | Chooses pinout for Rx/Tx comms | Adapts to the chosen serial bus |
| PTPX_PIN/PTPX_IRQ/PINOUT_IRQHANDLER | Chooses pinout, IRQ and callback for the PTP line | Necessary for topology detection |
</TabItem>
<TabItem value="Communication" label="Communication">
| Function | Description | Comments |
| :---------------------------------------: | :----------------------------------: | :-----------------------------: |
| LUOS_COM_CLOCK_ENABLE | Activates clock for serial | Depends on serial bus |
| LUOS_COM/LUOS_COM_IRQ/LUOS_COM_IRQHANDLER | Chooses serial bus, IRQ and callback | Adapts to the serial bus chosen |
| LUOS_DMA_CLOCK_ENABLE | Activates clock for DMA | Necessary for for Tx |
| LUOS_DMA_CHANNEL | Chooses Channel | Send Tx |
</TabItem>
<TabItem value="Timer" label="Timer">
| Function | Description | Comments |
| :---------------------------------------------: | :-----------------------------: | :-------------------: |
| LUOS_TIMER_CLOCK_ENABLE | Activates clock for Timeout | Necessary for Timeout |
| LUOS_TIMER/LUOS_TIMER_IRQ/LUOS_TIMER_IRQHANDLER | Chooses Timer, IRQ and callback | Necessary for Timeout |
</TabItem>
<TabItem value="Flash" label="Flash">
| Function | Description | Comments |
| :------------------------: | :------------------------------: | :-------------------------------: |
| PAGE_SIZE/ADRESS_LAST_PAGE | Defines space in flash for alias | Necessary to rename service alias |
</TabItem>
</Tabs>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
custom_edit_url: null
---

# Minimum requirements

Luos Library uses hardware and software MCU ressources. Here are the minimum requirements to make Luos Library work properly:

## MCU consideration

| Hardware | Specification |
| :--------: | :-------------------------------------------------------------------------------------: |
| Flash | Luos Library uses less than 20 kB of Flash memory |
| RAM | Luos Library uses at least 2 kB of RAM for Library usage and protocol message buffering |
| Stack | 512 B |
| Heap | 0 needed |
| GPIO | 4 in one wire / 5 in RS485 |
| Ressources | 1 USART, 1 Timer (option : DMA and CRC) |

## Network consideration

| MCU frequency | Bus frequency |
| :-----------: | :-----------: |
| >=48 MHz | 1 Mbps |
| >=32 MHz | 500 kbps |
| >=16 MHz | 250 kbps |
| >=8 MHz | 100 kbps |
Loading

1 comment on commit 485e399

@vercel
Copy link

@vercel vercel bot commented on 485e399 Mar 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.