Hello. I'm trying to make a low power board.

Post here first, or if you can't find a relevant section!
myksj1105
Posts: 86
Joined: Sun Jun 18, 2023 11:35 am
Answers: 2

Hello. I'm trying to make a low power board.

Post by myksj1105 »

Hello. I'm trying to make a low power board. I would appreciate it if you could give me some 'advice' or 'additional comments'.

1. Deep-sleep mode operation
2. Event occurrence: wake up
3. Save count eeprom
4. Deep-slip
repeat.....



1. MCU: STM32L151C8
I am trying to select the above MCU. I'm planning to use the 'L' model because it has low power.

2. CORE: https://github.com/stm32duino/Arduino_Core_STM32
The core is intended to be structured as follows.

3. I want to make a board without using ‘CLOCK’ or ‘crystal’.
Is it possible to use 'STM32DUINO' without using 'Crystal'?
(In other words, is the firmware available through Arduino IDE?)

4. Can ‘BOOT’ be set to ‘generic_boot20_pc13’?


I would appreciate it if you could give me some 'advice' or 'additional comments'.
thank you
myksj1105
Posts: 86
Joined: Sun Jun 18, 2023 11:35 am
Answers: 2

Re: Hello. I'm trying to make a low power board.

Post by myksj1105 »

3. I want to make a board without using ‘CLOCK’ or ‘crystal’.
Is it possible to use 'STM32DUINO' without using 'Crystal'?
(In other words, is the firmware available through Arduino IDE?)

Is there a way to code through 'Arduino IDE' without using 'Crystal'?

4. Can ‘BOOT’ be set to ‘generic_boot20_pc13’?

What file (bin file) should I use to boot?
STM32ardui
Posts: 43
Joined: Mon May 06, 2024 1:46 pm
Answers: 1
Location: Germany

Re: Hello. I'm trying to make a low power board.

Post by STM32ardui »

1. Until now you opened a lot of threads, most of them are cryptic.
I don't understand what you ask with "Can ‘BOOT’ be set to ‘generic_boot20_pc13’" as same as "How can I hold the boot" in another topic.
For most users here, english is a foreign language. So it would be helpful, if you can be more detailed with your descriptions.

2. If you want to use a special STM32-µC, you should read the datasheet.
Look for a chapter clock management, if there is a paragraph about startup clock. If µC can start with HSI, it is the first step.

Some µC can hold date/time by VBAT-voltage from a coin battery. RTC needs LSE for that. Serial communication needs a clock, that is precise enough. It depends on temperature range, baud rate etc. So you have to keep in mind more that one topic for the question, if a µC can run with internal oscillator.

myksj1105 wrote: Thu May 23, 2024 11:41 pm What file (bin file) should I use to boot?
???
You compile a C++ program with ArduinoIDE.
For upload ArduinoIDE calls CLI-version of STM32CubeProgrammer. If you ever looked, what happens in output window, you should see, that CLI is using (automaticly) a bin-file.
But what this has to do with "boot"???
myksj1105 wrote: Thu May 23, 2024 11:41 pm Can ‘BOOT’ be set to ‘generic_boot20_pc13’?
In AN2606 you will find boot pattern for your µC.
The easiest way to upload is SWD and a STLink V2 - my opinion ...
User avatar
fpiSTM
Posts: 1776
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 92
Location: Le Mans
Contact:

Re: Hello. I'm trying to make a low power board.

Post by fpiSTM »

myksj1105 wrote: Thu May 23, 2024 6:36 am Hello. I'm trying to make a low power board. I would appreciate it if you could give me some 'advice' or 'additional comments'.

1. Deep-sleep mode operation
2. Event occurrence: wake up
3. Save count eeprom
4. Deep-slip
repeat.....
Use the STM32LowPower which have several examples and read the datasheet/ref manual to understand the low power mode.
myksj1105 wrote: Thu May 23, 2024 6:36 am 1. MCU: STM32L151C8
I am trying to select the above MCU. I'm planning to use the 'L' model because it has low power.

2. CORE: https://github.com/stm32duino/Arduino_Core_STM32
The core is intended to be structured as follows.
Don't understand this:
The core is intended to be structured as follows.
This core support the board so use it.
myksj1105 wrote: Thu May 23, 2024 6:36 am 3. I want to make a board without using ‘CLOCK’ or ‘crystal’.
Is it possible to use 'STM32DUINO' without using 'Crystal'?
(In other words, is the firmware available through Arduino IDE?)
You can do what you want, up to you to provide the correct clock config.
By default generic uses the internal oscillator (HSI).
myksj1105 wrote: Thu May 23, 2024 6:36 am 4. Can ‘BOOT’ be set to ‘generic_boot20_pc13’?

https://github.com/rogerclarkmelbourne/ ... ree/master

I would appreciate it if you could give me some 'advice' or 'additional comments'.
thank you
No link wit STM32L1 serie, read the Readme: https://github.com/rogerclarkmelbourne/ ... ree/master
It is for STM32F1/F4
myksj1105
Posts: 86
Joined: Sun Jun 18, 2023 11:35 am
Answers: 2

Re: Hello. I'm trying to make a low power board.

Post by myksj1105 »

@STM32ardui
Thank you for answer.

MCU: STM32L151C8 or STM32F103
I will create a low-power system using the above MCU.

1. RTC function is not required.
2. After counting, we try to record it internally through ‘EEPROM.h’.
3. I am curious if it is possible to use the ‘Arduino IDE’ source code without the internal ‘crystal’.
myksj1105
Posts: 86
Joined: Sun Jun 18, 2023 11:35 am
Answers: 2

Re: Hello. I'm trying to make a low power board.

Post by myksj1105 »

By default generic uses the internal oscillator (HSI).

@fpiSTM
Your answer is correct. That's what I want. Thank you.

1. From the STM32F103 ‘Circuit Diagram’, remove the crystals of ‘8MHz’ and ‘32.768K’.
2. After that, grab the bootloader.
- generic_boot20_pc13
3. How can I make the firmware operate as an ‘internal oscillator’?
STM32ardui
Posts: 43
Joined: Mon May 06, 2024 1:46 pm
Answers: 1
Location: Germany

Re: Hello. I'm trying to make a low power board.

Post by STM32ardui »

myksj1105 wrote: Fri May 24, 2024 7:30 am 3. I am curious if it is possible to use the ‘Arduino IDE’ source code without the internal ‘crystal’.
There is no crystal inside such a small package of STM32's.
LSI and HSI are using RC-oscillators. That's the reason, which they are not so accurate.

Once again: read the datasheet of your microcontroller!
Look if it will start on power on or reset with HSI (it should be the normal clock source).

If HSI is ok for you, you don't have to change clock source. And so you don't have to think about capabilities of ArduinoIDE vs STM32CubeIDE.

And you should buy a development board and test your program before you start the adventure to make an own board design!!!



P.S.: And you never use an "Arduino IDE source code"! You write a C++ program in editor of ArduinoIDE, you let IDE compile it, link it to libraries and upload the binary.
STM32ardui
Posts: 43
Joined: Mon May 06, 2024 1:46 pm
Answers: 1
Location: Germany

Re: Hello. I'm trying to make a low power board.

Post by STM32ardui »

You had similar question about crystal-less usage before:
viewtopic.php?p=13242#p13242

At the beginnig of a project it is a good strategy to define your requirements.
To say "I want to make a low-power-board" is not enough!
1. Should the board run by a (rechargeable) battery?
2. What is maximum capacity (may be limited by case)?
3. Does the board need maintenance for replacing battery and how often it can happen?
4. Do you read values by ADC or from a sensor (which interface)?
5. How often you have to read data? How long can µC sleep between 2 readings?

myksj1105 wrote: Fri May 24, 2024 7:36 am 1. From the STM32F103 ‘Circuit Diagram’, remove the crystals of ‘8MHz’ and ‘32.768K’.
The LSI RC-oscillator inside a STM32Fxxx needs max. 1 µA. An external LSE crystal needs max. 1.4 µA. Does it make sense to unsolder a crystal for 400 nA?

The difference btweeen HSI and HSE may be larger. But typical case outline of such a 4pin-crystal is 3.2x2.5 mm and footprint is 3.6x2.9 mm - so you have access to 0.2 mm solder area on each side. I don't think you will get it off without damaging pcb.
myksj1105
Posts: 86
Joined: Sun Jun 18, 2023 11:35 am
Answers: 2

Re: Hello. I'm trying to make a low power board.

Post by myksj1105 »

@STM32ardui

Thank you for answer. Thank you for your kind explanation.

1. Should the board run by a (rechargeable) battery?
- Proceeds without charging.
2. What is maximum capacity (may be limited by case)?
- 3.6~4.2V, lithium battery, 2000mAh
3. Does the board need maintenance for replacing battery and how often it can happen?
- I want to use it for 1 year.
4. Do you read values ​​by ADC or from a sensor (which interface)?
- It counts through the interrupter and goes into ‘deep sleep’ again
1) Interrupter ‘Wake up’
2) Internal variable counting, ‘EEPROM’ storage
3) ‘Deep Sleep’ mode.
5. How often do you have to read data? How long can µC sleep between 2 readings?
- This part varies depending on usage.
- It should probably be active for about 1 minute per hour.

I have a question.
1) Battery voltage: 3.6~4.2VDC
2) Voltage used: 3.3VDC
- You must use 'SMPS' to create 3.3VDC.

Q1) Can you recommend a low-power ‘SMPS’?
Q2) Is it possible to make 3.3VDC with low power other than 'SMPS'?
myksj1105
Posts: 86
Joined: Sun Jun 18, 2023 11:35 am
Answers: 2

Re: Hello. I'm trying to make a low power board.

Post by myksj1105 »

@STM32ardui
@fpiSTM

Hello. I'm testing it, but it doesn't work.

https://drive.google.com/file/d/1-jlk3H ... sp=sharing
https://drive.google.com/file/d/1dzZzKF ... sp=sharing

1) remove the crystals of ‘8MHz’ and ‘32.768K’.
2) The capacitor was not touched.
3) After removing the crystal, DFU USB is not recognized.

Q1) Do I need to set the internal 'clock'? But I don't know what to do.
Q2) Or, do I need to remove the capacitor as well? (20pF?)
Post Reply

Return to “General discussion”