Earlier versions of RPI_UI and DIO had an annoying bug in the firmware.
- Dio 1.3 has fixed firmware.
- RPI_UI 1.3 has fixed firmware.
The bug in dio manifests it self as follows: When you write the value 0x1234 to the nsamp register (0x81) with the value 0x1234 TWICE, the value 0x3412 is read back.
his means that as a workaround for this board, you should byteswap the value you want and then write it twice. This can be done in one SPI transaction of only one byte extra.
In rpi_ui the lower 8 bits will always remain 0x00. So after writing 0x1234 twice, you'll see 0x3400 in the register. This means that you have the choice of using 0x40, the default (i.e. do not touch the register at all) or use a multiple of 0x100.
Luckily this is only an issue for the nsamp register. Version 1.3 and further have this problem fixed.