← index #4377Issue #9851
Off-topic · high · value 1.356
QUERY · ISSUE

nrf: add support for threading

openby george-xiongopened 2018-12-24updated 2019-05-21
port-nrf

hi Micropython,

could you please add thread to nrf as some cusotmer in china need micropython support multi-thread function. currently, it is not supported on nrf51&52 platform.
my email is george.xiong@nordicsemi.no

thanks.

Best regards
george

CANDIDATE · ISSUE

Improve BLE on nRF52

openby 0xabe1opened 2022-11-06updated 2025-07-10

The ubluepy module for the nRF is pretty lacking. For one, if a BLE connect fails, it just hangs forever. I saw somewhere that @jimmo had a plan to swap the Nordic SoftDevice for NimBLE which would give the Nordic folks access to the awesomeness that is aioble.

I spent the better part of today trying to figure that out, but I just lack foundational knowledge on the Cortex-M4 platform. I did manage to get NimBLE compiled with the RAM HCI within the MicroPython build tree, but it doesn’t run because there’s no background task.

Since the nRF52 and STM32 are both M4s, it looks like we should be able to use the same SysTick mechanism to run the BLE stack, but that’s where I got in over my head with all the IRQ stuff. I don’t quite understand the M4 platform or how MicroPython uses/allocates interrupts.

Is my analysis reasonable? Is this something somebody could help me understand so I can finish porting? Or is this easy enough that it might get implemented easily by the MicroPython team? I’ve got some nRF52832s and nRF52840s I’d really like to get MicroPython working on. With time I could figure it out, but it looks so similar to the STM32, maybe somebody knows how to get it done more quickly?

Thanks.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied