<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openmano-mpy/ports/nrf/modules, branch master</title>
<subtitle>MicroPython source and hardware configuration for OpenMano</subtitle>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/'/>
<entry>
<title>extmod/machine_i2c: Add init protocol method for generic I2C bindings.</title>
<updated>2020-11-23T08:45:04+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2020-11-18T03:50:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=64180f0742a1926162b784c68bafa49b9b58596c'/>
<id>64180f0742a1926162b784c68bafa49b9b58596c</id>
<content type='text'>
Hardware I2C implementations must provide a .init() protocol method if they
want to support reconfiguration.  Otherwise the default is that i2c.init()
raises an OSError (currently the case for all ports).

mp_machine_soft_i2c_locals_dict is renamed to mp_machine_i2c_locals_dict to
match the generic SPI bindings.

Fixes issue #6623 (where calling .init() on a HW I2C would crash).

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Hardware I2C implementations must provide a .init() protocol method if they
want to support reconfiguration.  Otherwise the default is that i2c.init()
raises an OSError (currently the case for all ports).

mp_machine_soft_i2c_locals_dict is renamed to mp_machine_i2c_locals_dict to
match the generic SPI bindings.

Fixes issue #6623 (where calling .init() on a HW I2C would crash).

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ports: Support legacy soft I2C/SPI construction via id=-1 arg.</title>
<updated>2020-10-01T02:57:10+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2020-09-25T04:47:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=71f3ade770fa7f2637d94f5ba5840b64a16a95db'/>
<id>71f3ade770fa7f2637d94f5ba5840b64a16a95db</id>
<content type='text'>
With a warning that this way of constructing software I2C/SPI is
deprecated.  The check and warning will be removed in a future release.

This should help existing code to migrate to the new SoftI2C/SoftSPI types.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With a warning that this way of constructing software I2C/SPI is
deprecated.  The check and warning will be removed in a future release.

This should help existing code to migrate to the new SoftI2C/SoftSPI types.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ports: Add SoftI2C and SoftSPI to machine module where appropriate.</title>
<updated>2020-10-01T02:57:10+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2020-09-16T04:09:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=39d50d129ce428858332523548f0594503d0f45b'/>
<id>39d50d129ce428858332523548f0594503d0f45b</id>
<content type='text'>
Previous commits removed the ability for one I2C/SPI constructor to
construct both software- or hardware-based peripheral instances.  Such
construction is now split to explicit soft and non-soft types.

This commit makes both types available in all ports that previously could
create both software and hardware peripherals: machine.I2C and machine.SPI
construct hardware instances, while machine.SoftI2C and machine.SoftSPI
create software instances.

This is a breaking change for use of software-based I2C and SPI.  Code that
constructed I2C/SPI peripherals in the following way will need to be
changed:

    machine.I2C(-1, ...)            -&gt;  machine.SoftI2C(...)
    machine.I2C(scl=scl, sda=sda)   -&gt;  machine.SoftI2C(scl=scl, sda=sda)

    machine.SPI(-1, ...)            -&gt;  machine.SoftSPI(...)
    machine.SPI(sck=sck, mosi=mosi, miso=miso)
                        -&gt;  machine.SoftSPI(sck=sck, mosi=mosi, miso=miso)

Code which uses machine.I2C and machine.SPI classes to access hardware
peripherals does not need to change.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previous commits removed the ability for one I2C/SPI constructor to
construct both software- or hardware-based peripheral instances.  Such
construction is now split to explicit soft and non-soft types.

This commit makes both types available in all ports that previously could
create both software and hardware peripherals: machine.I2C and machine.SPI
construct hardware instances, while machine.SoftI2C and machine.SoftSPI
create software instances.

This is a breaking change for use of software-based I2C and SPI.  Code that
constructed I2C/SPI peripherals in the following way will need to be
changed:

    machine.I2C(-1, ...)            -&gt;  machine.SoftI2C(...)
    machine.I2C(scl=scl, sda=sda)   -&gt;  machine.SoftI2C(scl=scl, sda=sda)

    machine.SPI(-1, ...)            -&gt;  machine.SoftSPI(...)
    machine.SPI(sck=sck, mosi=mosi, miso=miso)
                        -&gt;  machine.SoftSPI(sck=sck, mosi=mosi, miso=miso)

Code which uses machine.I2C and machine.SPI classes to access hardware
peripherals does not need to change.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>extmod/machine_i2c: Rename type to SoftI2C and add custom print method.</title>
<updated>2020-10-01T02:57:10+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2020-09-16T03:30:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=c35deb2625efc877b3a0d03d5654e27232b2d101'/>
<id>c35deb2625efc877b3a0d03d5654e27232b2d101</id>
<content type='text'>
Also rename machine_i2c_type to mp_machine_soft_i2c_type.  These changes
make it clear that it's a soft-I2C implementation, and match SoftSPI.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also rename machine_i2c_type to mp_machine_soft_i2c_type.  These changes
make it clear that it's a soft-I2C implementation, and match SoftSPI.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nrf: Remove unnecessary includes of mpconfigport.h and its header guard.</title>
<updated>2020-09-08T14:13:34+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2020-09-08T03:52:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=27e117307d7d5b63955940866e6094bedb7d299e'/>
<id>27e117307d7d5b63955940866e6094bedb7d299e</id>
<content type='text'>
The mpconfigport.h file is an internal header and should only ever be
included once by mpconfig.h.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The mpconfigport.h file is an internal header and should only ever be
included once by mpconfig.h.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nrf: Add support for time.ticks_xxx functions using RTC1.</title>
<updated>2020-07-08T13:47:02+00:00</updated>
<author>
<name>Martin Fischer</name>
</author>
<published>2020-07-02T20:19:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=15574cd665a8e66157aa97447e3869513da81d45'/>
<id>15574cd665a8e66157aa97447e3869513da81d45</id>
<content type='text'>
This commit adds time.ticks_ms/us support using RTC1 as the timebase.  It
also adds the time.ticks_add/diff helper functions.  This feature can be
enabled using MICROPY_PY_TIME_TICKS.  If disabled the system uses the
legacy sleep methods and does not have any ticks functions.

In addition support for MICROPY_EVENT_POLL_HOOK was added to the
time.sleep_ms(x) function, making this function more power efficient and
allows support for select.poll/asyncio.  To support this, the RTC's CCR0
was used to schedule a ~1msec event to wakeup the CPU.

Some important notes about the RTC timebase:

- Since the granularity of RTC1's ticks are approx 30usec, time.ticks_us is
not perfect, does not have 1us resolution, but is otherwise quite usable.
For tighter measurments the ticker's 1MHz counter should be used.

- time.ticks_ms(x) should *not* be called in an IRQ with higher prio than
the RTC overflow irq (3).  If so it introduces a race condition and
possibly leads to wrong tick calculations.

See #6171 and #6202.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds time.ticks_ms/us support using RTC1 as the timebase.  It
also adds the time.ticks_add/diff helper functions.  This feature can be
enabled using MICROPY_PY_TIME_TICKS.  If disabled the system uses the
legacy sleep methods and does not have any ticks functions.

In addition support for MICROPY_EVENT_POLL_HOOK was added to the
time.sleep_ms(x) function, making this function more power efficient and
allows support for select.poll/asyncio.  To support this, the RTC's CCR0
was used to schedule a ~1msec event to wakeup the CPU.

Some important notes about the RTC timebase:

- Since the granularity of RTC1's ticks are approx 30usec, time.ticks_us is
not perfect, does not have 1us resolution, but is otherwise quite usable.
For tighter measurments the ticker's 1MHz counter should be used.

- time.ticks_ms(x) should *not* be called in an IRQ with higher prio than
the RTC overflow irq (3).  If so it introduces a race condition and
possibly leads to wrong tick calculations.

See #6171 and #6202.
</pre>
</div>
</content>
</entry>
<entry>
<title>nrf: Update to work with nrfx v2.0.0, to match TinyUSB.</title>
<updated>2020-05-15T05:06:02+00:00</updated>
<author>
<name>Jim Mussared</name>
</author>
<published>2020-03-25T06:01:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=e7f8c7d9a390414808542e4a3a7f2a609278b5fc'/>
<id>e7f8c7d9a390414808542e4a3a7f2a609278b5fc</id>
<content type='text'>
Commit 6cea369b89b2223cf07ff8768e50dc39bbb770fe updated the TinyUSB
submodule to a version based on nrfx v2.0.0.  This commit updates the nrf
port to work with the latest TinyUSB and nrfx v2.0.0.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 6cea369b89b2223cf07ff8768e50dc39bbb770fe updated the TinyUSB
submodule to a version based on nrfx v2.0.0.  This commit updates the nrf
port to work with the latest TinyUSB and nrfx v2.0.0.
</pre>
</div>
</content>
</entry>
<entry>
<title>all: Remove commented-out include statements.</title>
<updated>2020-04-23T01:24:15+00:00</updated>
<author>
<name>stijn</name>
</author>
<published>2020-04-16T07:22:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=d6243568a05d423b58522435c3779975acbf56dd'/>
<id>d6243568a05d423b58522435c3779975acbf56dd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>all: Use MP_ERROR_TEXT for all error messages.</title>
<updated>2020-04-05T05:02:06+00:00</updated>
<author>
<name>Jim Mussared</name>
</author>
<published>2020-03-02T11:35:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=def76fe4d9bbc2c342594dc05861b24d7165d274'/>
<id>def76fe4d9bbc2c342594dc05861b24d7165d274</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>nrf: Use MICROPY_HW_ENABLE_RNG instead of MICROPY_PY_RANDOM_HW_RNG.</title>
<updated>2020-02-18T01:43:16+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2020-02-14T04:17:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=ac8383a95d3cf39f8d8433f5c58f62dd74536110'/>
<id>ac8383a95d3cf39f8d8433f5c58f62dd74536110</id>
<content type='text'>
The "random" module no longer uses the hardware RNG (the extmod version of
this module has a pseudo-random number generator), so the config option
MICROPY_PY_RANDOM_HW_RNG is no longer meaningful.  This commit replaces it
with MICROPY_HW_ENABLE_RNG, which controls whether the hardware RNG is
included in the build.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The "random" module no longer uses the hardware RNG (the extmod version of
this module has a pseudo-random number generator), so the config option
MICROPY_PY_RANDOM_HW_RNG is no longer meaningful.  This commit replaces it
with MICROPY_HW_ENABLE_RNG, which controls whether the hardware RNG is
included in the build.
</pre>
</div>
</content>
</entry>
</feed>
