GRIS (Gamma and Roentgen Irradiation of the Sun) is a scientific instrument for a spectroscopy of hard X-ray and gamma-ray of solar flares with the energy from 50 keV to 200 MeV and for registration of solar neutrons with energy above 30 MeV on board the service module "Zvezda" ("Star") of the Russian segment of the International Space Station. The main information on this experiment is provided in .
2. What is the Terrestial gamma-ray flashes?
Terrestrial gamma-ray flashes (TGFs) are high-energy photons originating from the Earth's atmosphere in association with thunderstorm activity. TGFs were serendipitously discovered by BATSE detectors aboard the Compton Gamma-Ray Observatory . TGFs have also been detected and further studied by the RHESSI , Fermi  satellites. Their emission extends up to 100 MeV and exhibits an e – e annihilation line. TGFs were utterly unexpected and as of now they are not fully understood. They are believed to be the product of particles acceleration inside thunderstorms. As they are produced in the Earth's atmosphere, they potentially have a tremendous impact on our understanding of thunderstorms and atmospheric electrodynamics in general.
BATSE  consisted of 8 NaI detectors (LAD) with energy range 20 keV 2 MeV. In Fermi project only GBM device have been used to identify TGFs. GBM has 12 NaI detectors with energy range 8 keV 1 MeV and 2 BGO scintillators with energy range 200 keV 40 MeV. In RHESSI are used nine Germanium detectors. Different logic schemes in RHESSI provides two energy ranges 3 keV 2.7 MeV and 30 keV 17 MeV (for TGF up to 20 MeV) . BATSE used a trigger scheme, with 3 search windows (64, 256 and 1024 ms), typical trigger regime for TGFs was 5.5σ above background (in the 64 ms window). Like BATSE, Fermi GBM has an onboard trigger algorithm and relative data time resolution is 2 ms. The RHESSI relative time resolution is 2 s for individual photon. These measurements shows that TGFs are a much more common and powerful phenomenon than previously assumed. Similar studies were made in our country too: on Chibis-M  and RELEC (Vernov)  missions, in AVS-F experiment . In all of this experiments were used single crystals NaI(Tl), CsI(Tl) or phoswich detectors. Figures 1-2 show examples of time profiles and energy spectra of TGF.
3. GRIS experiment modification
GRIS instrument consists of two units:
• an electronic unit, GRIS-BE, placed in a pressurized compartment of the "Zvezda" module, realizing functions of data acquisition, control and synchronization of instrument operation, information exchange with the unit GRIS-BD, preliminary processing, package, storage of scientific data and data transfer to the ISS service systems by means Ethernet channel;
• a detector unit (GRIS-BD) which will be mounted outside the "Zvezda" module on two-axis orientable platform. GRIS-BD includes a low energy spectrometer, based on CeBr scintillator, and a high energy spectrometer, based on CsI(Tl) scintillator and electronic subsystems for data acquisition, preprocessing and information exchange with the unit GRIS-BE .
In most of devices discussed above, inorganic scintillators CsI(Tl) and NaI(Tl) were used. Table 1 shows the main characteristics for most popular scintillators for cosmic devices.
As can be seen from the table 1, CeBr and LaBr (Ce) crystals have the minimum decay time. But CeBr crystal hasn't additional background from decay natural radioactive La isotope in LaBr (Ce) scintillator. The unique capabilities of the detector, based on the CeBr (very short decay time and excellent energy resolution) allow us to expand the range of problems solved in the GRIS experiment.
The functional scheme of the GRIS-BD in the part of data processing and acquisition from the low-energy detector is shown in Fig.3. Electronic part incudes the following main units:
• The commutator (switch) intended for control of information exchange, by the commands from GRIS-BE, between the GRIS-BE and all parts GRIS-BD. The switch is implemented on flash-based FPGA A3PE3000L (Microsemi Inc., USA). The FPGA resources are not fully used and these free resources were used to modification of GRIS-BD hardware.
• The controller GRIS-BD intended for acquisition of the service (status) data and control of internal electronic subsystems in GRIS-BD block .
• CeBr detector with stabilization unit with HVPS and Front-end electronics
• Special digital processing unit (SDPU) with 4 independent inputs for data processing, spectra and time profile accumulation. The functionality of SDPU based on continuous sampling of input signal by 12-bit ADC with discreteness of 10 ns and real time processing of samples sequence. SDPU is based on FPGA XC4VFX40 (XILINX Inc., USA), which contains two core PowerPC processor and programmable array of logic cells. After digital processing, SDPU generates information frames about the energy spectra and counting rates in various energy windows and transferred data to the GRIS-BD unit.
4. Functional scheme and operation of TGF unit
Functional diagram of the developed device is shown in Figure 4. All the basic functions of the “system-on-chip” implemented in the FPGA A3PE3000L, for storing program code external Flash-memory is used. As a basic processor in this system is used soft realization Intel 8051 processor with RISC organization (IP Core8051s). In this system we used the following peripherals: CoreSPI, CoreTimer (4 parts), CoreWatchdog, and RAM (10 KB). CoreSPI interface allowing high-speed synchronous serial data transfers and it is used for information interchange with commutator unit and supports full duplex operation with 8-32 bit serial data. CoreWatchdog is intended to Protect and Recover from Software Errors, including Upset faults. The CoreTimer modules are used to form time intervals for data accumulation and to write data to a specialized digital buffer ("write" signal), and to fix the cell number in the ring buffer at the moment of the appearance of trigger signal (“flash”). Two other timers are used for counting of individual photons pulses from special digital processing unit (in different energy ranges, which can be varied by commands). When the number of photon counts accumulated in the event timers exceeds the threshold number recorded in the threshold register, a trigger signal about a flash or a gamma-ray burst is generated. When switching to the flash registration mode, the results of accumulating data in timers for 960 intervals are consecutively written to the ring buffer, and the existing 64 stores in ring buffer are the "pre-history" of the event. The event data stored in the ring buffer register, together with the data of the time slot number in the second, in which the flash occurred, are transmitted to the commutator (switch) by the program.
It was developed the TGF unit for search of SGRB and TGF and registration their time profiles. TGF unit consists of two independent channels (with individually controlled energy windows). Each device has 1024x8 bits buffer RAM (including 64 channels - pre-history). The wide of time window per 1 channel can varied by commands from 25 μs to 1 ms. The event selection threshold is fixed, command-variable. This unit allows us to expand the scientific tasks for GRIS experiment - search and registration of SGRB and TGF with a high temporal resolution.