SAM R34/R35
SAM R34/R35 Microchip LoRaWAN™ Stack Software API
Reference Manual
Introduction
Microchip LoRaWAN Stack (MLS) Software API provides an interface to the different software modules.
This document describes how to configure and enable functionalities of the API software. A general
description of each API is provided including the functionalities, syntax, responses, and an example. The
API description defines the parameter with its type, range (valid /acceptable values), the default value
(when available), and the factory-programmed value (when applicable).
Default value is set automatically if the parameter is omitted and at the software reset (if the command
setting is not stored in NVM). The factory-programmed value is set at the software reset when the setting
is not modified with respect to the manufacturer setting; it is valid for the commands that store the setting
in Nonvolatile Memory (NVM).
MLS provides APIs for following software modules:
LoRaWAN MAC Layer (MAC)
LoRaWAN Radio Layer (TAL)
Persistent Data Server (PDS)
Power Manager Module (PMM)
Hardware Abstraction Layer (HAL)
© 2018 Microchip Technology Inc.
DS70005382A-page 1
Table of Contents
Introduction......................................................................................................................1
1. Quick Reference Info.................................................................................................4
1.1. Reference Documentation............................................................................................................4
1.2. Acronyms and Abbreviations Used.............................................................................................. 4
1.3. LoRaWAN Stack Directory Structure............................................................................................4
2. LoRaWAN API........................................................................................................... 6
2.1. MAC API.......................................................................................................................................6
2.1.1. LORAWAN_Init.............................................................................................................. 6
2.1.2. LORAWAN_Reset......................................................................................................... 6
2.1.3. LORAWAN_Join............................................................................................................ 7
2.1.4. LORAWAN_Send.......................................................................................................... 8
2.1.5. LORAWAN_SetAttr........................................................................................................9
2.1.6. LORAWAN_GetAttr..................................................................................................... 10
2.1.7. LORAWAN_Pause.......................................................................................................11
2.1.8. LORAWAN_Resume....................................................................................................11
2.1.9. LORAWAN_ForceEnable............................................................................................ 12
2.1.10. LORAWAN_ReadyToSleep......................................................................................... 12
2.2. TAL API...................................................................................................................................... 13
2.2.1. RADIO_Init...................................................................................................................13
2.2.2. RADIO_Receive.......................................................................................................... 13
2.2.3. RADIO_Transmit..........................................................................................................14
2.2.4. RADIO_TransmitCW....................................................................................................15
2.2.5. RADIO_StopCW..........................................................................................................15
2.2.6. RADIO_SetAttr............................................................................................................ 16
2.2.7. RADIO_GetAttr............................................................................................................16
2.3. Stack Attributes.......................................................................................................................... 17
2.3.1. Regional Configuration Parameters.............................................................................17
2.3.2. LoRaWAN/MAC Attributes...........................................................................................18
2.3.3. Radio/TAL Attributes....................................................................................................21
3. Supporting MAC Layers.......................................................................................... 23
3.1. Regional Band Layer..................................................................................................................23
3.2. PMM Layer................................................................................................................................. 23
3.2.1. PMM Files....................................................................................................................23
3.2.2. PMM APIs....................................................................................................................23
3.2.2.1. PMM_Sleep...............................................................................................23
3.3. PDS Layer.................................................................................................................................. 24
3.3.1. PDS Files.....................................................................................................................24
3.3.2. PDS_Init.......................................................................................................................25
3.3.3. PDS_UnInit..................................................................................................................26
3.3.4. PDS_Store...................................................................................................................26
3.3.5. PDS_Restore...............................................................................................................27
SAM R34/R35
© 2018 Microchip Technology Inc.
DS70005382A-page 2