To use the Stream Monitor Timer operations:
- Set Count value in timer register (CSI_RX_IF_VBUS2APB_STREAM0_TIMER -
CSI_RX_IF_VBUS2APB_STREAM3_TIMER). If set to 0 won’t count but interrupt
will still trigger every EOF or SOF.
- [24-0] COUNT -> define desired value
- Set the Virtual Channel to the one that is enabled, define timer_eof and set
enable in the monitor controll register
(CSI_RX_IF_VBUS2APB_STREAM0_MONITOR_CTRL -
CSI_RX_IF_VBUS2APB_STREAM3_MONITOR_CTRL).
- [15] FRAME_MON_EN -> set to ‘1’
- [14:11] FRAME_MON_VC -> define VC used
- [10] TIMER_EOF -> set to ‘1’ to count from EOF,
set to ‘0’ to count from SOF
- [9] TIMER_EN -> set to ‘1’
- [8:5] TIMER_VC -> define VC used
Software should now use the interrupts in register
CSI_RX_IF_VBUS2APB_MONITOR_IRQS. To be able to do that you will need to allow those
interrupts through the mask register CSI_RX_IF_VBUS2APB_MONITOR_IRQS_MASK_CFG.
- By default, the CSI_RX_IF_VBUS2APB_MONITOR_IRQS_MASK_CFG
register is set to all ‘0’, meaning all interrupts are disabled.
- [0] STREAM0_TIMER_IRQM -> set to ‘1’
- Create an interrupt handler to read from monitor_irqs.
- [0] STREAM0_TIMER_IRQ -> read, if ‘1’, timer
interrupt is triggered
To ensure correct functionality, it is highly recommended that the input device (i.e. camera) should be configured after the CSI_RX_IF has been configured and enabled.
Software must make sure all the Virtual Channel fields in the registers explained above are set to the correct VC being used by the stream.