Big STM32 boards topic

oh sorry that was my fired i asked him to solve this problem if possible, but even he was not able to solve it.
Basically now i am using this library https://github.com/mcci-catena/arduino-lmic the latest version 3.0.99
and using arduino pro mini 16mhz @3.3v.
have eddited the project configuration header file in the library to this
// project-specific definitions
//#define CFG_eu868 1
//#define CFG_us915 1
//#define CFG_au915 1
//#define CFG_as923 1
// #define LMIC_COUNTRY_CODE LMIC_COUNTRY_CODE_JP /* for as923-JP */
//#define CFG_kr920 1
#define CFG_in866 1
#define CFG_sx1276_radio 1
#define LMIC_USE_INTERRUPTS

please tell me why my node is not able to send data continiously, it get strucked automatically after some time,

the gateway used is dragino
and have also disabled the frame counter checks in the device setting in ttn console.
Thanks in advance

This is an STM32 topic not AVR/Pro Mini. So off-topic.

AI-Thinker RA-01 module is 433/470 Mhz not 866 MHz.

WHICH Dragino gateway?
Is it 8-channel LoRaWAN compliant?

Be aware that single channel packet forwarders are are not LoRaWAN compliant and are not supported on this forum.

yes it is 8 channel dragino, actually i am able to send data to TTN via both OTAA and ABP, but the problem is the reliablity of the MCU… it get stucked… BTW. i have tested this RA-01 on diffrent MCU, mega2560, pro mini, stm32f103
with STM32F103, It is able to send only and only one data on ABP, while on atmel MCU they can send muntiple times but may hang any time and stops in between

my lora module is this oneWhatsApp Image 2020-04-09 at 9.49.53 PM

Well its perhaps not a surprise that the Pro Mini 3.3V @ 16Mhz is unreliable, that clock speed is out of spec for a 3.3V device. And the Mega2560 is normally a 5V device so needs logic level conversion circuits to connect to a 3.3V logic level lora device.

I was unaware that AI-Thinker actually makes a 800/900 MHz LoRa module.
The module is labeled as Ra-01 but that actually should be Ra-01H (the Ra-01 is 433/470 MHz only).
AI-Thinker Ra-01H

That is not true. Both ABP and OTAA will work (OTAA does not work if downlinks do not work),
but to get it working you will need to apply the workaround/patch that was already described in my above posts.

What caught my eye was that the module is labelled +18dBm, now +17dBm I would recognise.

Hi

TTN node that I built with Bluepill, rfm & platform.io: https://befinitiv.wordpress.com/2020/03/03/lorawan-node-with-bluepill-rfm95-platform-io/
In fact very similar to other projects posted here but so far I have not yet seen the bluepill,rfm,platformio combination floating around. Maybe it is of help to someone.

Best regards,
befi.

1 Like

Hello JTP,

I have same problem it seems it consumes 0,37 mA at sleep mode. Did you solve your problem ?

You need to be specific about your hardware and software and make some serious attempts to track down the cause.

What low power mode is being used? List everything connected.

Holding a signal against an internal pullup will typically cost 100 uA, against an external one more. Leaving an I2C bus to a de-powered peripheral enabled will cost a lot. Leaving a TCXO running, similarly…

Hello cslorabox,

Brief summary :
Thanks for your quick response. As hardware, I am using STM32L412KB with Semtech1276 RFM9
5W module.They are communicating over SPI interface. I also have LIS3DH accelerometer which is connected to STM32L412 over I2C line. As a software I am using Konstantin Belyalov’s lora library for STM32 and LIS3DH library of Fabio Tota.
For STM32 i am using HAL driver. MCU is woken up every 30 seconds with RTC. I use standby mode for the rest of the time (I also tested it with stop mode as well). Lora is used in sleep mode. When i use lora without sleep mode 2,5 mA is consumed but when i make lora enter in sleep mode, consumption is decreased to 0,37 mA.
I tested different GPIO configuration in order to decrease consumption accoding to AN4899 but i could not make current consumption lower than 0,37 mA. At last, i changed all gpio pings to analog and pulldown.
“Leaving an I2C bus to a de-powered peripheral enabled will cost a lot”. What do you mean with this sentence ? Because in our desing I2C pins are pulled-up. I tested it with digital output pull-up but current consumption didn’t change. I didnt do something with TCXO, i only set lora into sleep mode. I think it should do itself.

Thanks in advance.

Part numbers are a help, but really it would take examining the actual implementation detail of schematic and software to find the fault.

Consider going around and evaluating each I/Os sleep level compared to any internal or external pulling resistors.

See if you can get the radio out of the circuit entirely and measure the current without it.

Consider desoldering the accelerometer, or make sure you’ve gotten it into the right mode - I have one from another brand that consumes more current on power-on, and only hits low consumption when it’s been explicitly configured to the proper mode.

To understand whats going on, why the sleep current is higher than you think\want you really do have to start from the begining.

Trying to troubleshoot why a complete design, processor, LoRa device, I2C stuff and more does not provide a low sleep current is I have found, not very informative.

Start at the beginning.

What is the sleep current with just the processor and no other components ?

What happens when you add a LoRa device ?

What happens when you start adding I2C stuff ?

Thanks for your advices,
According to your directions, i checked GPIOs pin at standby and see that one of them seems to be floating (0,156 V at pulldown). And some GPIOs migth be misconfigured. I quickly test it and the consumption didnt change yet but i will check GPIOs pin by pin. I will let you know the result but it may take some time.

Then i will desolder LORA and ACC if i could not correct the consumption with GPIOs.

Does anyone have experience with these STM32F411CEU6 boards?

This board appears to be the nextgen of the older STMF103 based blackpills. It comes with STM32F411 that is more powerful, has more memory, floating point support and a USB-C connector. It comes with a bootloader that has USB support.

Available here.

The board is supported by the STM32 Arduino Core and supported by PlatformIO.

It has spare solder pads for a SOIC-8 chip on the bottom which is probably for adding a flash chip (and may also fit FRAM).

What are your thoughts about this board?

Any experience with deep sleep power usage?


Andreas Spiess has recently tested this board in his benchmark of STM32 boards (includes tips):

No idea, but I’m not sure why an F4 would be a good choice.

A while back after studying pinouts and concluding it should work I swapped out the STM32F103 on a bluepill with an STM32L073 that makes a great choice for low power sensors; admittedly I then never actually did anything with it…

Hello everybody,

I want to update my problem with latest tests. When i did desolder the Lora SX1276 and ACC, i can actually see the 7 uA consumption with STM32L412KB standby mode. I found some GPIOs are misconfigured and i can decrease the consumption from 0,37 mA to 0,18 mA. I can’t decrease further yet but i continue to change the configuration of GPIOs.

By the way i could not find any configuration to shutdown TCXO. Could you help me with this ?
I attached the schematic of my circuit.
STM with LORA.pdf (241.8 KB)

Thanks in advance

If the TCXO supply comes from or is controlled by a GPIO, you can shut it down, if it doesn’t you cannot…

Hello guys,

I want to update my situation again. Finally i can decrease the current consumption to 10 uA. First of all i start using stop mode instead of standby mode (I think gpio internal pull up pull downs not working in standby mode). Secondly, i disconnected dio3, dio4 and dio5 pins of sx1276. I think they consume power because they connected to 5V tolerant pins. Lastly, accelerometer SA0 pin was grounded. As design perspective it was not wrong but consumes to much energy according to datasheet. I changed it and connected to VCC. I hope these information helps someone who is going crazy :slight_smile:) and thank you for helping me.

Best Regards

Hello nicomedia,
I have made my own STM32 board with STM32L051 and RFM95W. I can power down to 1,5 - 1,9 uA in sleep mode with a BME280 attached. checkout https://www.iot-lab.org/blog/370/ for some inspiration.
Regards, Leo.

2 Likes

Hello everyone.
I have stm32 bluepill and lora module sx1276. I am using the guide made by: www.iotbyskovholm.dk/?Q=content/ibm-lmic-stm32cubemx. Unfortunately, the LoRa module is not transmitting, the program sends the “EV_TXSTART unkown event” message all the time. On thethingsnetwork, my node has an online status, but has not sent any package. Does anyone know what the problem is?

I would like to use an STM32 HAL code in STM32 Cube IDE and not an Arduino.

n1 n2