wb_spi incorrect number of bits transmitted when toggling `CHAR_LEN` config
When alternating CHAR_LEN
configuration parameter [bits 6:0 of the CTRL
(0x10) register], the third attempt fails.
Steps to reproduce:
- Start a new SPI transaction with 0x28 as the LSB of the
CTRL
register (i.e. 40 bits to be transmitted). Verify that indeed 40 bits are transmitted. - The same as (1) but with 0x23 (i.e. 35 chars). Verify it still works.
- The same as (1), back to 0x28. --BUG-- 0x29 gets written instead and 41 bits are transmitted.
Alternatively, just run the attached test bench for ~10us to see an assert fired when the bug occurs: