diff --git a/Configuration-Variables-(CV)-List.md b/Configuration-Variables-(CV)-List.md index a6b2e2a..1238f42 100644 --- a/Configuration-Variables-(CV)-List.md +++ b/Configuration-Variables-(CV)-List.md @@ -53,10 +53,63 @@ Bit0 is used to reverse direction i.e. "0" = normal, "1" = reverse. Bit5 switches between basic and extended addressing modes i.e. "0" = basic address, "1" = extended address. The other 6 bits are currently not in use and therefore irrelevant. - +#### CV_31 & CV_32 - Extended CV pointer (Read-Only) +Not in use. + +#### CV_47 - Feed-forward gain k_ff +k_ff defines the correction behavior with regard to the y2 variable. High values for k_ff lead to a faster change in the variable. Values for k_ff that are too high can lead to oscillations. +k_ff = CV_47/10000 + +#### CV_48 - Filter time constant (tau) in ms +The time constant tau characterizes the low-pass filter which is connected downstream in the D component of the PID controller + +#### CV_49 - PID Control sampling time t in ms +Every t seconds the pid_control() function gets called to compute the new control output + +#### CV_50 - PID Control I Factor +Integral gain factor of the PID-Controller + +#### CV_51 - PID Control D Factor +Derivative gain factor of the PID-Controller + +#### CV_52 & CV_53 - PID Integral Limits +Maximum and minimum integral part values + +#### CV_54 & CV_55 - Gain scheduling config k_p @ x0 +CV_54 - High Byte -- CV_55 - Low Byte + +#### CV_56 & CV_57 - Gain scheduling config k_p @ x1 +CV_56 - High Byte -- CV_57 - Low Byte + +#### CV_58 & CV_59 - Gain scheduling config k_p @ x2 +CV_58 - High Byte -- CV_59 - Low Byte + +#### CV_60 - Gain scheduling config x1 shift percentage +Determines position of x1 in percent -> x1 shift in % ≙ CV_60/255 + +#### CV_61 - Measurement Iterations +Total amount of BEMF-Voltage measurement iterations + +#### CV_62 - Measurement Delay +BEMF-Voltage measurement delay + +#### CV_63 & CV_64 - Measurement array cutoffs +CV_63 determines how many elements from the left side (beginning with index 0) of the array will be discarded while CV_64 determines how many elements from the right side (beginning from highest index) will be discarded. + #### CV_65 - New flash variable Each Byte of the factory new flash chip should have a inital state of "0xFF". This will be checked for in the beginning of core0.c (see cv_setup_check()). When CV_65 == "255" == "0xFF" the default config (CV.h) will be written to flash. Alternatively a reset to default can be done by either writing "8" to CV_8 or writing "255" to CV_65 which then triggers a reset on restart. +#### CV_112, CV_113, CV_114, CV_115 - GPIO PWM Configuration +PWM enabled "1" - PWM disabled "0" + +#### CV_116 to CV_171 - PWM Slice configuration +Every slice controls two outputs (Two independent output channels, duty cycle from 0% to 100% inclusive) and can be configured with several parameters: + +* Wrap (16Bit): Sets the slice time period of x cycles - effectively deciding the frequency +* Clock Divider: Additional clock divider +* Level Channel A/Channel B (16Bit): Determining how many of the x cycles the signal is at a high level - effectively deciding the duty cycle + +A more detailed explanation can be found in the [RP2040-Datasheet](https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf) in Chapter 4.5. #### CV_175 - speed_helper timer delay This timer delay can be used to change the time between two speed steps. So basically an additional option to adjust the deceleration and acceleration rate. \ No newline at end of file