Ameba Mini with GC4653 camera sensor

Hi,

We designed camera sensor board with GC4653 and SoC board with RTL8735BDM module. We modified the FreeRTOS SDK configuration to test mmf2 video example with below changes.

In sensor.h file inside the project folder

#define USE_SENSOR          SENSOR_GC4653

We compiled the code with cmake option DVIDEO_EXAMPLE=on to enable mmf2 video examples and got flash_ntz.bin successfully. We flashed the the bin file to the board and the output is not as expected. We see camera sensor initialization failure in log messages. Below is the log.

== Rtl8735b IoT Platform ==

[Normal mode]
BootFromNORFlash
[Start Boot ROM…]
=== Load PARTBL ===
=== Load Done ===
=== Load ISP_IQ ===
[fcs chk pass]
ISP_IQ @ 0x8461080, 0x26f80, 0x1
mfcs_data version 0x00010001
fcs_data version 0x00015300
=== Process ISP_IQ ===
=== Load Done ===
=== Load BL ===
[Image Start Table @ 0x18200]
=== Load Done ===

== Boot Loader ==
May 29 2025:17:09:27
=== Load FCS Para ===
=== Load Done ===
[crc pass]
=== Load ISP_IQ Sensor ===
ISP_IQ @ 0x8461080, 0x26f80
=== Process ISP_IQ ===
=== Load Done ===
=== Load FW1 ===
FW_ISP_IQ @ 0x8061080, 0x28f80
=== Process FW_ISP_IQ ===
DRAM_TYPE is DDR2 128MB.
ddr_freq = 533
VOE flash @ 0x808a080, 0x81f80
FCS KM_status 0x00002081 err 0x00001105
Wait KM fcs done 0 us
FCS TM_status 0x003f0000
dark mode 0 adc final value 0 sample 1 mode 0
fcs final3

RAM TM_STATUS 0x00bf1208 err 0x00001208
read fcs_status 0x000000bf
read fcs_staf

[Image Start Table @ 0x20106200]
RAM Load @ 0x810c100->0x20106200, 0x6ae0
DDR Load @ 0x8113080->0x70100000, 0x1fa9fe
=== FW Load Done ===

Boot Loader <==

== RAM Start ==
Build @ 12:46:27, Nov 21 2025

$8735b>
=== AmebaPro2 Video Example ===
interface 0 is initialized
interface 1 is initialized
interface 2 is initialized
cfg_size_lib = 120, cfg_size_user = 120

Initializing WIFI …[Driver]: [HALMAC]
11692M HALMAC_MAJOR_VER = 1
HALMAC_PROTOTYPE_VER = 4
HALMAC_MINOR_VER = 20
HALMAC_PATCH_VER =
[Driver]: The driver include MP
[Driver]: Ver = libwlan:2025.08.05.16.57_b9.6_137839330df2163e673789661f48d15e13
RFE type = 0
start_addr=(0x4000), end_addr=(0x8000), buffer_size=(0x4000), smp_number_max=(2)

WIFI initialized
-----------read wifi fast connect profile from flash-----------
[Driver]: PSCAN_FAST_SURVEY channel: 149

[Driver]: set ssid [JioFiber-rdGAu_5G]
--------example wifi common init called-------
[Driver]: rtw_joinbss_cmd MGMT_FRAME_PROTECTION_OPTIONAL no pmf.
[Driver]: OnBeacon rtw_get_sec_ie (ielen: 307, rsn_len: 0, wpa_len: 0), channel9

[Driver]: start auth to b4:a7:c6:58:3a:1f

[Driver]: auth success, start assoc
[Driver]: listen_interval: 10, bcn_interval: 100

[Driver]: association success(res=8)

[Driver]: set pairwise key to hw: alg:4(WEP40-1 WEP104-5 TKIP-2 AES-4)

[Driver]: set group key to hw: alg:4(WEP40-1 WEP104-5 TKIP-2 AES-4) keyid:2
(0) Scan: 1, Auth: 1, Assoc: 1, 4way: 1, connect: 1, reason: 0

Interface 0 IP address : 192.168.29.64
-----------write wifi fast connect profile to flash-----------
[LwIP_DHCP] dhcp offered_t0_lease: 86400
init_thread(60), Available heap 0x6918800

---------rmmf2_video_example_v1_init------
[video_voe_presetting] fps:24 w:2560 h:1440

voe heap size = 32396544
fwin(1),enc_en(0),IQ_OFFSET = 0x17b60
fwin(1),enc_en(0),SENSOR_OFFSET = 0x27ac0
sensor id 1 iq_data 17b60 sensor_data 27ac0

RTSP[0] port: 554
hal_voe_ready 0x0 0xbf1208
connect successful sta mode

read fcs_status 0x000000bf
[video_init] uvcd iq is null, use default.
[video_init] uvcd SNR is null, use default.
IQ:FW size (65376)
sensor:date 2024/9/12 version:RTL8735B_VOE_1.5.7.0
sensor:FW size (3828)
sensor timestamp: 2024/09/12
iq timestamp: 2024/03/21 11:26:35
voe_heap malloc 0x706f7660, size 32396544
ISP:1 ENC:1 H265:1 NN:1
hal_voe_ready 0x0 0xbf1208
voe :RTL8735B_VOE_1.6.4.0
sensor:RTL8735B_VOE_1.5.7.0
hal :RTL8735B_VOE_1.6.4.0
load time sensor:115us iq:1893us itcm:0us dtcm:0us ddr:0us ddr2:0us
Set H264 default HIGH profile
rc_version RC_v1
[video_pre_init_procedure] START
hal_voe_send2voe too long 150588 cmd 0x00000206 p1 0x00000000 p2 0x00000000
VOE command 0x206 fail ret 0xff
VOE_OPEN_CMD command fail 98400400
hal_video_open fail ret=98400400, group=3
hal_voe_ready 0x0 0x1718

[VID Err]Please check sensor id first,the id is 1
[Driver]: TSFValue = 63519641697, tsf = 0, shift_set= 0x8000, bcn int = 100

The GC4653 sensor has I2C_ID_SEL pin which decides I2C Address. Below are the possible addresses as mentioned in GC4653 usermanual.

image

On our sensor board, we made it as LOW(0), so the I2C address will be 0x52.

In Ameba FreeRTOS SDK, how to provide camera sensor I2C address? And current GC4653 driver uses which address by default?

Please provide suggestions to fix the issue.

Thanks,

Yugandhar

Hi, could you help to double check 2 points?

  • at sensor.h, line 161 to 177, make use the sen_id and manual_iq have GC4653
  • clean build, delete the “build“ folder and compile again after the sensor.h edit.

Hi @M-ichae-l ,

We did clean build many times with correct values, still same result.

We also tried as below, but same result.

#define SENSOR_MAX         2


static const unsigned char sen_id[SENSOR_MAX] = {

SENSOR_DUMMY,

SENSOR_GC4653

};


#define USE_SENSOR          SENSOR_GC4653


static const      char manual_iq[SENSOR_MAX][64] = {

"iq",

"iq_gc4653"

};

Thanks,

Yugandhar

Hi @yugandhar

Do you have the pinout for the GC4653 that you purchased?

To verify whether the GC4653 camera module’s pinout matches the AMB82-Mini pinout. You may refer to the documentation here:

You can also find some sensor’s guides here:

Hi @Pammy

We designed our own Circuit as per realtek guidelines, I am sending you Schematics in message for your review.

Reagrds,

Amit Jain

Hi @Amit_Jain

Thanks for sharing. I will get back to you again in message after reviewing.

1 Like

For I2C address, you can download rtl8735_driver_code_voe1610 to study how the I2C address is handled.

Navigate to sensor_gc4653_mipi.c in “\rtl8735_driver_code_voe1610\source\sensor\gc\gc4653”, you can see that the i2C address is 0x29

1 Like

Hi @Pammy ,

In hardware we set pin to low i.e, 0X29

Device is still not working, Any other way to test?

Regards,

Amit Jain

Hi @Pammy ,

We captured PWDN, RESETB and MCLK pins with LogicPort and below is the result.

Below is the GC4653’s power on sequence from sensort datasheet.

We found difference in the captured signals when compared with expected result. The PWDN and RESETB should be high with MCLK running for normal operation, but RESETB is always low and MCLK is appearing when PWDN is low.

We captured same signals without connecting sensor to SoC also, and we are getting same result, the sensor driver is not driving the signals as expected. How to fix this issue? As mentioned in GC4653 datasheet, if PWDN and RESETB are not high, the sensor won’t respond to I2C commands.

Can you please look into the GC4653 driver source code for VOE version 1.6.4.0?

Thanks,

Yugandhar

Hi @Amit_Jain @yugandhar ,

I have looked at the datasheet provided and it is identical to the one we had used for our GC4653 driver. The original driver in our SDK and the one that you can build using our rtl8735_driver_code_voe1610 source code have worked with the GC4653 we have on hand. While we are trying to figure out how to replicate your results, could you please give this firmware a try?

flash_ntz.zip (1.7 MB)

Please do provide us with the output log if it still does not work.

Hi @yenhuei ,

It is not working with the binary file provided by you also. Below is the output log.

== Rtl8735b IoT Platform ==

[Normal mode]
BootFromNORFlash
[Start Boot ROM…]
=== Load PARTBL ===
=== Load Done ===
=== Load ISP_IQ ===
[fcs chk pass]
ISP_IQ @ 0x8461080, 0xa7f80, 0x2
mfcs_data version 0x00010001
fcs_data version 0x00015300
=== Process ISP_IQ ===
=== Load Done ===
=== Load BL ===
[Image Start Table @ 0x18200]
=== Load Done ===

== Boot Loader ==
May 29 2025:17:09:27
=== Load FCS Para ===
=== Load Done ===
[crc pass]
=== Load ISP_IQ Sensor ===
ISP_IQ @ 0x8461080, 0xa7f80
=== Process ISP_IQ ===
=== Load Done ===
=== Load FW1 ===
FW_ISP_IQ @ 0x8061080, 0xa9f80
=== Process FW_ISP_IQ ===
DRAM_TYPE is DDR2 128MB.
ddr_freq = 533
VOE flash @ 0x810b080, 0x81f80
FCS KM_status 0x00002081 err 0x00001105
Wait KM fcs done 0 us
FCS TM_status 0x003f0000
dark mode 0 adc final value 0 sample 1 mode 0
fcs final3

s

RAM TM_STATUS 0x00bf1208 err 0x00001208
read fcs_status 0x000000bf
read fcs_staf

[Image Start Table @ 0x20106200]
RAM Load @ 0x818d100->0x20106200, 0x6ac0
DDR Load @ 0x8194080->0x70100000, 0x1f911e
=== FW Load Done ===

Boot Loader <==

== RAM Start ==
Build @ 09:51:51, Dec 2 2025

$8735b>interface 0 is initialized
interface 1 is initialized
cfg_size_lib = 120, cfg_size_user = 120

Initializing WIFI …[Driver]: [HALMAC]
11692M HALMAC_MAJOR_VER = 1
HALMAC_PROTOTYPE_VER = 4
HALMAC_MINOR_VER = 20
HALMAC_PATCH_VER =
[Driver]: The driver include MP
[Driver]: Ver = libwlan:2025.10.29.12.26_b9.6_e75a3a6efc80012a446602dec3fb0dddca
RFE type = 0
start_addr=(0x4000), end_addr=(0x8000), buffer_size=(0x4000), smp_number_max=(2)

WIFI initialized
[Driver]: PSCAN_FAST_SURVEY channel: 149

[Driver]: set ssid [JioFiber-rdGAu_5G]
[Driver]: rtw_joinbss_cmd MGMT_FRAME_PROTECTION_OPTIONAL no pmf.
[Driver]: Bcn (ie: 308, rsn: 0, wpa: 0) ch: 149, seq: 3179, ts: 455894630493

[Driver]: start auth to b4:a7:c6:58:3a:1f

[Driver]: auth success, start assoc
[Driver]: listen_interval: 10, bcn_interval: 100

[Driver]: association success(res=13)

[Driver]: set pairwise key to hw: alg:4(WEP40-1 WEP104-5 TKIP-2 AES-4)

[Driver]: set group key to hw: alg:4(WEP40-1 WEP104-5 TKIP-2 AES-4) keyid:1
(0) Scan: 1, Auth: 1, Assoc: 1, 4way: 1, connect: 1, reason: 0

Interface 0 IP address : 192.168.29.63
[LwIP_DHCP] dhcp offered_t0_lease: 82800
init_thread(59), Available heap 0x691aca0
[video_voe_presetting] fps:24 w:2560 h:1440

voe heap size = 32396544
fwin(1),enc_en(0),IQ_OFFSET = 0x2b640
fwin(1),enc_en(0),SENSOR_OFFSET = 0x3b5a0
sensor id 2 iq_data 2b640 sensor_data 3b5a0

RTSP[0] port: 554
hal_voe_ready 0x0 0xbf1208
connect successful sta mode

read fcs_status 0x000000bf
[video_init] uvcd iq is null, use default.
[video_init] uvcd SNR is null, use default.
IQ:FW size (65376)
sensor:date 2025/12/2 version:RTL8735B_VOE_1.6.1.0
sensor:FW size (3828)
sensor timestamp: 2025/12/02
iq timestamp: 2024/03/21 11:26:35
voe_heap malloc 0x706f55e0, size 32396544
ISP:1 ENC:1 H265:1 NN:1
hal_voe_ready 0x0 0xbf1208
voe :RTL8735B_VOE_1.6.7.0
sensor:RTL8735B_VOE_1.6.1.0
hal :RTL8735B_VOE_1.6.7.0
load time sensor:107us iq:1802us itcm:0us dtcm:0us ddr:0us ddr2:0us
Set H264 default HIGH profile
rc_version RC_v1
[video_pre_init_procedure] START
[VOE]ext_in = 0 sync = 0
[VOE][Ini set0]init dn 0 hdr 0 mirrorflip 0xf0
[VOE]g_init_fps: 24
[VOE]md init success
[VOE]algo ver 652a6fc
[VOE]pack_v 0x0000 0x0002 cus_v 37 iq_id 0 dn 0 day 0 night 1 other 2 offset 22
[VOE]Ver 0x0001000c Fast3A Cnt AE 2 AWB 1 period AE 2 AWB 1 delay 1 2
[VOE]hdr_mode 0 sensor driver num 1
[VOE]fps max 30.000000 min 0.702741
[VOE]exposure_step 22.222221
[VOE]change sensor mode => 2560x1440@30.000000fps - ‘linear’
[VOE]min_fps 0.702741, max_fps 30.000000, exp_step 22.222221 dyn_fps 24.000000
[VOE]md ver 0x6d640100
[VOE]ae ver 0x61650200
[VOE]awb ver 0x77620100
[VOE]short exp mode is not implemented by this sensor.
[VOE]cur_hdr_mode = 0
[VOE]VOE MEM Size = 31637 Used= 5935 KB Free=25701 KB (26318336)
[VOE]stream 0 buffer 0: 0x70cc1500 size 5529600
[VOE]stream 0 buffer 1: 0x71207600 size 5529600
[VOE]first_config_osd2_block_num[0]: 1
[VOE]osd2_block_num[0]: 24
[VOE][Ini set] gray mode off
[VOE][Ini set] mirrorflip 0xf0
[VOE][Ini set] BRIGHTNESS 0
[VOE][Ini set] SATURATION 50
[VOE][Ini set] CONTRAST 50
[VOE][Ini set] FLICKER 1
[VOE][Ini set] WDR_MODE 2
[VOE][Ini set] WDR_LEVEL 50
[VOE]NV12 2560x1440 1/24
[VOE]dynamic set fps 0 → 24 ok
[VOE]short exp mode is not implemented by this sensor.
[VOE]sensor power on
[VOE]0
[VOE]i2c tx abrt source: 1
[VOE]i2c txflr: 2
[VOE][sensor_start][991]Errsensor_start check sensor id err
[VOE]sensor power off
[VOE][sensor_start][1083]Errstart sensor fail -1740635136
[VOE][isp_mod_execute][306]Errmodule sensor execute 0x80044500 fail -1740635136
[VOE][mod_control_start_isp][118]Errfail to start isp pipeline → -1740635136
[VOE][isp_mod_do_action][400]Errmodule control do action 0x80024500 fail -17406
[VOE][rtscam_isp_message_call][534]ErrISP:{rtscam_isp_message_call} message exed
[VOE][__rtscam_isp_set_fps][1744]Err__rtscam_isp_set_fps rtscam_isp_message_cal
[VOE][rtscam_zoom_enable_stream][627]Errrtscam_zoom_enable_stream zoom->isp->se
[VOE][rts_v4l2_streamon][578]Errv4l2 ioctl STREAMON fail, -1740635136
[VOE]start_stream stream on failed -1740635136
[VOE]voe_open isp_open_stream ch0 failed -1740635136
hal_voe_send2voe too long 338184 cmd 0x00000206 p1 0x00000000 p2 0x00000000
VOE command 0x206 fail ret 0xff
VOE_OPEN_CMD command fail 98400400
hal_video_open fail ret=98400400, group=3
hal_voe_ready 0x0 0x1718

[VID Err]Please check sensor id first,the id is 2
[Driver]: TSFValue = 455895654499, tsf = 0, shift_set= 0x8000, bcn int = 100