add support for stm32wb offload#68
Conversation
|
Interesting... I must admit that the Help me understand:
|
Specifically, when calling an open thread function, the core could block for ~500us (I have not measured it, but that is a hypothetical estimate) when, if implemented with async fns the core could run other tasks in the interim. Solving this would require potentially a huge amount of work that would have no benefit for other platforms and save at most 500us per ot function call. This is speculative because the blocking time could be even less.
I do not have a working example yet.
|
|
Would you be alright if I made a new |
The fake/noop Radio trait impl can just be a part of With that said, Or (more likely) is the OpenThread variant you are running an RCP (or - hm - NCP): https://openthread.io/platforms/co-processor (sorry - STM is not really something I've ever played with). If yes, perhaps we have to enable support for these in Last but not least - you can ping me in |
| @@ -0,0 +1,66 @@ | |||
| [package] | |||
| name = "nrf-openthread-examples" | |||
|
@ivmarkov I believe this is ready. |
ivmarkov
left a comment
There was a problem hiding this comment.
Overall LGTM except a couple of nits, and most importantly: I don't think we need the stm32wb module, as explained.
| @@ -0,0 +1,9 @@ | |||
| [target.'cfg(all(target_arch = "arm", target_os = "none"))'] | |||
| # replace nRF82840_xxAA with your chip as listed in `probe-rs chip list` | |||
There was a problem hiding this comment.
Nit: you might want to replace nRF82840_xxAA with STM32WB55RG
| )] | ||
| mod bindings { | ||
| #[cfg(not(target_os = "espidf"))] | ||
| #[cfg(not(any(target_os = "espidf", feature = "stm32-offload")))] |
There was a problem hiding this comment.
I wonder... shall we shorten stm32-offload to stm32wb?
| @@ -0,0 +1,30 @@ | |||
| //! Provides a fake radio | |||
There was a problem hiding this comment.
I think this whole module should be removed. Reasons:
- You don't use it yourself, in your "basic_udp" example so why is it here? If you plan to use it, then create an example which uses it.
- This is the first MCU specific radio in
openthread. At the very least it should be namedNoopRadioand it is an open question if it should dounreachable!orcore::future::task::pending()
There was a problem hiding this comment.
The reason that I created this was because the ENetRunner requires a radio. I will rename it and return core::future::pending.
There was a problem hiding this comment.
Have you actually tried ENetRunner with this "radio"?
I strongly suggest copy-pasting the enet example, and the srp example and testing those - perhaps even as part of this PR.
If you still target rs-matter, SRP is mandatory anyway, and the enet example is kinda mandatory if you want to prove to me and yourself that this fake radio is necessary and that in its current shape it works correctly.
BTW: how did you actually test the basic_udp example? Typically, you need a thread dataset?
|
Also if you are doing this so as to run Which leaves you with only 700-800KB for the the Also, AI is trying hard to convince me that |
This allows support for thread offload to be implemented in embassy-stm32-wpan. Ideally, async rust would be propagated further down the call chain but that would involve far more refactoring that would only benefit stm32wb users (a small userbase) and therefore this is the approach I have taken.