Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e23f8d493215
Choose a base ref
...
head repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 32a36a2fdb60
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Jan 27, 2020

  1. Copy the full SHA
    7d4af25 View commit details
  2. Copy the full SHA
    32a36a2 View commit details
Showing with 6 additions and 5 deletions.
  1. +6 −5 software/glasgow/applet/program/nrf24lx1/__init__.py
11 changes: 6 additions & 5 deletions software/glasgow/applet/program/nrf24lx1/__init__.py
Original file line number Diff line number Diff line change
@@ -30,13 +30,13 @@ class ProgramNRF24Lx1Error(GlasgowAppletError):
]

_nrf24lu1p_32k_map = [
_MemoryArea(name="code/NV data",
mem_addr= 0x0000, spi_addr= 0x0000, size=0x8000),
_MemoryArea(name="code", mem_addr= 0x0000, spi_addr= 0x0000, size=0x7C00),
_MemoryArea(name="NV data", mem_addr= 0x7C00, spi_addr= 0x7C00, size=0x0400),
_MemoryArea(name="info", mem_addr=0x10000, spi_addr=0x10000, size=0x0200),
]

_nrf24lu1p_16k_map = [
_MemoryArea(name="code", mem_addr= 0x0000, spi_addr= 0x0000, size=0x4000),
_MemoryArea(name="code", mem_addr= 0x0000, spi_addr= 0x0000, size=0x3C00),
_MemoryArea(name="NV data", mem_addr= 0x7C00, spi_addr= 0x7C00, size=0x0400),
_MemoryArea(name="info", mem_addr=0x10000, spi_addr=0x10000, size=0x0200),
]
@@ -324,9 +324,10 @@ async def check_read_protected():
(chunk_spi_addr + len(chunk_data) + page_size - 1) // page_size))
need_erase_pages = overwrite_pages - erased_pages
if need_erase_pages:
self.logger.log(level, "erasing %s memory at %#06x+%#06x",
memory_area.name, chunk_mem_addr, len(chunk_data))
for page in need_erase_pages:
page_addr = (memory_area.spi_addr & 0x10000) | (page * page_size)
self.logger.log(level, "erasing %s memory at %#06x+%#06x",
memory_area.name, page_addr, page_size)
await nrf24lx1_iface.write_enable()
await nrf24lx1_iface.erase_page(page)
await nrf24lx1_iface.wait_status()