lnls-dig / halcs

Hardware Abstraction Layer for Control Systems
GNU General Public License v3.0
1 stars 4 forks source link

Update RFFE reprog functions #158

Open henrique-silva opened 7 years ago

henrique-silva commented 7 years ago

The RFFE reprog algorithm has changed https://github.com/lnls-dig/rffe-fw/commit/30a18159839dc855a4733c4e177e56a5a15fd8ba Now the bsmp client must send a message with 128 bytes, being the first 3 the new firmware version that is going to be uploaded in the order -> MAJOR MINOR PATCH, followed by 125 pad bytes (doesn't matter the value). Right after, the variable Reprogramming (ID=9) must be set to 1. Then, the firmware must be uploaded in 128-bytes pages, with the last one being padded with 0xFF if necessary. When finished, the variable Reprogramming must be set to 2, so that the RFFE can process the new file and Reset itself.

A python implementation of this routine can be found here

OBS: The reset happens automatically after processing the new firmware file, no need to set the Reset variable for this.