Zigbee fix flashing CC2562P with latest firmware (#22117)

This commit is contained in:
s-hadinger 2024-09-09 21:56:18 +02:00 committed by GitHub
parent 7247cd6c44
commit 2d522485c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 7 deletions

View File

@ -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

View File

@ -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`.
@ -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)
@ -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)
@ -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)
@ -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
@ -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