<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/ports/nrf, branch encoding</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=encoding</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=encoding'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2020-07-18T00:43:02+00:00</updated>
<entry>
<title>Disable existing native networking.</title>
<updated>2020-07-18T00:43:02+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2020-07-18T00:43:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=610e0171aac69f7cd7b7c46eb776a3624ce224a3'/>
<id>urn:sha1:610e0171aac69f7cd7b7c46eb776a3624ce224a3</id>
<content type='text'>
We're moving towards a co-processor model and a Wiznet library is
already available.

New native APIs will replace these for chips with networking like the
ESP32S2 but they won't be these.
</content>
</entry>
<entry>
<title>Merge pull request #2879 from jepler/background-callback</title>
<updated>2020-07-17T20:46:03+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jeff@adafruit.com</email>
</author>
<published>2020-07-17T20:46:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9cdf5e148a8fcc506da6e2a8598fa2963bbcde2e'/>
<id>urn:sha1:9cdf5e148a8fcc506da6e2a8598fa2963bbcde2e</id>
<content type='text'>
Use a linked list of background tasks to perform</content>
</entry>
<entry>
<title>Merge pull request #3157 from tinkeringtech/tinkeringtech-scoutmakes-azul</title>
<updated>2020-07-16T18:03:31+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@adafruit.com</email>
</author>
<published>2020-07-16T18:03:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7bb508bf43ae2bd46b3cb8694f037a3d8c09ac42'/>
<id>urn:sha1:7bb508bf43ae2bd46b3cb8694f037a3d8c09ac42</id>
<content type='text'>
Addition of Tinkeringtech ScoutMakes Azul nRF52840 based platform to CircuitPython</content>
</entry>
<entry>
<title>Added the TinkeringTech ScoutMakes Azul platform to CircuitPython</title>
<updated>2020-07-16T01:49:34+00:00</updated>
<author>
<name>TinkeringTech</name>
<email>admin@tinkeringtech.com</email>
</author>
<published>2020-07-16T01:49:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=49fcfd14d213cb6f6441fc718ff8fc8e7a5cc5fa'/>
<id>urn:sha1:49fcfd14d213cb6f6441fc718ff8fc8e7a5cc5fa</id>
<content type='text'>
</content>
</entry>
<entry>
<title>supervisor: factor supervisor_background_tasks from sundry ports</title>
<updated>2020-07-15T16:49:44+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-07-13T15:33:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1df48176ce2e4111c4629269cb86d2a6e365a3d2'/>
<id>urn:sha1:1df48176ce2e4111c4629269cb86d2a6e365a3d2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>supervisor: factor out, Handle USB via background callback</title>
<updated>2020-07-15T16:49:44+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-07-07T16:14:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6160d11c5a04f60e54ce977fd73fafa5ba858aa0'/>
<id>urn:sha1:6160d11c5a04f60e54ce977fd73fafa5ba858aa0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>nRF: Always use sd_nvic_critical_region calls</title>
<updated>2020-07-15T14:26:47+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-07-14T22:34:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=dc74ae83da6f519a36d75388b5be9923a10bf063'/>
<id>urn:sha1:dc74ae83da6f519a36d75388b5be9923a10bf063</id>
<content type='text'>
The motivation for doing this is so that we can allow
common_hal_mcu_disable_interrupts in IRQ context, something that works
on other ports, but not on nRF with SD enabled.  This is because
when SD is enabled, calling sd_softdevice_is_enabled in the context
of an interrupt with priority 2 or 3 causes a HardFault.  We have chosen
to give the USB interrupt priority 2 on nRF, the highest priority that
is compatible with SD.

Since at least SoftDevice s130 v2.0.1, sd_nvic_critical_region_enter/exit
have been implemented as inline functions and are safe to call even if
softdevice is not enabled.  Reference kindly provided by danh:
 https://devzone.nordicsemi.com/f/nordic-q-a/29553/sd_nvic_critical_region_enter-exit-missing-in-s130-v2

Switching to these as the default/only way to enable/disable interrupts
simplifies things, and fixes several problems and potential problems:
 * Interrupts at priority 2 or 3 could not call common_hal_mcu_disable_interrupts
   because the call to sd_softdevice_is_enabled would HardFault
 * Hypothetically, the state of sd_softdevice_is_enabled
   could change from the disable to the enable call, meaning the calls
   would not match (__disable_irq() could be balanced with
   sd_nvic_critical_region_exit).

This also fixes a problem I believe would exist if disable() were called
twice when SD is enabled.  There is a single "is_nested_critical_region"
flag, and the second call would set it to 1.  Both of the enable()
calls that followed would call critical_region_exit(1), and interrupts
would not properly be reenabled.  In the new version of the code,
we use our own nesting_count value to track the intended state, so
now nested disable()s only call critical_region_enter() once, only
updating is_nested_critical_region once; and only the second enable()
call will call critical_region_exit, with the right value of i_n_c_r.

Finally, in port_sleep_until_interrupt, if !sd_enabled, we really do
need to __disable_irq, rather than using the common_hal_mcu routines;
the reason why is documented in a comment.
</content>
</entry>
<entry>
<title>Merge pull request #3136 from xiongyihui/master</title>
<updated>2020-07-14T00:14:18+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@adafruit.com</email>
</author>
<published>2020-07-14T00:14:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=90ad9beff5b55d86fb43910e93ba55a15c883ca2'/>
<id>urn:sha1:90ad9beff5b55d86fb43910e93ba55a15c883ca2</id>
<content type='text'>
Add 2 boards nRF52840 M.2 devkit and M60 Keyboard</content>
</entry>
<entry>
<title>Merge pull request #3003 from Flameeyes/master</title>
<updated>2020-07-13T23:28:49+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@adafruit.com</email>
</author>
<published>2020-07-13T23:28:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=51c888d4be5ec0e0bc19a0de539f0f21a04da135'/>
<id>urn:sha1:51c888d4be5ec0e0bc19a0de539f0f21a04da135</id>
<content type='text'>
License tagging according to REUSE specifications.</content>
</entry>
<entry>
<title>Merge branch 'main' into master</title>
<updated>2020-07-13T22:53:44+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@adafruit.com</email>
</author>
<published>2020-07-13T22:53:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d712d1281c6f7bde36629767ce429cc646ed0a29'/>
<id>urn:sha1:d712d1281c6f7bde36629767ce429cc646ed0a29</id>
<content type='text'>
</content>
</entry>
</feed>
