I have build quite a few wireless sensors and remote controls based on those cheap 433Mhz modules and tiny85. Here are my observations:
You don't need to power the wireless module from the microcontroller pin in order to save power, it consumes near nothing when the data pin in low.
When the data pin is high (it transmits) the power consumption is about 14mA, so it consumes about 7mA on average to transmit a message consisting of ones and zeros.
You really need an antennae, just solder a straight 17.2cm wire to it. You can just loop it around the perimeter of the remote if you can't keep it straight.
3V power supply is quite low, when your battery goes down to 2V it's even worst. I use a charge pump voltage doubler in my design to power the transmitter. It's powered down in sleep mode, I turn it on before transmission and turn if off after.
The button cell battery can provide only few mA and if you use the voltage doubler you will also double the current drawn, so you need to use a larger cap on the output to accumulate enough energy for one transmission burst (you can't continuously transmit)
I made an RF library specifically for those transmitters
https://github.com/cano64/ManchesterRF
Check the example codes for transmitter and receiver.
About sleep mode. You can only wake up the tiny85 using hardware interrupt, and only when it goes LOW, tiny85 has only one HW interrupt pin (pin 7, PB2) so you can use only one button directly to wake it up and it must be pulled HIGH when open.
Here is how to use two buttons for wake up using two extra pins.
Wire it like this: [Pin1] -- [btn1] -- [PB2], [Pin2] -- [btn2] -- [PB2]
Before going to sleep: set Pin1 = LOW, Pin2 = LOW, so when you press any of them it will wake up the microcontroller.
After Wake up: To determine which button is actually pressed, put Pin1 HIGH Pin2 LOW, and check the state on PB2, then switch, Pin1 LOW, Pin2 HIGH and check the state on PB2.
It takes only a fraction of a second to wake up and the user will still be holding the button.
PB2 must have internal pullup enabled or use external pullup
The ST's Application Note you linked is just a generic description, not everything. The hardware detail is differ from each MCU models. ANs will only tell you overall idea. So you need to look at documents specifically written for each MCU model.
As the comments mentioned, when you work with peripherals of STM32 you will mostly need to look at two documents (as you didn't specified the MCU model I will give you example of STM32F407):
- Datasheet
It is a brief description of the hardware. Since APB1 and APB2 are related with bus, the things you want is described in memory map section (aka. section 4 Memory Mapping)
- Reference Manual
It is very detailed (1749 pages!) description of the MCU. When you look at Timers in this manual you will realize there is a lot more stuff than the AN. Anyway this document also desribes memory map. (Section 2.3)
Note) Even though STM32 HAL API abstracts hardware detail you still need to know which APBs are connected to Timers you are using. For example, all peripherals shares common APB bus clocks. This means that if you change a clock setting of APB1, clocks of all peripherals connected to APB1, including Timers, will be changed as well. This might lead to unexpected timing changes of other unexpected Timers.
Best Answer
Use a 32.768kHz crystal or tuning fork. It can run asynchronously and you'll save as much power as you can while still having a clock. The system clock will still use the internal RC oscillator.