When I remove the USE_DEBUGGER Symbol I get stuck in Infinite Loop

I am using the provided example I have it working and sending packets to TTN when the symbol USE_DEBUGGER is set however when I set my Symbols:


When I run it on the board it gets stuck in an Infinite loop on line 112: image

Any advice on how to get past this?

Hi @oharkins

A few days ago, a customer from Mainland China reported the same problem, when we saw you have a same problem again today, which attracted our attention. I just took two brand new Node 151 for testing, everything is normal. I think the problem may be in the configuration.

Here is mine micro definition (maybe you don’t need ADC_measurement):

In order to use debug function of Node 151, pay attention to two things:

  1. Must enable USE_DEBUGGER
    Because the deep sleep mode have disabled the SWD and SWCLK pins.

  2. Must disable the USB_VCP function
    USB_VCP is the micro definition for STM32L151’s USB virtual serial port, use virtual serial port and debug function at the same time, will cause a conflict.

I didn’t find relevant documents for this conflict, but with testing, the conflict does exist. I think it may be a protection mechanism of STM32. Because the SW debugging mode will power the chip, and the USB will also power the chip. It is very dangerous for a chip to have two sets of different total power supplies.

Hi, I am trying to go into low power mode, and the ADC is part of what I got sent with a new config. I have found that when USE_DEBUGGER is removed it removes the UART and when you send any UART command it faults. Can you try to run the example program and put it in low power mode, and get response from a Lora Gateway?

From this link I am trying to do step 4

4. Enable low power

Just remove USE_DEBUGGER and USB_VCP in Keil macro definitions, recompile and redownload to your board. Test the current in the batter, if close to those value , it’s working:

Just need remember one thing: Low power (deep sleep) can’t work with Debug mode at the same time.

In the example, already have example that send data via LoRaWAN protocol and sleep in loop.

That is what is not working when I remove all the Debug i am not getting any talking to TTN however when debug is on I am getting communication with The Things network. Can I get the latest update to the firmware that you have? I have requested in an email but have not received a response.

Technical issues are discussed at the forum first.Because while solving your problem, it may be helpful to others

The V1.1 is the last version. If I recall, refer to this document and remove the macro definition DEBUG and USE_DEBUGGER, this project will work.

Anyway, I will confirm next Monday.