stm32 sleep support



  • Hi,

    yesterday I was playing around with blue pill board to see how it goes with MySensors. To my amazement I discovered that the sleep functionality is not implemented for stm32 architecture 🙂 are there any plans to support sleeping on current stm32 implementation ? And also are there any plans to support stm32L devices ? I think that stm32 devices are very interesting for MySensors projects. I know that now the NRF5 architecture is on the top priority, but there are other transports like RS-485, RFM69 etc. that could realy benefit from using arm based MCU. I realy love how different stm32s are pin compatible between different families. For example I could use stm32f103c8 in lqfp48 package in my next project, and when the stm32l1 support comes in I just swap it for stm32l151cc and voila, now I have ultra low power node 🙂 But before I go into stm32 I would like to hear from project maintainers if there are plans to actively support stm32.



  • @rozpruwacz one answer would be "Are you yourself willing to work on this stuff?" Being community project means that people from this community maintain the code and add functionality. So basically the most interested in some function member will write it and the rest may help to improve it.



  • I understand that there is no active developement in stm32 area 🙂 Unfortunetely I do not have time to maintain such a project 😞 but for sure I can help with testing.



  • @rozpruwacz well, I've looked at mysensors code sometime ago, when was testing it with nrf51822, at first it looks complex and scary, but when you look closely you can sort out what is going on there. I guess adding sleep function won't be too hard. I believe there is plenty of available code for stm32 and arduino. You just need to adapt it following the logic of sleep function mysensors provide for other platforms.
    To be honest I don't know why it isn't implemented yet, maybe someone from core developers can shed the light on this topic, maybe there are some troubles, but I guess it just absence of interest.



  • One problem with the STM32L devices is there do not seem to be any low cost dev boards available. If there were something like the blue pill, but with an STM32L, and it had arduino support, then adding it to MySensors would be worth the effort.

    A very interesting board is the AI Thinker RHF76-52. This has a SX1276 Radio (which MySensors could support with the RFM95 protocols) and STM32L05 processor on the same board. It could be a relatively small and cheap STM32L Lora board for MySensors with the right programming. But the STM32L05 does not seem to have any arduino support, so you have to program that even before you add the MySensors programming. Possible, but a lot of work. If someone knows how to program the STM32L05 with arduino, please share it. That seems like the first step to making the RHF76-52 a good MySensors board.



  • @monte I sniffed a little bit the topic and it seems that the first step would be to move to the Arduino_Core_STM32 from stm32duino github project (not the stm32duino.com on which mysensors is based). I don't know how those two projects relate to each other but for sure they are different project and have different API ... The github one supports a lot more stm32 devices inclueding stm32L 🙂 The second step would be to use STM32LowPower library form the same github user to implement sleeping.
    I could try to port mysensors to this new arduino core but as I wrote before I have not much spare time 🙂 so it may take a long time.



  • @nagelc AFAIK stm32L chips are pin compatible with stm32F, so all it takes is to desolder F chip and solder L chip. plus of course the cost of the L chip.



  • @rozpruwacz why not using one of the nrf52 boards? I was also using stm32 board (bluepill, blackpill, etc.) but at the end, the nrf52 has many advantages over stm32 chips. it is also a 32bit arm mcu, extrem low-power, a lot more ram/flash, a radio on board and it has arduino, platformio and mysensors support. and cheap boards are available.
    I'm using nrf52 with e-paper display (utra-low power) and the stm32 ram is not really sufficient. So I don't see any advantage to use stm32 boards over nrf52.



  • @heinzv as i wrote before there are other transports than just nrf. There is wired rs485, lora rfm95, and for those like me that live in a bunker the 2.4ghz band has very poor range so the 868mhz rfm69 is the solution. So there is plenty reason to not use nrf5 and for those cases stm32 is quite a good choice.



  • And stm32 mcus has very wide peripherial and memory options. For example stm32l4+ is up to 2MB flash and 640kB sram. So it is twice the amount of memory in nrf52840.



  • @rozpruwacz that is clear that you might use other radio's, this is just an added value to use it as it's on-chip and mysensors supports it already. you can just go ahead and combine it with lora/rfm95 (what I also do) and rs485.
    But the main question is: Have you found cheap maker boards with such mcu's like STM32L4S5 or STM32L4R5? I have not found anything so far. But I got nrf52840 boards for 5$ and bought 20 pieces at alibaba. AN 1MB flash and 256kB Ram is suffcient for many apps even with tft or epaper display. And you have already Arduino, Platform.io, mysensor, Segger IAR etc. support.
    But I dod agree that it would be nice to have a full STM32L4x5 support incl. sleep once maker boards are avaiable. Blue and Blackpill are at least not competitors to nRF52.



  • @heinzv please be advised that 52840 is not yet supported and I didn't come across any timeframes for releasing support for this chip.



  • @heinzv said in stm32 sleep support:

    But the main question is: Have you found cheap maker boards with such mcu's like STM32L4S5 or STM32L4R5?

    For me it is not the main question. Simply because there is no board that will fit all my needs regarding peripherials, size and shape. So for every project I need to design my own board, so it does not matter if there is a cheap maker board or not. Besides I do not recall any nrf52 maker boards that are cheap. Certainly You cannot call a maker board those small smd modules from aliexpress - they all required some kind of motherboard.



  • @rozpruwacz I have also my "own" nrf52840 mySensors board (50m33mm) which we designed together with ranseyer (made for a few cents). The small nRF5280 modules from RFstar which are on our relatively small mySensors board (which the mySensors 2.6 standard pinheader) cost around 5€. So I consider them as very cost effective.
    One of the very interesting MCU's a few of us have tried is the TI CC1352(P) which has 2,4GHz and 868MHz on-board, so you can use one of theme or both together, but there are only a few modules available and they cost almost 30€ and you need to place them on your own board such as the nRF52840 or any other modules which are meant to solder on own designed boards.


Log in to reply
 

Suggested Topics

  • 87
  • 3
  • 5
  • 10
  • 6
  • 2

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts