## Search found 31 matches

Thu Mar 01, 2018 1:57 pm
Forum: General Discussion and Questions
Topic: timer isr function problem
Replies: 8
Views: 1141

### Re: timer isr function problem

g.value(not (not seq[loc])) its for changing the element in seq to the logic variable, which can be accepted by g.value(). @micropython.viper def func(loc: int, N_seq: int): g.value(not (not seq[loc])) loc = (loc + 1) % N_seq as above program , why not set the variable "seq" and "g" in the input pa...
Thu Mar 01, 2018 12:48 am
Forum: General Discussion and Questions
Topic: timer isr function problem
Replies: 8
Views: 1141

### Re: timer isr function problem

Just out of curiosity and not that it would make any sense. If I try on my pyboard: from pyb import Pin, Timer g = Pin(Pin('Y10'), Pin.OUT_PP) @micropython.viper def tick(t): g(not g()) t4=Timer(4, freq=100000) t4.callback(tick) I get 50 kHz on Y10 and REPL is still responding. my whole question is...
Thu Mar 01, 2018 12:40 am
Forum: General Discussion and Questions
Topic: timer isr function problem
Replies: 8
Views: 1141

### Re: timer isr function problem

Just out of curiosity and not that it would make any sense. If I try on my pyboard: from pyb import Pin, Timer g = Pin(Pin('Y10'), Pin.OUT_PP) @micropython.viper def tick(t): g(not g()) t4=Timer(4, freq=100000) t4.callback(tick) I get 50 kHz on Y10 and REPL is still responding. no, I get 35.78KHz o...
Wed Feb 28, 2018 1:47 pm
Forum: General Discussion and Questions
Topic: timer isr function problem
Replies: 8
Views: 1141

### timer isr function problem

g = Pin(Pin('Y10'), Pin.OUT_PP)
def tick4(timer):
global g
g.value(not g.value())

tim4 = Timer(4, freq=100000)
tim4.callback(tick4)

the program is above, but if I use the Oscilloscope to see the freq of Pin('Y10') , the value is 14.59KHz. so why? it is why not 50KHz.
Thu Jun 23, 2016 3:02 am
Forum: General Discussion and Questions
Topic: problem with reboot by reboot button or ctrl D
Replies: 1
Views: 1166

### problem with reboot by reboot button or ctrl D

when I reboot the pyboard V3 by reboot button or ctrl+D, the LEDR2 will flash for few minutes, while the board doing not work. But sometimes the board will reboot immediately. what's this and why?
Sat Jun 11, 2016 8:48 am
Forum: General Discussion and Questions
Topic: Can I use the can.recv(0) in the rxcallback function?
Replies: 10
Views: 3900

### Re: Can I use the can.recv(0) in the rxcallback function?

Yes it should be possible to use it in all interrupt functions. The intention is that all callbacks will have the option to be soft. Next in queue is extint. If you find any bugs or comes up with any possible improvments while using this, please report them here or even better in the PR at github. ...
Sat Jun 11, 2016 1:11 am
Forum: General Discussion and Questions
Topic: Can I use the can.recv(0) in the rxcallback function?
Replies: 10
Views: 3900

### Re: Can I use the can.recv(0) in the rxcallback function?

Code: Select all

``#define MICROPY_PY_SOFTIRQ          (1)``
To boards/PYBV3/mpconfigboard.h

I only have V10 boards, so thats the only one I have tried it on.

thank you , it works well . Could I use the function setsoftirq on the Timer callback?
Fri Jun 10, 2016 8:50 am
Forum: General Discussion and Questions
Topic: Can I use the can.recv(0) in the rxcallback function?
Replies: 10
Views: 3900

### Re: Can I use the can.recv(0) in the rxcallback function?

PappaPeppar wrote:folke is right, the soft irq feature does only exist in my repository https://github.com/HenrikSolver/micropy ... e/softirq2 so far.

I rebuild the source from micropython-softirq2 by using "make BOARD=PYBV3", then the modoule of machine has no the attribute 'setsoftirq'. why?
Fri Jun 10, 2016 8:14 am
Forum: General Discussion and Questions
Topic: Can I use the can.recv(0) in the rxcallback function?
Replies: 10
Views: 3900

### Re: Can I use the can.recv(0) in the rxcallback function?

PappaPeppar wrote:folke is right, the soft irq feature does only exist in my repository https://github.com/HenrikSolver/micropy ... e/softirq2 so far.

thanks very much
Tue Jun 07, 2016 11:35 am
Forum: General Discussion and Questions