What are the overheads when switching to arm thumb assemby functions

Questions and discussion about running MicroPython on a micro:bit board.
Target audience: MicroPython users with a micro:bit.
Post Reply
rhubarbdog
Posts: 85
Joined: Tue Nov 07, 2017 11:45 pm

What are the overheads when switching to arm thumb assemby functions

Post by rhubarbdog » Thu Nov 29, 2018 1:03 am

Hi,
I've written a dht11 class, mainly in micropython. But the time critical section is in arm thumb assembly. I'm now reading 35 out of 40 bits. Before i wrote the assembly it was only about 12 to 17 bits.

The time it takes to switch from a write_digital pin to a read_digital one is only 500us
But that combined with a function call to my assembly I'm missing 5 bits.
What's the overhead switching between micropython and arm thumb assembler?

The last resort i have is trying to up the clock speed on my microbit, is that even possible?

Post Reply