/ _____) _ | |
( (____ _____ ____ _| |_ _____ ____| |__
\____ \| ___ | (_ _) ___ |/ ___) _ \
_____) ) ____| | | || |_| ____( (___| | | |
(______/|_____)_|_|_| \__)_____)\____)_| |_|
(C)2017 Semtech-Cycleo
This directory contains the sources code of the Keil project to build a Picocell Gateway MCU firmware based on the Semtech LoRa Picocell Gateway reference design. The target MCU is a STM32F401CD. The firmware implements either a USB CDC protocol or a UART protocol to bridge commands coming from host to the SX1308 SPI interface. The embedded firmware takes in charge the power management of the SX1308 during the downlink to respect the 500MA max power constraint in the USB plug.
((( Y )))
|
|
+- -|- - - - - - - - - - - - -+ xxxxxxxxxxxx +--------+
|+--+-----------+ +------+| xxx xxx | |
|| | | || xx Internet xx | |
|| Pico Cell GW |<----+ Host |<-----xx or xx------>| |
|| STM32F401CD | USB/| || xx Intranet xx | Server |
|| Sx1308 | UART+------+| xxx xxx | |
|| 2*SX1257 | Linux | xxxxxxxxxxxx | |
|+--------------+ | | |
| | +--------+
| |
+- - - - - - - - - - - - - - -+
The MAIN/ directory contains the main program that runs on the MCU, which launches the USB/UART commands interpreter to communicate with the Host.
The CmdUSB/ directory contains the USB/UART command interpreter to handle the communication between the Host and the concentrator. It is a bridge to the HAL which communicates with the SX1308 through SPI.
The STM32 USB CDC library modified for this reference design.
The LoRa concentrator Hardware Abstraction Layer C library to configure the hardware, send and receive packets.
The bin/ directory contains the precompiled binary files in .hex or .dfu formats, for both USB and UART communication bridges. To load the binary file into the target MCU flash memory, you have to:
Make the MCU enter DFU mode:
Program the binary into the MCU flash memory:
ex:
dfu-util -a 0 -D pgw_fw_usb.dfu
Note: you may have to use sudo depending on your priviledges.
Unplug/replug USB PicoCell GW to exit DFU mode.
Make the MCU enter UART bootloader:
Program the binary into the MCU flash memory:
ex:
stm32flash -b 115200 /dev/ttyS0 -v -w pgw_fw_uart.hex -g 0x0
In order to compile the whole project, a Keil project is provided in the src/ directory. Open the pgw.uvproj file in Keil and rebuild all.
By default, it builds the project for using USB communication bridge. In order to use the UART instead, uncomment the following line in src/MAIN/board.h before building all the project.
#define USE_UART 1
After the compilation as succeeded, a Pgw.hex file is created in the bin/ directory. It is the file to be programmed in the MCU flash memory. Refer to section 2 of this document to get information for flashing. A DFU file can be created from this .hex file using the "Dfu file manager" tool provided by STmicroelectronics. www.st.com/resource/en/user_manual/cd00155676.pdf
A detailed PicoCell GW user guide is available here
The information presented in this project documentation does not form part of any quotation or contract, is believed to be accurate and reliable and may be changed without notice. No liability will be accepted by the publisher for any consequence of its use. Publication thereof does not convey nor imply any license under patent or other industrial or intellectual property rights. Semtech assumes no responsibility or liability whatsoever for any failure or unexpected operation resulting from misuse, neglect improper installation, repair or improper handling or unusual physical or electrical stress including, but not limited to, exposure to parameters beyond the specified maximum ratings or operation outside the specified range.
SEMTECH PRODUCTS ARE NOT DESIGNED, INTENDED, AUTHORIZED OR WARRANTED TO BE SUITABLE FOR USE IN LIFE-SUPPORT APPLICATIONS, DEVICES OR SYSTEMS OR OTHER CRITICAL APPLICATIONS. INCLUSION OF SEMTECH PRODUCTS IN SUCH APPLICATIONS IS UNDERSTOOD TO BE UNDERTAKEN SOLELY AT THE CUSTOMER'S OWN RISK. Should a customer purchase or use Semtech products for any such unauthorized application, the customer shall indemnify and hold Semtech and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs damages and attorney fees which could arise.
EOF
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。