VCLinux Library Documentation  3.13.0

Flash Outputs

+ Collaboration diagram for Flash Outputs:
I32 vc_proz_flash_set_current (I32 flashId, I32 reqCurrentmA, I32 limitDurationUs, I32 *setCurrentmA, I32 *maxDurationUs)
 Sets the Maximum Current Output for VC pro Z FLASH Outputs. More...
 
#define VCPROZ_FLASH_MAXCURR_MA   ( 1500)
 Maximum current configurable for flash output pins.
 
#define VCPROZ_FLASH_MINCURR_MA   ( 150)
 Minimum current configurable for flash output pins.
 
#define VCPROZ_FLASH01_MAXCURRSDY_MA   ( 500)
 For FLASH 0 and FLASH 1 output pins, current above this level will limit the flash duration to VCPROZ_FLASH01_DURTNLIMIT_US.
 

Detailed Description

Function Documentation

◆ vc_proz_flash_set_current()

I32 vc_proz_flash_set_current ( I32  flashId,
I32  reqCurrentmA,
I32  limitDurationUs,
I32 setCurrentmA,
I32 maxDurationUs 
)

This function sets the maximum current output for VC pro Z FLASH outputs. It also calculates the maximum flash duration according to the FLASH output number:

  • The external accessable FLASH 0 and FLASH 1 output deliver steady current, if the requested current is under the VCPROZ_FLASH01_MAXCURRSDY_MA level. If not, the maximum flash duration in a duty cycle is given by the value provided at the VCPROZ_FLASH01_DURTNLIMIT_US define.
  • The internal illumination ring lights of the VC pro Z limit the maximum flash duration in a duty cycle by their resistor value. They are connected to FLASH 2 and FLASH 3.

The duty cycle itself guarantees the proper cool down of the connected devices and cannot be turned off. It works the following way:

1 time interval flashing (may be smaller than the maximum flash duration) followed by 8 time intervals cool down phase.

If the current request understeps the minimum current of VCPROZ_FLASH_MINCURR_MA, the current will be set to 0, if the current request exceeds the maximum current of VCPROZ_FLASH_MAXCURR_MA, the function will return with an error.

Note
Due to the internal circuit, a current of about 1 mA will flow at any time for FLASH 2 and FLASH 3 (also if set to 0 mA).
Parameters
flashIdThe FLASH output to be configured (0-3).
reqCurrentmAThe current request in mA.
limitDurationUsAdditional flash duration limitation, no limitation is encoded by setting this value to -1.
setCurrentmAThe current really set based on request and limitations.
maxDurationUsThe maximum duration really usable based on request and limitations; note the information about the duty cycle.
Return values
0on Success.
ends with -1if reqCurrentmA exceeds allowed range.
ends with -2if resistor of the ledring cannot be read out.
ends with -3if the ledring limitations cannot be acheived.
ends with -4if there were errors processing the request.