Registered a URL and setup a forum as the IPCam stuff really needed its own site vs my irregular blog posts about IPCam hacking at

Author Topic: How to switch IRCUT on hi3516?  (Read 2540 times)

  • No avatar
  • *
November 14, 2015, 04:27:35 am
I have a Hi3516 module with IMX122 sensor. I have serial and telnet access to the board, and have been happily coding my own web server for the camera. No trouble there. I can capture video, save it, stream it etc...

Where I'm stuck is I need to be able to read the ADC for the day/night sensor, and also set the IR CUT output to switch the IR filter.

How do I do this? Can I do it from the command line? Otherwise, what API do I call in the sdk?
This is my file...(if that helps)


#¹Ø±ÕUSB PHYµÄ×ܵçÔ´£º0x20050080 [12]bitÅäÖÃΪ0
#himm 0x20050080 0x000121a8

#¹Ø±ÕUSB PHYµÄÄ£ÄâµçÔ´£º0x20050084 [22]bitÅäÖÃΪ1
#himm 0x20050084 0x005d2188

#¹Ø±ÕNANDC£º0x200300D0 [1:0]ÅäÖÃΪ2'b01
himm 0x200300D0 0x5

himm 0x200f00c8  0x1
himm 0x200f00cc  0x1
himm 0x200f00d0  0x1
himm 0x200f00d4  0x1
himm 0x200f00d8  0x1
himm 0x200f00dc  0x1
himm 0x200f00e0  0x1
himm 0x200f00e4  0x1
himm 0x200f00e8  0x1
himm 0x200f00ec  0x1
himm 0x200f00f0  0x1
himm 0x200f00f4  0x1
himm 0x200f00f8  0x1
himm 0x200f00fc  0x1
himm 0x200f0100  0x1
himm 0x200f0104  0x1

himm 0x20030080 0x1

himm 0x200b0008 0x1

himm 0x20030038 0x2

himm 0x20070000 0x0

#IR ¹Ü½Å¸´ÓóÉgpio
himm 0x200f00c4 0x1

#UART2²»Ê¹ÄÜ£º0x200A0000 [9][8][0]bit¶¼ÅäÖÃΪ0
himm 0x200A0030 0x0

himm 0x200f0108 0x0
himm 0x200f010c 0x0

himm 0x200C0004 0x7F00
himm 0x200E0004 0x7F00

#spi0 ¹Ü½Å¸´ÓóÉgpio
himm 0x200f000c 0x0
himm 0x200f0010 0x0
himm 0x200f0014 0x0

#spi1 ¹Ü½Å¸´ÓóÉgpio
himm 0x200f0110 0x0
himm 0x200f0114 0x0
himm 0x200f0118 0x0
himm 0x200f011c 0x0

  • No avatar
  • *
November 21, 2015, 04:06:19 pm

I have obtained the source code for addressing and writing the GPIO which flips the IR/CUT, and tested that it works.


  • No avatar
  • *
November 20, 2016, 04:48:42 am
So how to switch the IR then? I have a camera based on hi3518 with the same script bundled in the firmware, however I'm still unable to figure out how to enable the IR leds from the shell.