Search found 2258 matches

by dhylands
Fri Mar 24, 2017 3:59 pm
Forum: The MicroPython pyboard
Topic: Can't Save main.py
Replies: 1
Views: 20

Re: Can't Save main.py

I've honestly never seen that error before.

Some additional information might be useful:
1 - You mention pyboard, so I'll assume that you're using the real pyboard (STM32F405)
2 - What host are you using (Windows, linux, Mac)
3 - How are you trying to copy the file?
by dhylands
Fri Mar 24, 2017 3:56 pm
Forum: The MicroPython pyboard
Topic: Dealing with Noisy/False reading touch sensing button
Replies: 1
Views: 19

Re: Dealing with Noisy/False reading touch sensing button

If you're in a room with flourescent lights, then the human body will transfer the 60 Hz signal from the lights to the touch plate.

1 cycle of 60 Hz is roughly 16 msecs. So your logic should probably ignore changes which are smaller than that.
by dhylands
Fri Mar 24, 2017 5:39 am
Forum: General Discussion and Questions
Topic: How small can microPython get?
Replies: 2
Views: 51

Re: How small can microPython get?

The minimal target is the smallest target.

It seems to be about 150K
by dhylands
Fri Mar 24, 2017 12:05 am
Forum: The WiPy
Topic: Looking for terminator in data drom UART
Replies: 1
Views: 20

Re: Looking for terminator in data drom UART

I suspect that you're being tripped up by the difference between strings and bytestrings. The UART returns bytestrings, so you should be searching for b'\r' MicroPython v1.8.7-201-ga34ff35 on 2017-02-07; linux version Use Ctrl-D to exit, Ctrl-E for paste mode >>> data = b'abc\rdef' >>> data.find('\r...
by dhylands
Thu Mar 23, 2017 4:39 pm
Forum: General Discussion and Questions
Topic: C enviroment that can read python occasionally, is micropython what I want?
Replies: 9
Views: 121

Re: C enviroment that can read python occasionally, is micropython what I want?

Ok, makes sense on Python functions returning, but what about C functions from Python? Possible? Libraries? For example: In C: function fooC (uint8_t a) { return a; } Can I call fooC(value) from a Python script? Not directly. C functions which are callable from python have to be registered with the...
by dhylands
Wed Mar 22, 2017 4:37 pm
Forum: Other Boards
Topic: How can I increase the callback priority/importance on my Timer? (STM32F401)
Replies: 12
Views: 160

Re: How can I increase the callback priority/importance on my Timer? (STM32F401)

I did some analysis of how long it takes for timer IRQs to be processed a while back: http://forum.micropython.org/viewtopic.php?f=2&t=829&start=10#p4781 What you really need is to toggle a GPIO at the beginning of the ISR and at the end so that you can see how long the ISR is actually takin...
by dhylands
Wed Mar 22, 2017 5:52 am
Forum: Other Boards
Topic: How can I increase the callback priority/importance on my Timer? (STM32F401)
Replies: 12
Views: 160

Re: How can I increase the callback priority/importance on my Timer? (STM32F401)

another odd issue with that code, is that the board locks up if I try to set the default period to something small, like 100 This is odd especially because if I start the board with higher period and width settings, then adjust things later, with the adjust_tim1 function, it works to decrease thing...
by dhylands
Wed Mar 22, 2017 5:46 am
Forum: Other Boards
Topic: How can I increase the callback priority/importance on my Timer? (STM32F401)
Replies: 12
Views: 160

Re: How can I increase the callback priority/importance on my Timer? (STM32F401)

I modified nvic.py to add the nvic_set_prio function. import machine SCS = 0xE000E000 SCB = SCS + 0x0D00 NVIC = SCS + 0x0100 VTOR = SCB + 0x08 SCB_SHP = SCB + 0x18 NVIC_PRIO = NVIC + 0x300 def dump_nvic(): print('NVIC_PRIO = {:08x} @ {:08x}'.format(machine.mem32[NVIC_PRIO], NVIC_PRIO)) print('VTOR =...
by dhylands
Wed Mar 22, 2017 5:23 am
Forum: Other Boards
Topic: How can I increase the callback priority/importance on my Timer? (STM32F401)
Replies: 12
Views: 160

Re: How can I increase the callback priority/importance on my Timer? (STM32F401)

NVIC and SysTick are common to all Cortex-M processors.

STM has document PM0214: http://www.st.com/resource/en/programmi ... 046982.pdf which covers off the STM32F3 and STM32F4 series. This document includes the NVIC, SysTick, the instruction set and registers.

Go to advanced search