<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openmano-mpy/ports/rp2, 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>rp2/rp2_pio: Add fifo_join support for PIO.</title>
<updated>2021-04-16T14:45:38+00:00</updated>
<author>
<name>Tim Radvan</name>
</author>
<published>2021-04-02T18:35:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=f842a40df4d26bd74b92a3903096fc6b1709222d'/>
<id>f842a40df4d26bd74b92a3903096fc6b1709222d</id>
<content type='text'>
The PIO state machines on the RP2040 have 4 word deep TX and RX FIFOs.  If
you only need one direction, you can "merge" them into either a single 8
word deep TX or RX FIFO.

We simply add constants to the PIO object, and set the appropriate bits in
`shiftctrl`.

Resolves #6854.

Signed-off-by: Tim Radvan &lt;tim@tjvr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The PIO state machines on the RP2040 have 4 word deep TX and RX FIFOs.  If
you only need one direction, you can "merge" them into either a single 8
word deep TX or RX FIFO.

We simply add constants to the PIO object, and set the appropriate bits in
`shiftctrl`.

Resolves #6854.

Signed-off-by: Tim Radvan &lt;tim@tjvr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rp2: Add support for building different board configurations.</title>
<updated>2021-04-12T11:40:32+00:00</updated>
<author>
<name>jahr</name>
</author>
<published>2021-04-05T20:57:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=7ca686684ea5bffb45764bc3782f54133855a3c9'/>
<id>7ca686684ea5bffb45764bc3782f54133855a3c9</id>
<content type='text'>
This change allows to build firmware for different rp2-based boards,
following how it is done in other ports like stm32 and esp32.  So far only
the original Pico and Adafruit Feather RP2040 are added.  Board names
should match (sans case) those in pico-sdk/src/boards/include/boards/.

Usage: Pico firmware can be build either using make as previously (it is
the default board) or by `make BOARD=PICO`.  Feather is built by `make
BOARD=ADAFRUIT_FEATHER_RP2040`.  Only the board name and flash drive size
is set, pin definition is taken from the appropriate pico-sdk board
definition.  Firmware is saved in the directory build-BOARD_NAME.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change allows to build firmware for different rp2-based boards,
following how it is done in other ports like stm32 and esp32.  So far only
the original Pico and Adafruit Feather RP2040 are added.  Board names
should match (sans case) those in pico-sdk/src/boards/include/boards/.

Usage: Pico firmware can be build either using make as previously (it is
the default board) or by `make BOARD=PICO`.  Feather is built by `make
BOARD=ADAFRUIT_FEATHER_RP2040`.  Only the board name and flash drive size
is set, pin definition is taken from the appropriate pico-sdk board
definition.  Firmware is saved in the directory build-BOARD_NAME.
</pre>
</div>
</content>
</entry>
<entry>
<title>rp2/machine_uart: Add buffered transfer of data with rxbuf/txbuf kwargs.</title>
<updated>2021-04-12T11:31:08+00:00</updated>
<author>
<name>robert-hh</name>
</author>
<published>2021-03-11T07:36:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=1be74b94b6f3263b8e360a0a012ae87301539f91'/>
<id>1be74b94b6f3263b8e360a0a012ae87301539f91</id>
<content type='text'>
Instantiation and init now support the rxbuf and txbuf keywords for setting
the buffer size.  The default size is 256 bytes.  The minimum and maximum
sizes are 32 and 32766 respectively.

uart.write() still includes checks for timeout, even if it is very unlikely
to happen due to a) lack of flow control support and b) the minimal timeout
values being longer than the time it needs to send a byte.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instantiation and init now support the rxbuf and txbuf keywords for setting
the buffer size.  The default size is 256 bytes.  The minimum and maximum
sizes are 32 and 32766 respectively.

uart.write() still includes checks for timeout, even if it is very unlikely
to happen due to a) lack of flow control support and b) the minimal timeout
values being longer than the time it needs to send a byte.
</pre>
</div>
</content>
</entry>
<entry>
<title>rp2/rp2_pio: Add StateMachine restart,rx_fifo,tx_fifo helper functions.</title>
<updated>2021-04-11T12:41:54+00:00</updated>
<author>
<name>robert-hh</name>
</author>
<published>2021-03-01T13:23:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=22554cf8e21ab97c60137539536eab05d6a6cdcb'/>
<id>22554cf8e21ab97c60137539536eab05d6a6cdcb</id>
<content type='text'>
StateMachine.restart: Restarts the state machine
StateMachine.rx_fifo: Return the number of RX FIFO items, 0 if empty
StateMachine.tx_fifo: Return the number of TX FIFO items, 0 if empty

restart() seems to be the most useful one, as it resets the state machine
to the initial state without the need to re-initialise/re-create.  It also
makes PIO code easier, because then stalling as an error state can be
unlocked.

rx_fifo() is also useful, for MP code to check for data and timeout if no
data arrived.  Complex logic is easier handled in Python code than in PIO
code.

tx_fifo() can be useful to check states where data is not processed, and is
mostly for symmetry.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
StateMachine.restart: Restarts the state machine
StateMachine.rx_fifo: Return the number of RX FIFO items, 0 if empty
StateMachine.tx_fifo: Return the number of TX FIFO items, 0 if empty

restart() seems to be the most useful one, as it resets the state machine
to the initial state without the need to re-initialise/re-create.  It also
makes PIO code easier, because then stalling as an error state can be
unlocked.

rx_fifo() is also useful, for MP code to check for data and timeout if no
data arrived.  Complex logic is easier handled in Python code than in PIO
code.

tx_fifo() can be useful to check states where data is not processed, and is
mostly for symmetry.
</pre>
</div>
</content>
</entry>
<entry>
<title>rp2/moduos: Implement uos.urandom().</title>
<updated>2021-04-09T08:24:38+00:00</updated>
<author>
<name>robert-hh</name>
</author>
<published>2021-03-17T06:57:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=6f06dcaee57cc6f36a4121b4797942200b2d7281'/>
<id>6f06dcaee57cc6f36a4121b4797942200b2d7281</id>
<content type='text'>
The implementation samples rosc.randombits at a frequency lower than the
oscillator frequency.  This gives better random values.  In addition, for
an 8-bit value 8 samples are taken and fed through a 8-bit CRC,
distributing the sampling over the byte.  The resulting sampling rate is
about 120k/sec.

The RNG does not include testing of error conditions, like the ROSC being
in sync with the sampling or completely failing.  Making the interim value
static causes it to perform a little bit better in short sync or drop-out
situations.

The output of uos.urandom() performs well with the NIST800-22 test suite.
In my trial it passed all tests of the sts 2.1.2 test suite.  I also ran a
test of the random data with the Common Criteria test suite AIS 31, and it
passed all tests too.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The implementation samples rosc.randombits at a frequency lower than the
oscillator frequency.  This gives better random values.  In addition, for
an 8-bit value 8 samples are taken and fed through a 8-bit CRC,
distributing the sampling over the byte.  The resulting sampling rate is
about 120k/sec.

The RNG does not include testing of error conditions, like the ROSC being
in sync with the sampling or completely failing.  Making the interim value
static causes it to perform a little bit better in short sync or drop-out
situations.

The output of uos.urandom() performs well with the NIST800-22 test suite.
In my trial it passed all tests of the sts 2.1.2 test suite.  I also ran a
test of the random data with the Common Criteria test suite AIS 31, and it
passed all tests too.
</pre>
</div>
</content>
</entry>
<entry>
<title>rp2/rp2_pio: Validate state machine frequency in constructor.</title>
<updated>2021-04-09T08:06:10+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2021-03-15T05:42:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=2c9af1c1d7398bb340f7c78601be6ed2d79ee0b8'/>
<id>2c9af1c1d7398bb340f7c78601be6ed2d79ee0b8</id>
<content type='text'>
Fixes issue #7025.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes issue #7025.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>py/py.cmake: Introduce MICROPY_INC_CORE as a list with core includes.</title>
<updated>2021-04-09T03:08:35+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2021-04-08T14:59:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=5dcc9b3b16cf6a27acf01bdf8a7d23ae2aff56e3'/>
<id>5dcc9b3b16cf6a27acf01bdf8a7d23ae2aff56e3</id>
<content type='text'>
Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>py/py.cmake: Move qstr helper code to micropy_gather_target_properties.</title>
<updated>2021-04-09T03:08:35+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2021-04-08T13:42:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=0fabda31de33b38c6858925d9195731deba6f54a'/>
<id>0fabda31de33b38c6858925d9195731deba6f54a</id>
<content type='text'>
Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rp2: Import uarray instead of array in rp2 module.</title>
<updated>2021-04-07T00:06:18+00:00</updated>
<author>
<name>Tim Radvan</name>
</author>
<published>2021-04-03T11:20:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=4f53f462ca9dbec45771e06d2d1a84b61e01e61a'/>
<id>4f53f462ca9dbec45771e06d2d1a84b61e01e61a</id>
<content type='text'>
Some forum users noticed that `sm.exec()` took longer the more was present
on the flash filesystem connected to the RP2040.  They traced this back to
the `array` import inside `asm_pio()`, which is causing MicroPython to scan
the filesystem.

uarray is a built-in module, so importing it shouldn't require scanning the
filesystem.

We avoid moving the import to the top-level in order to keep the namespace
clean; we don't want to accidentally expose `rp2.array`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some forum users noticed that `sm.exec()` took longer the more was present
on the flash filesystem connected to the RP2040.  They traced this back to
the `array` import inside `asm_pio()`, which is causing MicroPython to scan
the filesystem.

uarray is a built-in module, so importing it shouldn't require scanning the
filesystem.

We avoid moving the import to the top-level in order to keep the namespace
clean; we don't want to accidentally expose `rp2.array`.
</pre>
</div>
</content>
</entry>
<entry>
<title>rp2/CMakeLists.txt: Enable USB enumeration fix.</title>
<updated>2021-04-06T01:40:02+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2021-04-01T02:36:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=2d8aecd2ad43afeeb14fb8a21fcff29a1000c5c4'/>
<id>2d8aecd2ad43afeeb14fb8a21fcff29a1000c5c4</id>
<content type='text'>
This is a workaround for errata RP2040-E5, and is needed to make USB more
reliable on certain USB ports.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a workaround for errata RP2040-E5, and is needed to make USB more
reliable on certain USB ports.

Signed-off-by: Damien George &lt;damien@micropython.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
