inline assembly
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- sencore
- Posts: 2
- Joined: Sat Jul 17, 2021 9:02 pm
inline assembly
Is there an implementation of inline assembly for circuitpython ?
- tannewt
- Posts: 3315
- Joined: Thu Oct 06, 2016 8:48 pm
Re: inline assembly
I don't believe so. I do believe that the @micropython.native decorator is supported though. It's an advanced feature we don't often use.
What are you trying to do?
What are you trying to do?
- sencore
- Posts: 2
- Joined: Sat Jul 17, 2021 9:02 pm
Re: inline assembly
Hi tannewt.
Thanks for the reply.
I'm experimenting with the maximum speeds i can get for toggling I/O pins and the PMW and D to A facilities of the M4 Airlift.
The decoration "@micropython.asm_thumb" errors out with "NameError: name 'micropython' is not defined".
I have found https://github.com/adafruit/Adafruit_Ci ... hon_PIOASM.
In that projects' example code rp2pio.StateMachine is used but I can't import a rp2io module for the M4 airlift.
Thank you for your interest.
Thanks for the reply.
I'm experimenting with the maximum speeds i can get for toggling I/O pins and the PMW and D to A facilities of the M4 Airlift.
The decoration "@micropython.asm_thumb" errors out with "NameError: name 'micropython' is not defined".
I have found https://github.com/adafruit/Adafruit_Ci ... hon_PIOASM.
In that projects' example code rp2pio.StateMachine is used but I can't import a rp2io module for the M4 airlift.
Thank you for your interest.
- tannewt
- Posts: 3315
- Joined: Thu Oct 06, 2016 8:48 pm
Re: inline assembly
rp2pio is for the RP2040 only because it uses a separate PIO module.
Generally, you'll want to use a native C module for timing sensitive task because CircuitPython may take time to garbage collect at any point.
Generally, you'll want to use a native C module for timing sensitive task because CircuitPython may take time to garbage collect at any point.
Please be positive and constructive with your questions and comments.