Driver for the DSMIF peripheral on RZ microprocessor. This module implements the ADC Interface.
Filter received clock inversion function.
This module can be added to the Stacks tab via New Stack > Analog > ADC Driver (r_dsmif).
Configuration | Options | Default | Description |
General > Name | Name must be a valid C symbol | g_dsmif0 | Module name. |
General > Unit | Value must be an integer greater than or equal to 0 | 0 | DSMIF Unit No. |
General > [DEPRECATED]Mode |
-
Synchronization
-
Individual
| Synchronization | DSMIF operation mode definitions. |
Extra > Channel Synchronization > Counter Reset > Division counter initialization trigger |
-
No Trigger
-
Trigger 0
-
Trigger 1
-
Trigger 2
| No Trigger | Current measurement filter initialization trigger. |
Extra > Channel Synchronization > Counter Reset > Edge |
-
Negative Edge
-
Positive Edge
| Negative Edge | Current measurement filter initialization trigger for division counter for decimation edge. |
Extra > Channel Synchronization > Capture Trigger A |
-
No Trigger
-
Trigger 0
-
Trigger 1
-
Trigger 2
-
Trigger 3
-
Trigger 4
-
Trigger 5
| No Trigger | Current capture trigger A selection. |
Extra > Channel Synchronization > Capture Trigger B |
-
No Trigger
-
Trigger 0
-
Trigger 1
-
Trigger 2
-
Trigger 3
-
Trigger 4
-
Trigger 5
| No Trigger | Current capture trigger B selection. |
Extra > Overcurrent Sum Error > Upper Limit > Detection |
| Invalid | Overcurrent sum error upper limit detection enable. |
Extra > Overcurrent Sum Error > Upper Limit > Limit Value | Overcurrent Sum Error Detect High Threshold between 0x00000 and 0x3FFFF | 0x00000 | Overcurrent Sum Error Detect High Threshold. |
Extra > Overcurrent Sum Error > Lower Limit > Detection |
| Invalid | Overcurrent sum error lower limit detection enable. |
Extra > Overcurrent Sum Error > Lower Limit > Limit Value | Overcurrent Sum Error Detect Low Threshold between 0x00000 and 0x3FFFF | 0x00000 | Overcurrent Sum Error Detect Low Threshold. |
Extra > Overcurrent Sum Error > Interrupts > Callback | Name must be a valid C symbol | NULL | A user callback function. If this callback function is provided, it is called from the interrupt service routine (ISR) each time the overcurrent sum error. |
Extra > Overcurrent Sum Error > Interrupts > Interrupt Priority | MCU Specific Options | | Select the overcurrent sum error interrupt priority. |
Extra > Overcurrent Sum Error > Interrupts > Upper Limit Interrupt |
| Disabled | Overcurrent sum error upper limit detection interrupt enable. |
Extra > Overcurrent Sum Error > Interrupts > Lower Limit Interrupt |
| Disabled | Overcurrent sum error lower limit detection interrupt enable. |
Extra > Overcurrent Sum Error > Mode |
-
CH0, CH1, CH2
-
CH0, CH1
-
CH0
-
CH1
-
CH2
| CH0, CH1, CH2 | Overcurrent sum error detect mode setting. |
Extra > Data Format Select |
-
Left justified
-
Right justified
| Left justified | Data shift setting when setting the Sinc filter output to the DSCDRCHn register. |
ELC > DSMIF CAP_TRG0 event > Trigger Source | MCU Specific Options | | ELC_SSEL settings. |
ELC > DSMIF CAP_TRG1 event > Trigger Source | MCU Specific Options | | ELC_SSEL settings. |
ELC > DSMIF CAP_TRG2 event > Trigger Source | MCU Specific Options | | ELC_SSEL settings. |
ELC > DSMIF CAP_TRG3 event > Trigger Source | MCU Specific Options | | ELC_SSEL settings. |
ELC > DSMIF CAP_TRG4 event > Trigger Source | MCU Specific Options | | ELC_SSEL settings. |
ELC > DSMIF CAP_TRG5 event > Trigger Source | MCU Specific Options | | ELC_SSEL settings. |
ELC > DSMIF CDCNT_INT_TRG0 > Trigger Source | MCU Specific Options | | ELC_SSEL settings. |
ELC > DSMIF CDCNT_INT_TRG1 > Trigger Source | MCU Specific Options | | ELC_SSEL settings. |
ELC > DSMIF CDCNT_INT_TRG2 > Trigger Source | MCU Specific Options | | ELC_SSEL settings. |
Unique No | Numbers only | 0 | A unique number that manages multiple instances. |
Configuration | Options | Default | Description |
A/D Convert(Current Measurement) > Clock > Clock Mode |
| Slave | A/D conversion clock master/slave switching. |
A/D Convert(Current Measurement) > Clock > Clock(clock master mode) | MCU Specific Options | | This setting needs the PCLKH setting that can be set on the Clocks tab. A/D conversion clock division ratio. |
A/D Convert(Current Measurement) > Sinc Filter > Filter Order |
-
Filter Order 3rd
-
Filter Order 1st
-
Filter Order 2nd
| Filter Order 3rd | Current measurement filter order setting. |
A/D Convert(Current Measurement) > Sinc Filter > Decimation Ratio | MCU Specific Options | | Decimation ratio selection for current measurement. |
A/D Convert(Current Measurement) > Interrupts > Capture |
| Disabled | Current data register update interrupt enable. |
A/D Convert(Current Measurement) > Capture Edge |
-
Negative Edge
-
Positive Edge
| Negative Edge | Sampling edge selection. |
Extra > Overcurrent > Sinc Filter > Filter Order |
-
Filter Order 3rd
-
Filter Order 1st
-
Filter Order 2nd
| Filter Order 3rd | Overcurrent detection filter order setting. |
Extra > Overcurrent > Sinc Filter > Decimation Ratio | MCU Specific Options | | Decimation ratio selection for overcurrent detectiont. |
Extra > Overcurrent > Detection 0 > Upper Limit > Detection |
| Disabled | Overcurrent upper limit exceeded detection enable. |
Extra > Overcurrent > Detection 0 > Upper Limit > Limit Value | Overcurrent detection upper limit between 0x0 and 0xFFFF | 0x0 | Overcurrent detection upper limit. |
Extra > Overcurrent > Detection 0 > Lower Limit > Detection |
| Disabled | Overcurrent lower limit detection enable. |
Extra > Overcurrent > Detection 0 > Lower Limit > Limit Value | Overcurrent detection lower limit between 0x0 and 0xFFFF | 0x0 | Overcurrent detection lower limit. |
Extra > Overcurrent > Detection 0 > Interrupts > Upper Limit Interrupt |
| Disabled | Overcurrent upper limit exceeded output interrupt enable. |
Extra > Overcurrent > Detection 0 > Interrupts > Lower Limit Interrupt |
| Disabled | Overcurrent lower limit detection interrupt enable. |
Extra > Overcurrent > Detection 1 > Upper Limit > Detection |
| Disabled | Overcurrent upper limit exceeded detection enable. |
Extra > Overcurrent > Detection 1 > Upper Limit > Limit Value | Overcurrent detection upper limit between 0x0 and 0xFFFF | 0x0 | Overcurrent detection upper limit. |
Extra > Overcurrent > Detection 1 > Lower Limit > Detection |
| Disabled | Overcurrent lower limit detection enable. |
Extra > Overcurrent > Detection 1 > Lower Limit > Limit Value | Overcurrent detection lower limit between 0x0 and 0xFFFF | 0x0 | Overcurrent detection lower limit. |
Extra > Overcurrent > Detection 1 > Interrupts > Upper Limit Interrupt |
| Disabled | Overcurrent upper limit exceeded output interrupt enable. |
Extra > Overcurrent > Detection 1 > Interrupts > Lower Limit Interrupt |
| Disabled | Overcurrent lower limit detection interrupt enable. |
Extra > Overcurrent > Detection 2 > Upper Limit > Detection |
| Disabled | Overcurrent upper limit exceeded detection enable. |
Extra > Overcurrent > Detection 2 > Upper Limit > Limit Value | Overcurrent detection upper limit between 0x0 and 0xFFFF | 0x0 | Overcurrent detection upper limit. |
Extra > Overcurrent > Detection 2 > Lower Limit > Detection |
| Disabled | Overcurrent lower limit detection enable. |
Extra > Overcurrent > Detection 2 > Lower Limit > Limit Value | Overcurrent detection lower limit between 0x0 and 0xFFFF | 0x0 | Overcurrent detection lower limit. |
Extra > Overcurrent > Detection 2 > Interrupts > Upper Limit Interrupt |
| Disabled | Overcurrent upper limit exceeded output interrupt enable. |
Extra > Overcurrent > Detection 2 > Interrupts > Lower Limit Interrupt |
| Disabled | Overcurrent lower limit detection interrupt enable. |
Extra > Overcurrent > Window Notification > Notification 0 > Output Enable |
| Disabled | Overcurrent detection window notification 0 output enable. |
Extra > Overcurrent > Window Notification > Notification 0 > Function Enable |
| Disabled | Overcurrent detection window notification 0 function enable. |
Extra > Overcurrent > Window Notification > Notification 0 > Mode |
-
(overcurrent data < lower limit 0) or (overcurrent data > upper limit 0)
-
lower limit 0 <= overcurrent data <= upper limit 0
| (overcurrent data < lower limit 0) or (overcurrent data > upper limit 0) | Channel n overcurrent detection window notification 0 mode select. |
Extra > Overcurrent > Window Notification > Notification 1 > Output Enable |
| Disabled | Overcurrent detection window notification 1 output enable. |
Extra > Overcurrent > Window Notification > Notification 1 > Function Enable |
| Disabled | Overcurrent detection window notification 1 function enable. |
Extra > Overcurrent > Window Notification > Notification 1 > Mode |
-
(overcurrent data < lower limit 1) or (overcurrent data > upper limit 1)
-
lower limit 1 <= overcurrent data <= upper limit 1
| (overcurrent data < lower limit 1) or (overcurrent data > upper limit 1) | Channel n overcurrent detection window notification 1 mode select. |
Extra > Overcurrent > Window Notification > Notification 2 > Output Enable |
| Disabled | Overcurrent detection window notification 2 output enable. |
Extra > Overcurrent > Window Notification > Notification 2 > Function Enable |
| Disabled | Overcurrent detection window notification 2 function enable. |
Extra > Overcurrent > Window Notification > Notification 2 > Mode |
-
(overcurrent data < lower limit 2) or (overcurrent data > upper limit 2)
-
lower limit 2 <= overcurrent data <= upper limit 2
| (overcurrent data < lower limit 2) or (overcurrent data > upper limit 2) | Channel n overcurrent detection window notification 2 mode select. |
Extra > Overcurrent > Window Notification > Notification 3 > Output Enable |
| Disabled | Overcurrent detection window notification 3 output enable. |
Extra > Overcurrent > Window Notification > Notification 3 > Function Enable |
| Disabled | Overcurrent detection window notification 3 function enable. |
Extra > Overcurrent > Window Notification > Notification 3 > Mode | Refer to the RZT Configuration tool for available options. | Notification 0 | Channel n overcurrent detection window notification 3 mode select. |
Extra > Short Circuit > Interrupts > Interrupt |
| Disabled | Short circuit detection error interrupt enable. |
Extra > Short Circuit > Detection |
| Disabled | Short circuit detection enable. |
Extra > Short Circuit > High Count Threshold | Short circuit detection high continuous detection count between 0x0 and 0x1FFF | 0x0 | Short circuit detection high continuous detection count. |
Extra > Short Circuit > Low Count Threshold | Short circuit detection low continuous detection count between 0x0 and 0x1FFF | 0x0 | Short circuit detection low continuous detection count. |
Name | Manual Entry | g_dsmif_channel0 | Module name. |
The DSMIF clock is configurable on the clocks tab.
The relationship between the I / O pin and the DSMIF unit for RZ/T2M, RZ/T2ME and RZ/T2L is as follows.
The relationship between the I / O pin and the DSMIF unit for RZ/T2H is as follows.
In this document, the term "sampling" refers to the ability to sample data from the DSMIF clock and works as follows:
This is a basic example of minimal use of the DSMIF in an application.