diff --git a/Configuration-Variables-(CV)-List.md b/Configuration-Variables-(CV)-List.md index b776492..49e847f 100644 --- a/Configuration-Variables-(CV)-List.md +++ b/Configuration-Variables-(CV)-List.md @@ -132,7 +132,7 @@ CV_63 determines how many elements from the left side (beginning with index 0) o #### 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. +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 startup. #### CV_112, CV_113, CV_114, CV_115 - GPIO PWM Configuration @@ -143,16 +143,37 @@ PWM enabled "1" - PWM disabled "0" ![GPIO Slices](https://github.com/gab-k/RP2040-Decoder/blob/main/docs/svg/GPIO_slices.svg) -Every slice controls two outputs (Two independent output channels, duty cycle from 0% to 100% inclusive) and can be configured with several parameters: +Every slice controls 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 +* Wrap (16Bit): Sets the slice time period of x cycles - effectively determining 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 +* Level Channel A / Level Channel B - (16Bit each): Determining how many of the x cycles the signal is at a high level - effectively determining 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_172 - ADC Offset +If CV_172 = "0xFF" = "255" there will be a measurement procedure on startup + + +#### CV_173 - ADC offset measurement cycles +Determines how many ADC offset measurement iterations are done. + + +#### CV_174 - Additional motor-PWM clock divider. +Additional Clock Divider - works the same as any GPIO clock divider + #### 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 +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. + + +#### CV_176, CV_177, CV_178, CV_179 - Base PWM Level used in feed-forward control +CV_176 - High Byte forward -- CV_177 - Low Byte forward -- CV_178 - High Byte reverse -- CV_179 - Low Byte reverse + +These values are equivalent to y1(forward) and y1(reverse) mentioned [here](https://github.com/gab-k/RP2040-Decoder/wiki/Software-description#feed-forward). Writing "0" to all four CVs schedules a new calibration on startup. + + +#### CV_257 to CV_512 - Function Mapping CVs +The switching status of the outputs depends both on the function instruction received and on the current direction of travel. That means you can, for example, use a function to switch two or more outputs or, as is usual with headlights, switch them depending on the direction of travel. For configuration, 32 bits (corresponding to the GPIOs) are available for each function in each direction of travel.