Skip to content

Commit

Permalink
Zigbee fix flashing CC2562P with latest firmware (arendst#22117)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-hadinger authored and hawa-lc4 committed Sep 16, 2024
1 parent 6e08563 commit 099659b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ All notable changes to this project will be documented in this file.
- Shutter missing HOLD on shutterbutton (#22108)
- ModbusBridge request and response logic (#22075)
- Berry energy missing attributes
- Zigbee flashing CC2562P with latest firmware

### Removed

Expand Down
9 changes: 2 additions & 7 deletions tasmota/berry/zigbee/cc2652_flasher.be
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
# - `cc.cmd_get_chip_id()` returns the chip ID
#
# - `cc.flash_read(addr, len)` reads `len` bytes from address `addr``
# len must be a multiple of 4 and less or equal than 128 bytes
# len must be less or equal than 128 bytes
# Returns a bytes() object
#
# - `cc.flash_crc32(addr, len)` returns the CRC32 of a flash region
#
# - `cc.flash_write(addr, data)` writes bytes to the flash
# `data` is a bytes() buffer, its len must be a multiple of 4 and less or equal than 128
# `data` is a bytes() buffer, its len must be less or equal than 128
# This call does not erase the flash, so it must have been erased before.
# The bootloader checks that the bytes were correctly written, i.e. that
# the appropriate bits were changed from `1` to `0`.
Expand Down Expand Up @@ -248,7 +248,6 @@ class cc2652_flasher
end

def cmd_memory_read(addr, len)
if (len % 4 != 0) raise "value_error", "len must be a multiple of 4" end
if len > 128 raise "value_error", "len is bigger than 128" end
var b = bytes("2A")
b.add(addr, -4)
Expand All @@ -261,7 +260,6 @@ class cc2652_flasher
# does not look to be implemented
# def cmd_memory_write(addr, data)
# var sz = size(data)
# if (sz % 4 != 0) raise "value_error", "len must be a multiple of 4" end
# if sz > 128 raise "value_error", "len is bigger than 128" end
# var b = bytes("2B")
# b.add(addr, -4)
Expand All @@ -273,7 +271,6 @@ class cc2652_flasher
# end

def cmd_download(addr, sz)
if (sz % 4 != 0) raise "value_error", "len must be a multiple of 4" end
if sz > 128 raise "value_error", "len is bigger than 128" end
var b = bytes("21")
b.add(addr, -4)
Expand All @@ -285,7 +282,6 @@ class cc2652_flasher

def cmd_send_data(data)
var sz = size(data)
if (sz % 4 != 0) raise "value_error", "len must be a multiple of 4" end
if sz > 128 raise "value_error", "len is bigger than 128" end
var b = bytes("24")
b += data
Expand Down Expand Up @@ -336,7 +332,6 @@ class cc2652_flasher
# higher level
def flash_write(addr, data)
var sz = size(data)
if (sz % 4 != 0) raise "value_error", "len must be a multiple of 4" end
if sz > 128 raise "value_error", "len is bigger than 128" end

var ret
Expand Down

0 comments on commit 099659b

Please sign in to comment.