Search found 2494 matches

by dhylands
Fri Nov 17, 2017 11:49 pm
Forum: General Discussion and Questions
Topic: I2C Bus Sniffing
Replies: 7
Views: 117

Re: I2C Bus Sniffing

You're right. I wasn't thinking about this in the right context. I think that the issue would be detecting start & stop bits and dealing with the ack/nack.
by dhylands
Fri Nov 17, 2017 9:12 pm
Forum: General Discussion and Questions
Topic: I2C Bus Sniffing
Replies: 7
Views: 117

Re: I2C Bus Sniffing

Using the SPI interface will only work if a device doesn't stretch the clock. You probably want to create a new I2C-sniffer module based on the software I2C code, or add a mode to the software I2C module to allow it to be a sniffer. To be a sniffer the SDA and SCL signals will always be inputs and w...
by dhylands
Fri Nov 17, 2017 4:32 pm
Forum: General Discussion and Questions
Topic: Problem entering (¨)
Replies: 2
Views: 47

Re: Problem entering (¨)

Your message is showing backticks (`) and not single quotes aka apostrophe (') or double quotes (") On my keyboard, the backtick is shared with the tilde character and is located just below the ESC key. The single and double quote key is over on the right side of the keyboard near the ENTER key. Not...
by dhylands
Fri Nov 17, 2017 4:22 pm
Forum: Development of MicroPython
Topic: help is appreciated - memory allocated by m_malloc() is automatically free'ed
Replies: 4
Views: 95

Re: help is appreciated - memory allocated by m_malloc() is automatically free'ed

If there is no python reference to the object allocated then there needs to be a pointer stored in the root pointers. For example, if we look in the stm32 timer.c file, you'll see references to the MP_STATE_PORT macro: https://github.com/micropython/micropython/blob/31550a52e4b9ff5797755b54c415e365a...
by dhylands
Mon Nov 13, 2017 3:55 pm
Forum: The MicroPython pyboard
Topic: C modules on pyBoard
Replies: 1
Views: 52

Re: C modules on pyBoard

There are some links in this thread:
viewtopic.php?f=16&t=2861&p=19206#p19206
by dhylands
Fri Nov 10, 2017 5:57 pm
Forum: General Discussion and Questions
Topic: Custom board change CAN pins
Replies: 4
Views: 83

Re: Custom board change CAN pins

Maybe I am not seeing it, but it seems like the CAN interface is one of the few that do not let me pass different pin assignments to, like SPI. I looked up the pin alternative function from the REPL and both B13 and B5 do not show CAN as options, even though I know from the STM32CUBEMX and the DFU ...
by dhylands
Fri Nov 10, 2017 5:47 pm
Forum: General Discussion and Questions
Topic: micropython.schedule inside class
Replies: 6
Views: 141

Re: micropython.schedule inside class

The statement self.bound_method is what allocates the memory. Each time you do self.bound_method it will allocate a new bound method object (which is why all attempts to use self.bound_method from inside the ISR will fail). The bound method object basically allocates memory to hold the pointer to se...
by dhylands
Fri Nov 10, 2017 6:02 am
Forum: General Discussion and Questions
Topic: Custom board change CAN pins
Replies: 4
Views: 83

Re: Custom board change CAN pins

The simplest way is to just set the alternate function on the pin you want.

The defaults are really just for convenience.
by dhylands
Thu Nov 09, 2017 7:44 pm
Forum: General Discussion and Questions
Topic: micropython.schedule inside class
Replies: 6
Views: 141

Re: micropython.schedule inside class

I think that creating the bound method requires allocating memory.

Create the bound method in your constructor (and perhaps store it in a member of the class) and pass that inside the ISR to move the memory allocation outside the ISR.
by dhylands
Tue Nov 07, 2017 7:17 pm
Forum: General Discussion and Questions
Topic: How to obtain a list of importable modules?
Replies: 15
Views: 962

Re: How to obtain a list of importable modules?

I guess I'm a bit confused. You can only delete files. If a module is frozen, then there is nothing you can change about it without rebuilding the firmware.