Search found 9 matches
- Wed Oct 07, 2020 2:22 pm
- Forum: General Discussion and Questions
- Topic: Timer handler won't work when calling callback function inside the handler
- Replies: 6
- Views: 2860
Re: Timer handler won't work when calling callback function inside the handler
MicroPython is open source. See https://github.com/micropython/micropython/blob/master/ports/stm32/timer.c . Thanks so much, I didn't know stm32 folder is meant for Pyboard, this explains a lot! Nevertheless, I have investigate a little while and realise all ports have different way of implementing...
- Wed Oct 07, 2020 2:14 pm
- Forum: General Discussion and Questions
- Topic: Timer handler won't work when calling callback function inside the handler
- Replies: 6
- Views: 2860
Re: Timer handler won't work when calling callback function inside the handler
I notice you use mp_call_function_0(self->callback); but the callback is a lambda that takes one argument. So this will always fail (although it doesn't explain why your board locks up, but have you confirmed that NLR is definitely working correctly in your port) Thanks for the reply, yes I used "m...
- Thu Oct 01, 2020 3:15 am
- Forum: General Discussion and Questions
- Topic: Timer handler won't work when calling callback function inside the handler
- Replies: 6
- Views: 2860
Re: Timer handler won't work when calling callback function inside the handler
I'm not sure about your Python code. Here is what I had to do to make this run on a Pyboard: >>> from machine import Timer >>> t = Timer(-1) >>> t.init(period=1000, mode=Timer.PERIODIC, callback=lambda x : print('test')) Please don't post the same query under multiple forum headings. [co-mod] Hi, t...
- Wed Sep 30, 2020 6:35 am
- Forum: General Discussion and Questions
- Topic: Timer handler won't work when calling callback function inside the handler
- Replies: 6
- Views: 2860
Timer handler won't work when calling callback function inside the handler
Hi I am currently porting MicroPython to Realtek’s RTL8722 WiFi+ BLE dev. board, and it has been mostly done except the Timer module which takes in a callback function but never returns. here is the C code I wrote for Timer: STATIC mp_obj_t timer_start(mp_uint_t n_args, const mp_obj_t *args) { enum ...
- Wed Sep 30, 2020 6:33 am
- Forum: Development of MicroPython
- Topic: Failed to execute callback function in timer's handler
- Replies: 2
- Views: 2328
Failed to execute callback function in timer's handler
Hi I am currently working on porting MicroPython to Realtek’s RTL8722 WiFi+ BLE dev. board, and it has been mostly done except the Timer module which takes in a callback function but never returns. here is the C code I wrote for Timer: STATIC mp_obj_t timer_start(mp_uint_t n_args, const mp_obj_t *ar...
- Wed Sep 30, 2020 6:31 am
- Forum: Other Boards
- Topic: How to trigger callback function in timer handler
- Replies: 0
- Views: 1523
How to trigger callback function in timer handler
Hi I am currently porting MicroPython to Realtek’s RTL8722 WiFi+ BLE dev. board, and it has been mostly done except the Timer module which takes in a callback function but never returns. here is the C code I wrote for Timer: STATIC mp_obj_t timer_start(mp_uint_t n_args, const mp_obj_t *args) { enum ...
- Sat Jul 25, 2020 12:52 pm
- Forum: General Discussion and Questions
- Topic: What is minimal requirement to have REPL running?
- Replies: 4
- Views: 2079
Re: What is minimal requirement to have REPL running?
I think that the minimal requirements are to have the heap initialized, and have the mp_hal functions related to the uart implemented. This is essentially what the minimal port does: https://github.com/micropython/micropython/tree/master/ports/minimal Thanks!! Just as I suspected, I got heap and ua...
- Sat Jul 25, 2020 12:48 pm
- Forum: General Discussion and Questions
- Topic: What is minimal requirement to have REPL running?
- Replies: 4
- Views: 2079
Re: What is minimal requirement to have REPL running?
I think that the minimal requirements are to have the heap initialized, and have the mp_hal functions related to the uart implemented. This is essentially what the minimal port does: https://github.com/micropython/micropython/tree/master/ports/minimal Thanks ! ! Just as I suspected, I got heap and ...
- Fri Jul 24, 2020 2:16 pm
- Forum: General Discussion and Questions
- Topic: What is minimal requirement to have REPL running?
- Replies: 4
- Views: 2079
What is minimal requirement to have REPL running?
Hi! I am currently working on porting micropython to a new board. I came to the stage where my firmware compilation was ok, safely uploaded and having logs printed, but just couldn't see REPL (three ">") running. I am new to project of this magnitude and complexity, so any information or direction i...