First I'd like to thank SiLabs for finally releasing C SDK for the Blue Gecko family MCUs!
I've got some questions regarding the utilisation of resources, specified as "internal" for the SDK. Document UG136 states, that RTCC is used internally be the stack. So I thought that I might use another 32-bit timer - CRYOTIMER. But looking at the internal resources table again, there is a resource specified as "PROTIMER", which I couldn't find in MCU's reference guide - is actually "PROTIMER" misspelled variant of "CRYOTIMER"? And if it is the latter, I'd like to know if Real Time Clock / Calendar functionality is somewhere on the roadmap, because this is one of the features I need and would prefer not to use external RTC chip for it.
Another feature I need is generating HMAC codes, which involves calculating SHA-256 hashes. Ideally I'd like to use the hardware assisted calculations, implemented in the CRYPTO module. But this module is also specified as internal resource for the stack. Are there any plans to expose stack functions to access the CRYPTO module functionality?
it is PROTIMER and no misspelling. This is found in the EFR32 Wireless Gecko Reference Manual
Section 2.16 timers:
PROTIMER -> Protocol Timer, typically used to accurately control detailed RF protocol timing in transmit and receive modes.
To answer your second question, yes we are planning to allow access to CRYPTO module from user applications.
thanks a lot for this clarification, @JaakkoV! I have somehow overlooked that particular timer. It's great the the CRYOTIMER is free for user applications!
Any updates on the access to the CRYOTIMER for user applications?
There are no limitations on using CRYOTIMER. Original poster thought we had mixed PROTIMER with CRYOTIMER but I confirmed in my earlier response that it is not a mistake.
Bluetooth stack does not use CRYOTIMER.
So if I understand well, our user application cannot use the CRYOTIMER and we are obliged to use the others timers, hence we stay in EM2 mode and cannot enter the EM3 mode while a timer is running?
No, there are no restrictions using the CRYOTIMER from your app. The original poster wrote earlier:
>> It's great the the CRYOTIMER is free for user applications!
I don't understand where you got the impression that you could not use CRYOTIMER ?
This is completely my mistake. I misread it.
We are able to use it.
Just to be sure: if we use the CRYOTIMER, will the device automatically go to EM3 mode (in the case nothing else is running)? Or do we have to do this manually?
The Bluetooth stack (at least version 2.0.1 which is the latest) will not go automatically to EM3. The lowest supported sleep state is now EM2.
If you want to enter EM3 you need to handle that manually.
Can you confirm that the CRYOTIMER will be triggered in EM3 state (just to be sure)?
Do you have documentation about how entering EM3 manually (C SDK)? I did not find it in the Software API Reference Manual.
Please refer to EFR32xG1 Wireless Gecko Reference Manual for more details on CRYOTIMER. The document can be downloaded here:
I checked that CRYOTIMER is usable also in EM3 mode. There is an additional note that says in EM3 the CRYOTIMER must be using ULFRCO, otherwise it will not be usable.
I guess that by "SW API reference manual" you mean the Bluetooth stack documentation? Using energy modes EM3 and EM4 is an advanced topic that is a feature of the EFR32BG SoC, it is not something we cover in the Bluetooth API spec.
For more information on how to use the energy modes and peripherals like CRYOTIMER from your application, please refer to these online resources:
We don't find any references to the CRYOTIMER in the EFR32 Reference Manual . Do you mean this one or another one?
You are correct about the "SW API reference manual", it is the one about the Bluetooth API.
What the best way to learn how to use EM3 and EM4?
I opened the EFR32 ref.manual that you linked and there is plenty of references to cryotimer. There is even a dedicated chapter for that:
22. CRYOTIMER - Ultra Low Energy Timer/Counter
Sorry, my mistake, you are correct, plenty of information (doc was still loading when I was already searching for cryotimer in it).