Add SSP_CFG support to CAN test library
Issue: https://gitlab.fel.cvut.cz/illeondr/CAN_FD_IP_Core/issues/204 implements configuration of Secondary Sampling Point in Core.
Secondary Sampling Point is a special "delayed" sampling point which is used by Transmitter in Data-Bit Rate. The reason for this sampling point is, that RX pin needs to be sampled later due to Roundtrip from TX to RX pin over physical layer transceiver. Such a TX->RX Roadtrip takes longer than regular distance of Data-Sampling Point. For this reason, regular sampling point is delayed and it creates a so-called secondary sampling point. This is also explained in CAN Protocol Spec.
What is crucial is how much to delay? There is a measurement executed between EDL/R0 bits by CAN FD Transmitter. This measurement is also described in CAN Protocol Spec. This value is in our implementation measured in clock cycles. Such a measurement result is called: Transceiver Delay. Till now, only transceiver delay (which is readable from TRV_DELAY after measurement) was used to delay the sampling point.
The issue above implemented an optional configuration of secondary sampling point where 3 possible ways of delaying sampling point could be configured via SSP_CFG register:
- Use only TRV_DELAY.
- Use TRV_DELAY + fixed offset given by user
- Use only offset given by user.
This new feature does not have support in CANTestlib yet. The aim of this task is to create procedure, e.g. CAN_configure_ssp. Which will configure this register. The input to this procedure might be sth like:
- "ssp_source" which will be enumerated type with e.g. ssp_measured, ssp_meas_n_offset, ssp_offset
- "ssp_offset_value" which will be offset applied.