apollo-lhc / cm_mcu

Microcontroller source code for the APOLLO blade for the CMS tracker HL-LHC upgrade.
MIT License
2 stars 2 forks source link

Miscellenous bugs and corrections #204

Closed pkotamnives closed 5 months ago

pkotamnives commented 5 months ago

Describe the bug A : Found a bug in requiring all 12-ch FF parts to have the same vendor but when they don't the power state machine failed. B : Correct a comment in packer v2 C : Found a bug in optical power commands. The value output should be 2-bytes instead of 1-byte. The unit is 0.1 µW. The range is 0-6.5535mW.

To Fix A : remove strncmp(vendor_string_rxch, vendor_string, nstring) == 0 in https://github.com/apollo-lhc/cm_mcu/blob/master/projects/cm_mcu/LocalTasks.c#L821 B : change // ... of data[15:14] (2 bits) to // ... of data[15:12] (4 bits) in https://github.com/apollo-lhc/cm_mcu/blob/dev_packerv2/projects/cm_mcu/ZynqMonTask.c#L67 C : Fix all "number of bytes to read" in *OPT_POW such as https://github.com/apollo-lhc/cm_mcu/blob/master/projects/cm_mcu/LocalTasks.c#L233 from 1 to 2.

pkotamnives commented 5 months ago

Implement in #201