Skip to content

v2.204.0

Choose a tag to compare

@zhh198903-ctrl zhh198903-ctrl released this 27 Sep 20:47
· 11 commits to main since this release

A write field of the wrong type or range is refused, not guessed

Every field of every write endpoint was sent values of the wrong type and range. Three kinds of answer came back that should not have.

Switches read by truthiness. "x", -1 and [0] all turned these on: low_pwr, software_reset (a module reset), allow_lp_hw, bank_broadcast, squelch_method, DataPath apply / apply_immediate, and media lane switching enable / commit. They now take true or false only. An unknown action such as "rest" used to do nothing and answer ok. It is now a 400 that lists reset, low_power and high_power.

Values cut down.

  • true and 1.5 became mask bit 1.
  • PRBS pattern 300 went down as 12, and −1 as 15.
  • A raw data byte of −1 or 1FFh was written as FFh.
  • A page, address or bank of true or 1.5 became 1.

Masks are now whole numbers, patterns 0–15, data bytes 00h–FFh, and page, address and bank whole numbers. A string or null in a mask or a PRBS section used to give a 500 and now gives a 400.

Short lists padded. A short app_select list staged AppSel 0 (no Application) on every lane it left out. A short PRBS patterns list set PRBS31Q on those lanes. Both now need one entry per lane, as redirection already did. A raw write that named no page or address used to start at Lower Memory byte 0 and run through the Module Global Controls at 26–36. It now has to name both.

Every refusal happens before anything is written. The page already sends well-formed values, so this changes nothing in normal use. It matters for scripts and programs calling the API.

2941 end-to-end tests. 32-bit build, as CH341 requires.