I was only at Alstom Grid DIT in Phoenix a couple of months, when an question came from management, “Does anyone here know PIC assembly language?”
Well, I do! So I took on the modification of the COSI-CT Management Processor firmware. The code was written circa 2003, and was based on earlier efforts. Good designers re-use working code! Anyway, it had been maintained up until about 2010 by Dylan Stewart, but Dylan now had his hands full as Product Manager. So, I took it on.
It started largely as a minor rework. The processor has explicit support for each stored configuration value inside, knowing which one(s) are bytes, which words, which double words, and which are strings. Things had changed in the configuration, but support for these changes was incomplete. So, I addressed that.
A larger issue was that of supported development environment. The old MPLab 8.x was obsolete, with MPLab X taking its place, but MPLab X would not automatically import MPLab 8.x files, especially complex ones. I installed both development systems, and ensured that the outputs were byte-for-byte equivalent – which you can do with assembly language code! It took a lot of tinkering to get the code to assemble properly under MPLab X, even more difficult to get it to assemble under both, but I managed it.
There was some discussion about the apparent corruption of data values on the backplane bus to and from the other internal cards. There was no error checking on this bus. I wrote a proposal to use CRC on the backplane comms. It was carefully tweaked to fit within the protocol, and minimize overhead. I implemented it on the Management Processor, but due to an error in the implementation on the CT card’s FPGA, there was an amiguity in the link, causing protocol failure. I tried to get this error corrected, but it never was, so the effort was abandoned in place. The code is still there, but it is never used.