USB EPROM/Flash Programmer
Variables
config.hpp File Reference

Configuration of UsbFlashProg. More...

#include "pico/stdlib.h"
#include "hal/adc.hpp"
#include "hal/pwm.hpp"
#include "modules/vgenerator.hpp"
Include dependency graph for config.hpp:

Variables

constexpr uint kVddPwmPin = 20
 VDD/PWM : Assigned PWM GPIO pin. More...
 
constexpr uint32_t kVddPwmFreq = Pwm::kPwmDefaultFreq
 VDD/PWM : PWM Frequency, in Hertz. More...
 
constexpr float kVddPwmMinDuty = VddConfig::kPwmMinDutyCycleDefault
 VDD/PWM : PWM Min Duty Cycle, in Percent. More...
 
constexpr float kVddPwmMaxDuty = VddConfig::kPwmMaxDutyCycleDefault
 VDD/PWM : PWM Max Duty Cycle, in Percent. More...
 
constexpr float kVddPwmSlowStepDuty = VddConfig::kPwmSlowStepDutyCycleDefault
 VDD/PWM : PWM Slow Step Duty Cycle, in Percent. More...
 
constexpr float kVddPwmFastStepDuty = VddConfig::kPwmFastStepDutyCycleDefault
 VDD/PWM : PWM Fast Step Duty Cycle, in Percent. More...
 
constexpr float kVddPwmToleranceToFast = VddConfig::kPwmToleranceToFastDefault
 VDD/PWM : PWM Voltage Tolerance to use Fast Step, in Percent. More...
 
constexpr uint kVddAdcChannel = 0
 VDD/ADC : Assigned ADC channel. More...
 
constexpr float kVddAdcVRef = Adc::kAdcDefaultVRef
 VDD/ADC : ADC Reference Voltage, in Volts. More...
 
constexpr float kVddFbR1 = 470.0f
 VDD/VC : Voltage Converter Feedback R1 resistor, in Ohms. More...
 
constexpr float kVddFbR2 = 330.0f
 VDD/VC : Voltage Converter Feedback R2 resistor, in Ohms. More...
 
constexpr float kVddDivider = (kVddFbR1 + kVddFbR2) / kVddFbR2
 VDD/VC : Voltage Converter Feedback Divisor, from 0.0 to 1.0. More...
 
constexpr float kVddVoutTolerance = VddConfig::kDc2DcVoutToleranceDefault
 VDD/VC : Output Voltage Tolerance, in percent. More...
 
constexpr uint kVddCtrlPin = 22
 VDD/CTRL : Assigned Voltage Control GPIO pin. More...
 
constexpr uint kVddOnVppPin = 17
 VDD/CTRL : Assigned VDD on VPP GPIO pin. More...
 
constexpr uint kVppPwmPin = 21
 VPP/PWM : Assigned PWM GPIO pin. More...
 
constexpr uint32_t kVppPwmFreq = Pwm::kPwmDefaultFreq
 VPP/PWM : PWM Frequency, in Hertz. More...
 
constexpr float kVppPwmMinDuty = VddConfig::kPwmMinDutyCycleDefault
 VPP/PWM : PWM Min Duty Cycle, in Percent. More...
 
constexpr float kVppPwmMaxDuty = VddConfig::kPwmMaxDutyCycleDefault
 VPP/PWM : PWM Max Duty Cycle, in Percent. More...
 
constexpr float kVppPwmSlowStepDuty = VddConfig::kPwmSlowStepDutyCycleDefault
 VPP/PWM : PWM Slow Step Duty Cycle, in Percent. More...
 
constexpr float kVppPwmFastStepDuty = VddConfig::kPwmFastStepDutyCycleDefault
 VPP/PWM : PWM Fast Step Duty Cycle, in Percent. More...
 
constexpr float kVppPwmToleranceToFast = VddConfig::kPwmToleranceToFastDefault
 VPP/PWM : PWM Voltage Tolerance to use Fast Step, in Percent. More...
 
constexpr uint kVppAdcChannel = 1
 VPP/ADC : Assigned ADC channel. More...
 
constexpr float kVppAdcVRef = Adc::kAdcDefaultVRef
 VPP/ADC : ADC Reference Voltage, in Volts. More...
 
constexpr float kVppFbR1 = 3900.0f
 VPP/VC : Voltage Converter Feedback R1 resistor, in Ohms. More...
 
constexpr float kVppFbR2 = 470.0f
 VPP/VC : Voltage Converter Feedback R2 resistor, in Ohms. More...
 
constexpr float kVppDivider = (kVppFbR1 + kVppFbR2) / kVppFbR2
 VPP/VC : Voltage Converter Feedback Divisor, from 0.0 to 1.0. More...
 
constexpr float kVppVoutTolerance = VddConfig::kDc2DcVoutToleranceDefault
 VPP/VC : Output Voltage Tolerance, in percent. More...
 
constexpr uint kVppCtrlPin = 28
 VPP/CTRL : Assigned Voltage Control GPIO pin. More...
 
constexpr uint kVppVcSinPin = 12
 VPP/CTRL : Assigned Voltage Control, Shift Register SIN, GPIO pin. More...
 
constexpr uint kVppVcClkPin = 14
 VPP/CTRL : Assigned Voltage Control, Shift Register CLK, GPIO pin. More...
 
constexpr uint kVppVcClrPin = 15
 VPP/CTRL : Assigned Voltage Control, Shift Register CLR, GPIO pin. More...
 
constexpr uint kVppVcRckPin = 13
 VPP/CTRL : Assigned Voltage Control, Shift Register RCK, GPIO pin. More...
 
constexpr uint8_t kVppOnA18VcRegisterBit = 0
 VPP/CTRL : VC Shift Register, VPP on A18 bit. More...
 
constexpr uint8_t kVppOnA9VcRegisterBit = 1
 VPP/CTRL : VC Shift Register, VPP on A9 bit. More...
 
constexpr uint8_t kVppOnCEVcRegisterBit = 2
 VPP/CTRL : VC Shift Register, VPP on CE bit. More...
 
constexpr uint8_t kVppOnOEVcRegisterBit = 3
 VPP/CTRL : VC Shift Register, VPP on OE bit. More...
 
constexpr uint8_t kVppOnWEVcRegisterBit = 4
 VPP/CTRL : VC Shift Register, VPP on WE bit. More...
 
constexpr float kVppInitial = 12.0f
 VPP/GEN : VPP Initial value, in Volts. More...
 
constexpr float kVddInitial = 5.0f
 VDD/GEN : VDD Initial value, in Volts. More...
 
constexpr uint kBusCEPin = 11
 BUS/CTRL : Assigned CE GPIO pin. More...
 
constexpr uint kBusOEPin = 9
 BUS/CTRL : Assigned OE GPIO pin. More...
 
constexpr uint kBusWEPin = 10
 BUS/CTRL : Assigned WE GPIO pin. More...
 
constexpr uint kBusDataSinPin = 4
 BUS/Data : Assigned Data Bus, Shift Register SIN, GPIO pin. More...
 
constexpr uint kBusDataClkPin = 6
 BUS/Data : Assigned Data Bus, Shift Register CLK, GPIO pin. More...
 
constexpr uint kBusDataClrPin = 7
 BUS/Data : Assigned Data Bus, Shift Register CLR, GPIO pin. More...
 
constexpr uint kBusDataRckPin = 5
 BUS/Data : Assigned Data Bus, Shift Register RCK, GPIO pin. More...
 
constexpr uint kBusDataSoutPin = 8
 BUS/Data : Assigned Data Bus, Shift Register SOUT, GPIO pin. More...
 
constexpr uint kBusAddrSinPin = 0
 BUS/Address : Assigned Address Bus, Shift Register SIN, GPIO pin. More...
 
constexpr uint kBusAddrClkPin = 2
 BUS/Address : Assigned Address Bus, Shift Register CLK, GPIO pin. More...
 
constexpr uint kBusAddrClrPin = 3
 BUS/Address : Assigned Address Bus, Shift Register CLR, GPIO pin. More...
 
constexpr uint kBusAddrRckPin = 1
 BUS/Address : Assigned Address Bus, Shift Register RCK, GPIO pin. More...
 
constexpr uint32_t kCommTimeOut = 50
 COMM : Communication timeout, in milliseconds. More...
 
constexpr uint32_t kStabilizationTime = 200
 GENERAL : Time for stabilization, in milliseconds. More...
 

Detailed Description

Configuration of UsbFlashProg.

Author
Robson Martins (https://www.robsonmartins.com)

Variable Documentation

◆ kVddPwmPin

constexpr uint kVddPwmPin = 20
constexpr

VDD/PWM : Assigned PWM GPIO pin.

◆ kVddPwmFreq

constexpr uint32_t kVddPwmFreq = Pwm::kPwmDefaultFreq
constexpr

VDD/PWM : PWM Frequency, in Hertz.

◆ kVddPwmMinDuty

constexpr float kVddPwmMinDuty = VddConfig::kPwmMinDutyCycleDefault
constexpr

VDD/PWM : PWM Min Duty Cycle, in Percent.

◆ kVddPwmMaxDuty

constexpr float kVddPwmMaxDuty = VddConfig::kPwmMaxDutyCycleDefault
constexpr

VDD/PWM : PWM Max Duty Cycle, in Percent.

◆ kVddPwmSlowStepDuty

constexpr float kVddPwmSlowStepDuty = VddConfig::kPwmSlowStepDutyCycleDefault
constexpr

VDD/PWM : PWM Slow Step Duty Cycle, in Percent.

◆ kVddPwmFastStepDuty

constexpr float kVddPwmFastStepDuty = VddConfig::kPwmFastStepDutyCycleDefault
constexpr

VDD/PWM : PWM Fast Step Duty Cycle, in Percent.

◆ kVddPwmToleranceToFast

constexpr float kVddPwmToleranceToFast = VddConfig::kPwmToleranceToFastDefault
constexpr

VDD/PWM : PWM Voltage Tolerance to use Fast Step, in Percent.

◆ kVddAdcChannel

constexpr uint kVddAdcChannel = 0
constexpr

VDD/ADC : Assigned ADC channel.

◆ kVddAdcVRef

constexpr float kVddAdcVRef = Adc::kAdcDefaultVRef
constexpr

VDD/ADC : ADC Reference Voltage, in Volts.

◆ kVddFbR1

constexpr float kVddFbR1 = 470.0f
constexpr

VDD/VC : Voltage Converter Feedback R1 resistor, in Ohms.

◆ kVddFbR2

constexpr float kVddFbR2 = 330.0f
constexpr

VDD/VC : Voltage Converter Feedback R2 resistor, in Ohms.

◆ kVddDivider

constexpr float kVddDivider = (kVddFbR1 + kVddFbR2) / kVddFbR2
constexpr

VDD/VC : Voltage Converter Feedback Divisor, from 0.0 to 1.0.

◆ kVddVoutTolerance

constexpr float kVddVoutTolerance = VddConfig::kDc2DcVoutToleranceDefault
constexpr

VDD/VC : Output Voltage Tolerance, in percent.

◆ kVddCtrlPin

constexpr uint kVddCtrlPin = 22
constexpr

VDD/CTRL : Assigned Voltage Control GPIO pin.

◆ kVddOnVppPin

constexpr uint kVddOnVppPin = 17
constexpr

VDD/CTRL : Assigned VDD on VPP GPIO pin.

◆ kVppPwmPin

constexpr uint kVppPwmPin = 21
constexpr

VPP/PWM : Assigned PWM GPIO pin.

◆ kVppPwmFreq

constexpr uint32_t kVppPwmFreq = Pwm::kPwmDefaultFreq
constexpr

VPP/PWM : PWM Frequency, in Hertz.

◆ kVppPwmMinDuty

constexpr float kVppPwmMinDuty = VddConfig::kPwmMinDutyCycleDefault
constexpr

VPP/PWM : PWM Min Duty Cycle, in Percent.

◆ kVppPwmMaxDuty

constexpr float kVppPwmMaxDuty = VddConfig::kPwmMaxDutyCycleDefault
constexpr

VPP/PWM : PWM Max Duty Cycle, in Percent.

◆ kVppPwmSlowStepDuty

constexpr float kVppPwmSlowStepDuty = VddConfig::kPwmSlowStepDutyCycleDefault
constexpr

VPP/PWM : PWM Slow Step Duty Cycle, in Percent.

◆ kVppPwmFastStepDuty

constexpr float kVppPwmFastStepDuty = VddConfig::kPwmFastStepDutyCycleDefault
constexpr

VPP/PWM : PWM Fast Step Duty Cycle, in Percent.

◆ kVppPwmToleranceToFast

constexpr float kVppPwmToleranceToFast = VddConfig::kPwmToleranceToFastDefault
constexpr

VPP/PWM : PWM Voltage Tolerance to use Fast Step, in Percent.

◆ kVppAdcChannel

constexpr uint kVppAdcChannel = 1
constexpr

VPP/ADC : Assigned ADC channel.

◆ kVppAdcVRef

constexpr float kVppAdcVRef = Adc::kAdcDefaultVRef
constexpr

VPP/ADC : ADC Reference Voltage, in Volts.

◆ kVppFbR1

constexpr float kVppFbR1 = 3900.0f
constexpr

VPP/VC : Voltage Converter Feedback R1 resistor, in Ohms.

◆ kVppFbR2

constexpr float kVppFbR2 = 470.0f
constexpr

VPP/VC : Voltage Converter Feedback R2 resistor, in Ohms.

◆ kVppDivider

constexpr float kVppDivider = (kVppFbR1 + kVppFbR2) / kVppFbR2
constexpr

VPP/VC : Voltage Converter Feedback Divisor, from 0.0 to 1.0.

◆ kVppVoutTolerance

constexpr float kVppVoutTolerance = VddConfig::kDc2DcVoutToleranceDefault
constexpr

VPP/VC : Output Voltage Tolerance, in percent.

◆ kVppCtrlPin

constexpr uint kVppCtrlPin = 28
constexpr

VPP/CTRL : Assigned Voltage Control GPIO pin.

◆ kVppVcSinPin

constexpr uint kVppVcSinPin = 12
constexpr

VPP/CTRL : Assigned Voltage Control, Shift Register SIN, GPIO pin.

◆ kVppVcClkPin

constexpr uint kVppVcClkPin = 14
constexpr

VPP/CTRL : Assigned Voltage Control, Shift Register CLK, GPIO pin.

◆ kVppVcClrPin

constexpr uint kVppVcClrPin = 15
constexpr

VPP/CTRL : Assigned Voltage Control, Shift Register CLR, GPIO pin.

◆ kVppVcRckPin

constexpr uint kVppVcRckPin = 13
constexpr

VPP/CTRL : Assigned Voltage Control, Shift Register RCK, GPIO pin.

◆ kVppOnA18VcRegisterBit

constexpr uint8_t kVppOnA18VcRegisterBit = 0
constexpr

VPP/CTRL : VC Shift Register, VPP on A18 bit.

◆ kVppOnA9VcRegisterBit

constexpr uint8_t kVppOnA9VcRegisterBit = 1
constexpr

VPP/CTRL : VC Shift Register, VPP on A9 bit.

◆ kVppOnCEVcRegisterBit

constexpr uint8_t kVppOnCEVcRegisterBit = 2
constexpr

VPP/CTRL : VC Shift Register, VPP on CE bit.

◆ kVppOnOEVcRegisterBit

constexpr uint8_t kVppOnOEVcRegisterBit = 3
constexpr

VPP/CTRL : VC Shift Register, VPP on OE bit.

◆ kVppOnWEVcRegisterBit

constexpr uint8_t kVppOnWEVcRegisterBit = 4
constexpr

VPP/CTRL : VC Shift Register, VPP on WE bit.

◆ kVppInitial

constexpr float kVppInitial = 12.0f
constexpr

VPP/GEN : VPP Initial value, in Volts.

◆ kVddInitial

constexpr float kVddInitial = 5.0f
constexpr

VDD/GEN : VDD Initial value, in Volts.

◆ kBusCEPin

constexpr uint kBusCEPin = 11
constexpr

BUS/CTRL : Assigned CE GPIO pin.

◆ kBusOEPin

constexpr uint kBusOEPin = 9
constexpr

BUS/CTRL : Assigned OE GPIO pin.

◆ kBusWEPin

constexpr uint kBusWEPin = 10
constexpr

BUS/CTRL : Assigned WE GPIO pin.

◆ kBusDataSinPin

constexpr uint kBusDataSinPin = 4
constexpr

BUS/Data : Assigned Data Bus, Shift Register SIN, GPIO pin.

◆ kBusDataClkPin

constexpr uint kBusDataClkPin = 6
constexpr

BUS/Data : Assigned Data Bus, Shift Register CLK, GPIO pin.

◆ kBusDataClrPin

constexpr uint kBusDataClrPin = 7
constexpr

BUS/Data : Assigned Data Bus, Shift Register CLR, GPIO pin.

◆ kBusDataRckPin

constexpr uint kBusDataRckPin = 5
constexpr

BUS/Data : Assigned Data Bus, Shift Register RCK, GPIO pin.

◆ kBusDataSoutPin

constexpr uint kBusDataSoutPin = 8
constexpr

BUS/Data : Assigned Data Bus, Shift Register SOUT, GPIO pin.

◆ kBusAddrSinPin

constexpr uint kBusAddrSinPin = 0
constexpr

BUS/Address : Assigned Address Bus, Shift Register SIN, GPIO pin.

◆ kBusAddrClkPin

constexpr uint kBusAddrClkPin = 2
constexpr

BUS/Address : Assigned Address Bus, Shift Register CLK, GPIO pin.

◆ kBusAddrClrPin

constexpr uint kBusAddrClrPin = 3
constexpr

BUS/Address : Assigned Address Bus, Shift Register CLR, GPIO pin.

◆ kBusAddrRckPin

constexpr uint kBusAddrRckPin = 1
constexpr

BUS/Address : Assigned Address Bus, Shift Register RCK, GPIO pin.

◆ kCommTimeOut

constexpr uint32_t kCommTimeOut = 50
constexpr

COMM : Communication timeout, in milliseconds.

◆ kStabilizationTime

constexpr uint32_t kStabilizationTime = 200
constexpr

GENERAL : Time for stabilization, in milliseconds.