lnlp / LMIC-node

LMIC-node | One example to rule them all. LMIC-node is an example LoRaWAN application for a node that can be used with The Things Network. It demonstrates how to send uplink messages, how to receive downlink messages, how to implement a downlink command and it provides useful status information. With LMIC-node it is easy to get a working node quickly up and running. LMIC-node supports many popular (LoRa) development boards out of the box. It uses the Arduino framework, the LMIC LoRaWAN library and PlatformIO.
MIT License
210 stars 104 forks source link

TCXO control not working with B-L072Z-LRWAN1 #26

Closed tipo1000A closed 2 years ago

tipo1000A commented 2 years ago

I'm making a custom board /node based on B-L072Z-LRWAN1 dev kit (just CMWX1ZZABZ module, no other MCU).

By default in B-L072Z-LRWAN1 TCXO_VCC (pin48) is on all the time (JP9, pins 2-3 shorted). LMIC-node works in this setting.

In order to save current in a battery powered node TCXO_VCC (pin48) must be shut down when not transmitting. In B-L072Z-LRWAN1 this is done by controlling TCXO_VCC (pin48) with PA12 (pin 1) by shorting pins 1-2 in JP9. LMIC-node does not work in this setting: LMIC-node doesn't control PA12 at all.

Is my finding correct? How can I fix it?

image

Thanks, Tipo

lnlp commented 2 years ago

Hi,

LMIC-node does not support / take into account power saving features like deep sleep or in this case powering down TXCO.

LMIC-node does not support these because deep sleep and any other power saving features are different per MCU platform and also depends on what other hardware features are implemented on any board (or not), while LMIC-node tries to be cross-platform and as simple ('basic') as possible.

Being able to enable via (solder) jumper, the controlling of TXCO VCC via a GPIO pin is a board specific implementation. LMIC-node supports the B-L072Z-LORAWAN1 in its default configuration. For any board specific options you will have to customize LMIC-node yourself. This explains why LMIC-node "does not control PA12 at all".

I'm not sure how you could implement this. My first assumption is that this may require some hooks in the LMIC library to make it possible. Maybe you can ask your question (related to the LMIC library) on MCCI's GitHub repository.