Search found 40 matches

by starter111
Sat Sep 28, 2019 8:03 pm
Forum: MicroPython pyboard
Topic: how to use viper decorator?
Replies: 16
Views: 507

Re: how to use viper decorator?

Is for data, I'm trying run test pattern. If I can load all to the ram at one time and run, it more close to actual. Most of them are short can execute them all in one, but few of them are huge, I need copy few hundred MB pattern to flash and have to stop in the middle which I'm not sure going work,...
by starter111
Sat Sep 28, 2019 8:01 am
Forum: MicroPython pyboard
Topic: how to use viper decorator?
Replies: 16
Views: 507

Re: how to use viper decorator?

https://store.micropython.org/product/PYBD-SF6-W4F2

pybaord D?
is this mean can add 2MiB RAM?
2MiB external QSPI flash with execute capabilities to extend internal flash
by starter111
Sat Sep 28, 2019 7:28 am
Forum: MicroPython pyboard
Topic: how to use viper decorator?
Replies: 16
Views: 507

Re: how to use viper decorator?

thank you so much, is it C module faster than assembly maybe not much?
by starter111
Sat Sep 28, 2019 6:45 am
Forum: MicroPython pyboard
Topic: how to use viper decorator?
Replies: 16
Views: 507

Re: how to use viper decorator?

I think I almost there for my first assembly :). 1. for assembly is it a instruction can delay ns? nop()? 2. use byte instead of integer? how? @micropython.asm_thumb def run(r0, r1, r2): movwt(r3, stm.GPIOB + stm.GPIO_ODR) movwt(r4, stm.GPIOC + stm.GPIO_IDR) label(LOOP_ALL) #here, need add code to w...
by starter111
Fri Sep 27, 2019 12:29 am
Forum: MicroPython pyboard
Topic: how to use viper decorator?
Replies: 16
Views: 507

Re: how to use viper decorator?

For ultimate speed consider the inline assembler . totally agree if I know how :)... just toggle a pin and measure in scope is 30 ns..much faster... the only issue is....I don't know know how to finish up...need to read more :(... movwt(r0, stm.GPIOB) movw(r1, 0x0000) strh(r1, [r0, stm.GPIO_ODR]) m...
by starter111
Wed Sep 25, 2019 12:25 am
Forum: MicroPython pyboard
Topic: how to use viper decorator?
Replies: 16
Views: 507

Re: how to use viper decorator?

looks like const() help little bit.. I got about 18us per write read.. is it anything else I can try with viper? @micropython.viper def run(t, d_us : int): val_8bits = int(mem8[GPIOB + GPIO_ODR]) odr = const(1073873940) idr = const(1073874960) d = [] for i in t: mem16[odr] = (int(i) << 8) | val_8bit...
by starter111
Tue Sep 24, 2019 4:53 pm
Forum: MicroPython pyboard
Topic: how to use viper decorator?
Replies: 16
Views: 507

Re: how to use viper decorator?

thanks a lot, is working..but not as fast as what I wish :).. I was hoping I can get 1us period..but even I write the register directly as below I got 2.6us.. Is it c module faster than viper? @micropython.viper def run(t, d_us : int ): mem16[1073873940] = 0x8000 mem16[1073873940] = 0x0000 mem16[107...
by starter111
Mon Sep 23, 2019 10:08 pm
Forum: MicroPython pyboard
Topic: how to use viper decorator?
Replies: 16
Views: 507

how to use viper decorator?

I'm trying to use portB 8-15 for output, and portC 0-7 for input. import time from stm import * def set_bout(): moderval = mem32[GPIOB + GPIO_MODER] moderval &= 0x0000FFFF moderval |= 0x55550000 mem32[GPIOB + GPIO_MODER] = moderval otyper = mem16[GPIOB + GPIO_OTYPER] otyper &= 0xFF mem16[GPIOB + GPI...
by starter111
Fri Sep 06, 2019 9:34 pm
Forum: MicroPython pyboard
Topic: Install original windows driver
Replies: 7
Views: 463

Re: Install original windows driver

why you need pyusb? pyserial doesn't work? to reinstall you can update driver or if still not working just uninstall driver and delete driver software for this device. Hi, In trying to learn more how to access the pyboard from my windows machine, I used zadig to change the driver for the pyboard so ...
by starter111
Thu Aug 08, 2019 7:11 pm
Forum: MicroPython pyboard
Topic: more detail tutorial for external C modules?
Replies: 6
Views: 357

Re: more detail tutorial for external C modules?

Stub Generator is good.. and I think I need to read more code...