8000 v0.2.3 · daq-tools/pycom-micropython@7310a8d · GitHub
[go: up one dir, main page]

Skip to content

Commit 7310a8d

Browse files
committed
v0.2.3
* HAL: fixed an issue in the lgw_reg_r()/lgw_reg_w()/lgw_reg_rb()/lgw_reg_wb() functions to write the register page before reading/writing any register to avoid conflicting with MCU register page setting.
1 parent 97d82fb commit 7310a8d

File tree

3 files changed

+42
-32
lines changed

3 files changed

+42
-32
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.2
1+
0.2.3

libloragw/src/loragw_reg.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,8 @@ int lgw_reg_w(uint16_t register_id, int32_t reg_value) {
651651
}
652652

653653
/* select proper register page if needed */
654-
if ((r.page != -1) && (r.page != lgw_regpage)) {
654+
/* don't rely on lgw_regpage as the MCU could have changed the page index */
655+
if (r.page != -1) {
655656
com_stat += page_switch(r.page);
656657
}
657658

@@ -689,7 +690,8 @@ int lgw_reg_r(uint16_t register_id, int32_t *reg_value) {
689690
r = loregs[register_id];
690691

691692
/* select proper register page if needed */
692-
if ((r.page != -1) && (r.page != lgw_regpage)) {
693+
/* don't rely on lgw_regpage as the MCU could have changed the page index */
694+
if (r.page != -1) {
693695
com_stat += page_switch(r.page);
694696
}
695697

@@ -737,7 +739,8 @@ int lgw_reg_wb(uint16_t register_id, uint8_t *data, uint16_t size) {
737739
}
738740

739741
/* select proper register page if needed */
740-
if ((r.page != -1) && (r.page != lgw_regpage)) {
742+
/* don't rely on lgw_regpage as the MCU could have changed the page index */
743+
if (r.page != -1) {
741744
com_stat += page_switch(r.page);
742745
}
743746

@@ -780,7 +783,8 @@ int lgw_reg_rb(uint16_t register_id, uint8_t *data, uint16_t size) {
780783
r = loregs[register_id];
781784

782785
/* select proper register page if needed */
783-
if ((r.page != -1) && (r.page != lgw_regpage)) {
786+
/* don't rely on lgw_regpage as the MCU could have changed the page index */
787+
if (r.page != -1) {
784788
com_stat += page_switch(r.page);
785789
}
786790

readme.md

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
/ _____) _ | |
2-
( (____ _____ ____ _| |_ _____ ____| |__
3-
\____ \| ___ | (_ _) ___ |/ ___) _ \
4-
_____) ) ____| | | || |_| ____( (___| | | |
5-
(______/|_____)_|_|_| \__)_____)\____)_| |_|
6-
(C)2013 Semtech-Cycleo
1+
/ _____) _ | |
2+
( (____ _____ ____ _| |_ _____ ____| |__
3+
\____ \| ___ | (_ _) ___ |/ ___) _ \
4+
_____) ) ____| | | || |_| ____( (___| | | |
5+
(______/|_____)_|_|_| \__)_____)\____)_| |_|
6+
(C)2013 Semtech-Cycleo
77

88
LoRa Gateway project
99
=====================
@@ -13,18 +13,18 @@ LoRa Gateway project
1313

1414
This directory contains the sources of the library to build a LoRa Picocell
1515
Gateway based on a Semtech LoRa multi-channel RF receiver (a.k.a. concentrator).
16-
Once compiled all the code is contained in the libloragw.a file that will be
16+
Once compiled all the code is contained in the libloragw.a file that will be
1717
statically linked (ie. integrated in the final executable).
1818
The library implements the communication with the concentrator embedded MCU
1919
through a serial port.
2020

21-
The library also comes with a bunch of basic tests programs that are used to
21+
The library also comes with a bunch of basic tests programs that are used to
2222
test the different sub-modules of the library.
2323

2424
## 2. Helper programs
2525
---------------------
2626

27-
Those programs are included in the project to provide examples on how to use
27+
Those programs are included in the project to provide examples on how to use
2828
the HAL library, and to help the system builder test different parts of it.
2929

3030
### 2.1. util_pkt_logger ###
@@ -67,11 +67,17 @@ This software is used to obtain the unique id of the PicoCell gateway (the
6767
## 4. User Guide
6868
----------------
6969

70-
[A detailed PicoCell GW user guide is available here](http://www.semtech.com/images/datasheet/picocell_gateway_user_guide.pdf)
70+
[A detailed PicoCell GW user guide is available here](https://github.com/Lora-net/picoGW_hal/wiki/Instructions-&-User-guide)
7171

7272
## 5. Changelog
7373
---------------
7474

75+
### v0.2.3 ###
76+
77+
* HAL: fixed an issue in the lgw_reg_r()/lgw_reg_w()/lgw_reg_rb()/lgw_reg_wb()
78+
functions to write the register page before reading/writing any register to
79+
avoid conflicting with MCU register page setting.
80+
7581
### v0.2.2 ###
7682

7783
* HAL: updated MCU firmware version to match with picoGW_mcu V0.2.1 release.
@@ -120,24 +126,24 @@ device path to be used to communicate with the concentrator board (tty...).
120126
## 6. Legal notice
121127
------------------
122128

123-
The information presented in this project documentation does not form part of
124-
any quotation or contract, is believed to be accurate and reliable and may be
125-
changed without notice. No liability will be accepted by the publisher for any
126-
consequence of its use. Publication thereof does not convey nor imply any
127-
license under patent or other industrial or intellectual property rights.
128-
Semtech assumes no responsibility or liability whatsoever for any failure or
129-
unexpected operation resulting from misuse, neglect improper installation,
130-
repair or improper handling or unusual physical or electrical stress
131-
including, but not limited to, exposure to parameters beyond the specified
132-
maximum ratings or operation outside the specified range.
133-
134-
SEMTECH PRODUCTS ARE NOT DESIGNED, INTENDED, AUTHORIZED OR WARRANTED TO BE
135-
SUITABLE FOR USE IN LIFE-SUPPORT APPLICATIONS, DEVICES OR SYSTEMS OR OTHER
136-
CRITICAL APPLICATIONS. INCLUSION OF SEMTECH PRODUCTS IN SUCH APPLICATIONS IS
129+
The information presented in this project documentation does not form part of
130+
any quotation or contract, is believed to be accurate and reliable and may be
131+
changed without notice. No liability will be accepted by the publisher for any
132+
consequence of its use. Publication thereof does not convey nor imply any
133+
license under patent or other industrial or intellectual property rights.
134+
Semtech assumes no responsibility or liability whatsoever for any failure or
135+
unexpected operation resulting from misuse, neglect improper installation,
136+
repair or improper handling or unusual physical or electrical stress
137+
including, but not limited to, exposure to parameters beyond the specified
138+
maximum ratings or operation outside the specified range.
139+
140+
SEMTECH PRODUCTS ARE NOT DESIGNED, INTENDED, AUTHORIZED OR WARRANTED TO BE
141+
SUITABLE FOR USE IN LIFE-SUPPORT APPLICATIONS, DEVICES OR SYSTEMS OR OTHER
142+
CRITICAL APPLICATIONS. INCLUSION OF SEMTECH PRODUCTS IN SUCH APPLICATIONS IS
137143
UNDERSTOOD TO BE UNDERTAKEN SOLELY AT THE CUSTOMER'S OWN RISK. Should a
138-
customer purchase or use Semtech products for any such unauthorized
139-
application, the customer shall indemnify and hold Semtech and its officers,
140-
employees, subsidiaries, affiliates, and distributors harmless against all
144+
customer purchase or use Semtech products for any such unauthorized
145+
application, the customer shall indemnify and hold Semtech and its officers,
146+
employees, subsidiaries, affiliates, and distributors harmless against all
141147
claims, costs damages and attorney fees which could arise.
142148

143149
*EOF*

0 commit comments

Comments
 (0)
0