background image

MLS/160A – System Reference 

 

D o c u m e n t   R e v i s i o n   1 . 1

 

9

 

 

OPERATING SYSTEM 

The  MLS/160A’s  firmware  is  built  with  the  lightweight  real  time  operating  system 

RIOT

.  

RIOT  is  a  free,  open  source  operating  system  and  is  designed  for  the  particular  require-
ments of Internet of Things (IoT) scenarios. For more information please see: 
 

https://riot-os.org/

 

 
RIOT  offers  a  low  memory  footprint,  high  energy  efficiency,  real-time  capabilities  and  a 
modular  and  configurable  communication  stack.  It  provides  a  microkernel,  utilities  like 
cryptographic libraries, data structures (bloom filters, hash tables, priority queues), a shell, 
various  network  stacks,  and  support  for  various  microcontrollers,  radio  drivers,  sensors, 
and configurations for entire platforms, e.g. the STM32 MCU family. 
 
The microkernel itself comprises thread management, a priority-based scheduler, a power-
ful API for inter-process communication (IPC), a system timer, and mutexes. 
 
All this makes it an ideal OS for the MLS/160A and opens up versatile options for own de-
velopments, as well as benefiting from community driven enhancements. 
 
In order to build an application or library with RIOT, you first need to download the source 
code. You can obtain the latest firmware code from the SSV Github account: 
 

https://github.com/SSV-embedded/fw-mls160a 

 
To  compile  RIOT  for  the  MLS/160A,  you  need  to  install  the  corresponding  toolchain  for 
STM32 MCUs (ARM 32-bit Cortex-M3). 
 
On a Linux host you may use the default GNU cross compiler for ARM architecture of your 
Linux distribution. Please refer to the RIOT webpage to see how to set up a cross compiler 
environment for a different operating system like Windows10. 
 

Table 7

 shows the STM32 GPIO mapping of the MLS/160A: 

 

RIOT OS 

STM32 

GPIO line in use 

MLS/160A 

I2C 

I2C1 

PB6/7 

BMI160/BME280 

UART0 

USART1 

PA9/10 

Debug Connector 

UART1 

USART2 

PA2/3 

J2 RS458P 

Direction1 

PortA1 

PA1 

IC2 RS485 Transceiver 

UART2 

USART3 

PB10/11 

J3 RS458S 

Direction2 

PortB14 

PB14 

IC3 RS485 Transceiver 

LED0 

PortC13 

PC13 

Power/Status LED 

Table 7:

 

STM32 GPIO mapping of MLS/160A 

 
 

Содержание MLS/160A

Страница 1: ...160A Soft Sensor System Reference SSV Software Systems GmbH D nenweg 5 D 30419 Hannover Phone 49 0 511 40 000 0 Fax 49 0 511 40 000 40 E mail sales ssv embedded de Document Revision 1 1 Date 2020 11...

Страница 2: ...3 INTERFACES 7 3 1 JTAG Debug J1 7 3 2 Primary RS485 Screw Terminal J2 8 3 3 Power Connector J4 8 3 4 Power Status LED D1 8 4 OPERATING SYSTEM 9 4 1 A B Boot Concept 10 4 2 Secure Device Update SDU 1...

Страница 3: ...squeezed or dam aged in any way when you set up the device Do NOT turn on the power supply while connecting any cables especially the pow er cables This could cause damaged device components First con...

Страница 4: ...MLS 160A System Reference 4 Document Revision 1 1 1 3 Block Diagram Figure 1 Block diagram MLS 160A 1 4 Nameplate Figure 2 Nameplate MLS 160A...

Страница 5: ...ution signed 16 bit integer Environmental Sensor Bosch BME280 Humidity Operating range 0 100 rel humidity Pressure Operating range 300 1100 hPa Temperature Operating range 40 85 C Software Operating s...

Страница 6: ...MLS 160A System Reference 6 Document Revision 1 1 2 OVERVIEW Figure 3 Overview MLS 160A...

Страница 7: ...n please refer to STM32 datasheet 5 TDI Test Data In 6 TXD1 Debug Port TXD1 Pin 7 TMS Test Mode Select 8 RXD1 Debug Port RXD1 Pin 9 TCK Test Clock 10 GND Ground 11 Reserved Do not use 12 Reserved Do n...

Страница 8: ...ite 2 GND Ground Brown Table 5 Pinout power connector CAUTION Providing the MLS 160A with a higher voltage than the regular 12 24 VDC 10 could cause damaged device components Do NOT turn on the power...

Страница 9: ...es All this makes it an ideal OS for the MLS 160A and opens up versatile options for own de velopments as well as benefiting from community driven enhancements In order to build an application or libr...

Страница 10: ...them may store the MLS 160A s firmware Figure 4 Division of the MCU Flash memory Header Each boot slot has a header containing following information as 32 bit unsigned integer uint32 magic_number hea...

Страница 11: ...teps Invalidating the inactive slot by setting its magic number from RIOT to 0000 Writing the new header and firmware excluding the magic number into the inactive slot The slot remains invalid because...

Страница 12: ...itches to the MEASURING state Invalid datagrams will be ignored MEASURING The sensors of the MLS 160A are cyclically polled with the configured sample rate The measuring data is sent within a measurin...

Страница 13: ...CCX Z GYRX Z TEMP HUM These enable bits define which measurement values of the sensors are used At least one value must be activated otherwise the configuration is invalid and will be ignored SAMPLE R...

Страница 14: ...cter M 0x4D is the identifier of the measuring datagram READING ACCX Z READING GYRX Z Measured value of the BMI160 sensor as 16 bit unsigned integer uint16 in little endian format READING TEMP READING...

Страница 15: ...rence Document Revision 1 1 15 Update During the update process several datagrams are sent between the remote station and the MLS 160A Figure 7 shows the update process in a diagram Figure 7 Diagram o...

Страница 16: ...OFFSET These 4 bytes define the offset of the firmware binary file in bytes little endian MAXCL These 2 bytes define the maximum chunk length of the firmware binary file in bytes little endian in this...

Страница 17: ...completely requestHMAC In this case the MLS 160A sends a verification datagram of 1 byte length with the ASCII character V 0x56 to the remote station Length in Bytes 1 0x56 V Table 14 Verification da...

Страница 18: ...mote station Length in Bytes 1 0x59 Y Table 16 Okay datagram from the MLS 160A denyUpdate If the HMAC is invalid the magic number of the updated slot is not changed and the slot remains invalid The ML...

Страница 19: ...MLS 160A System Reference Document Revision 1 1 19 6 MECHANICAL DIMENSIONS All length dimensions have a tolerance of 0 5 mm Figure 8 Mechanical dimensions of MLS 160A...

Страница 20: ...like shown in figure 9 Figure 9 Wiring diagram for the connection of the MLS 160A to an RMG 941 Wire color Pin MLS 160A Pin RMG 941 White 1 Vin 24 VDC A3 Vin 24 VDC Brown 2 GNDin A4 Ground Green 3 48...

Страница 21: ...evision Date Remarks Name Review 1 0 2020 06 15 First version WBU SSC 1 1 2020 11 18 Added chapter 7 WBU SSC The content of this document can change any time without announcement There is taken over n...

Отзывы: