Search found 67 matches

by manitou
Sat Apr 23, 2016 12:40 am
Forum: MicroPython pyboard
Topic: CRC hardware on pyboard
Replies: 9
Views: 3497

Re: CRC hardware on pyboard

Update. Working in C++ on mbed F446RE ( STM32F446xx cortex-m4 @180mhz, hardware float) with the same simple minded CRC hardware as pyboard, I figured out how to do CRC on 32-bit words so that test vector results were good. You have to reverse the bits of the input words, and the final output CRC ha...
by manitou
Sat Dec 26, 2015 12:49 pm
Forum: WiPy and CC3200 boards
Topic: SPI clock frequency ?
Replies: 16
Views: 9523

Re: SPI clock frequency ?

Ok, I don't have timing issues for now, so I might try to compile it with DMA one day just to see :) I'll take a look on the HAL, tahnks I did some SPI DMA experiments on CC3200 (launchpad, wipy's are hard to come by in the US). With the SPI clock at 20MHz, the 32-bit SPI DMA runs at 17.2 mbs (1000...
by manitou
Mon Nov 02, 2015 6:21 pm
Forum: MicroPython pyboard
Topic: 1-wire library and pyb.freq()
Replies: 16
Views: 5673

Re: RE: Re: 1-wire library and pyb.freq()

We have developed a new 1-wire driver that works with the latest version of the pyboard firmware as well as the WiPy. The slimmed-down onewire.py looks good. For visual comparison, here is logic analyzer with new onewire onewire1.png The low pulse-width at 168mhz is 5.875us. At 84mhz, the low pulse...
by manitou
Mon Nov 02, 2015 12:28 am
Forum: MicroPython pyboard
Topic: Read ADC using DMA
Replies: 20
Views: 11942

Re: Read ADC using DMA

ADC with DMA hack OK, I finally got around to hacking adc.c to use DMA to read the ADC. As above we'll do 10,000 samples. >>> import pyb >>> import array >>> adc = pyb.ADC('X1') >>> buf = array.array('H', bytearray(20000)) >>> t1=pyb.micros(); n=adc.read_timed(buf,2000000); t2=pyb.micros() >>> t2-t...
by manitou
Wed Sep 23, 2015 11:16 pm
Forum: MicroPython pyboard
Topic: 1-wire library and pyb.freq()
Replies: 16
Views: 5673

Re: 1-wire library and pyb.freq()

Here is snapshot of analyzer with ow.write_byte(0xa5) onewire.png The critical timing is that writing a 1-bit is supposed to start with a low pulse of < 15 us. At 168mhz, the python low pulse is 15.25us. The spec says the receiver sampling window is 30us, so the one-wire device will read the value s...
by manitou
Wed Sep 23, 2015 8:07 pm
Forum: MicroPython pyboard
Topic: 1-wire library and pyb.freq()
Replies: 16
Views: 5673

Re: 1-wire library and pyb.freq()

I need to do some tests with the analyzer, but looking at the one-wire spec and then at onewire.py, it appears that in addition to pyb.udelay(), the driver is trying to take into account the delay of each micropython statement (say about 5us) in order to arrive at the cumulative delay expected by th...
by manitou
Fri Sep 18, 2015 12:02 pm
Forum: MicroPython pyboard
Topic: USART2
Replies: 12
Views: 3694

Re: USART2

pagano.paganino wrote: USART2 is on 84MHz for set to 4MHz is correct set prescaler to 21?
As I read chapter 7 of ref manual, USART2 is on APB1 which runs at 42MHz. you could verify your 4MHz with scope or analyzer.
by manitou
Mon Sep 14, 2015 9:13 pm
Forum: MicroPython pyboard
Topic: Read ADC using DMA
Replies: 20
Views: 11942

Re: Read ADC using DMA

if you don't require asynchronous ADC acquisition (DMA), i think that you could run the ADC in continuous mode, and the C firmware could test EOC and save the ADC values before the next sample is ready. Thus you would be acquiring the data as fast as the ADC samples became available. I plan to do s...
by manitou
Mon Sep 14, 2015 5:35 pm
Forum: MicroPython pyboard
Topic: Can anyone explain this?
Replies: 5
Views: 1957

Re: Can anyone explain this?

pythoncoder wrote:It resulted from my arbitrary choice of LED 4 for testing and it works as expected with other LED's.
Ahhhh, interesting. LED4's PWM period is 10ms. QED
by manitou
Sun Sep 13, 2015 9:40 pm
Forum: MicroPython pyboard
Topic: Can anyone explain this?
Replies: 5
Views: 1957

Re: Can anyone explain this?

Have you discovered anything?

I know I should try this myself ... but what happens if you use udelay() instead of delay()? delay() uses sleep mode (WFI) to pass the time, udelay() is a spin-wait ...