AMB82 write to SD card

Hi,
I’m using the example as it is but unfortunately nothing written on SD
image, videos and audio knowing that i already make the SD FAT32

always have the below message in serial monitor:

[VID Wrn]
CH 0 MMF ENC Queue full
[VID Wrn]
CH 0 MMF ENC Queue full
.
.
.
.
[VID Wrn]
CH 0 MMF ENC Queue full

kindly your suport

Hi @khalil,

Can you share which example are you using and what SDK version are you using? Please share if you make any modifications to the code in the SDK version. May I also know if you are using the standard SDK or Arduino SDK?

Thank you.

Hi Kelvin

I’m using AMB82 in Arduino IDE 2.3.2, I installed Realtek Ameba boards 4.0.5
so I’m using the same example coming in Arduino without any change
Ameba Multimedia → RecodMP4 → Audio only, video only, single video with audio and double video with audio all example nothing written on SD

Hi @khalil,

Can you try to use Arduino SDK version 4.0.7 and above?

Thank you.

Dear Kelvin:

the updated SDK 4.0.5 last

regards

Hi, @khalil!

Make sure you update your board manager to get the latest version of the Arduino SDK.

The stable version is currently at 4.0.7 and the dev version is currently at 4.0.8.

Dear at_and_red:

thanks for your help,
I changed the board link to be as below:
https://github.com/ambiot/ambpro2_arduino/raw/main/Arduino_package/package_realtek_amebapro2_index.json

I install the latest SDK 4.0.7 and get the same thing, he save nothing on SD when choosing the video only example with same error as before, I’m using Samsung 64G Evo SD card

I just tested it right now with the VideoOnly.ino sketch, and it works.

Can you please dump your entire Serial Monitor output for one run here?

Dear at_and_red:

please check the below:
sdio_sd_card_combine again ret = 5

try 2 times

try 2 times but fail ret = 5,please check SD card

SD_Init 1

f_mount error here, please insert SD card or use f_mkfs to format SD card to FAT32The card is inited 1

FATFS mount logical drive on sd card fail.

SD_DeInit

mp4_muxer_close

[MODULE Err]fail------open[ERROR] MP4 Init failed
[ERROR] Output not initialized correctly!

[LINKER Err]mm siso: input or output not setStreamIO link start failed
Set H264 default HIGH profile
[video_pre_init_procedure] START

[VOE]ext_in = 0 sync = 0

[VOE][Ini set0]init dn 0 hdr 65535 mirrorflip 0xffff

[VOE]md init success

[VOE]algo ver 87e2381

[VOE]pack_v 0x0000 0x0002 cus_v 0 iq_id 0 dn 0 day 0 night 1 other 2 offset 224 length 16436 iq_size 32716

[VOE]Ver 0x0001000c Fast3A Cnt AE 1 AWB 1 period AE 5 AWB 1 delay 0 0

[VOE][isp_mod_sensor_init][1624]Errhdr_mode 0 is over sensor driver num 1

[VOE]hdr_mode 0 sensor driver num 1

[VOE]fps: 279825, pclk: 0, hts: 1077805056

[VOE]fps max 30.000000 min 5.000000

[VOE]exposure_step 29.629629

[VOE]change sensor mode => 1920x1080@30.000000fps - ‘linear’

[VOE]min_fps 5.000000, max_fps 30.000000, exp_step 29.629629

[VOE]md ver 0x6d640100

[VOE]ae ver 0x61650200

[VOE]awb ver 0x77620100

[VOE]cur_hdr_mode = 0

[VOE]VOE MEM Size = 21479 Used= 3552 KB Free=17926 KB (18356960)

[VOE]stream 0 buffer 0: 0x70521e00 size 3110400

[VOE]stream 0 buffer 1: 0x70819500 size 3110400

[VOE]first_config_osd2_block_num[0]: 1

[VOE]osd2_block_num[0]: 24

[VOE]NV12 1920x1080 1/30

[VOE]dynamic set fps 0 → 30 ok

[VOE]sensor power on
[VOE]zoom crop default setting

[VOE]status == 1718

[VOE]buffer size == (0x70b508a0) (4453504 259200) queue(549)

[VOE]Set rate control: bpsqp -1 qpRange I[25, 48] PB[25, 48] 2097152 bps pic 1 skip 0 hrd 0 cpbSize 1000000 bitrateWindow 30 intraQpDelta -5 fixedIntraQp 0

[VOE]Set PreP: input 1920x1080 : offset 0x0 : format 1 : rotation 0cc 0 : scaling 0 : scaling format 0

[VOE]vcenc_set_ref_pic_set() NULL
hal_voe_send2voe too long 168257 cmd 0x00000206 p1 0x00000000 p2 0x00000000

[ERROR] Need MP4 init first

  • Summary of Streaming -

[INFO] Channel: 0

[INFO] Encoder type: H264

[INFO] Resolution: VIDEO_FHD

[INFO] Video width: 1920

[INFO] Video height: 1080

[INFO] fps: 30

[INFO] bps: 4194304

  • MP4 Recording Information -

[INFO] Recording file name: TestRecordingVideoOnly

[INFO] Recording duration: 30 seconds

[INFO] File count: 1

[VID Wrn]

CH 0 MMF ENC Queue full

[VID Wrn]

CH 0 MMF ENC Queue full

[VID Wrn]

CH 0 MMF ENC Queue full

[VID Wrn]

CH 0 MMF ENC Queue full

[VID Wrn]

CH 0 MMF ENC Queue full

[VID Wrn]

CH 0 MMF ENC Queue full

[VID Wrn]

CH 0 MMF ENC Queue full

.
.
.
.
.
.
.
[VID Wrn]

CH 0 MMF ENC Queue full

This is where your problem starts at:

sdio_sd_card_combine again ret = 5

try 2 times

try 2 times but fail ret = 5,please check SD card

SD_Init 1

f_mount error here, please insert SD card or use f_mkfs to format SD card to FAT32The card is inited 1

FATFS mount logical drive on sd card fail.

That says that your SD card either wasn’t found or isn’t formatted correctly.

I know you said it’s FAT32, but double check just to be sure. Check that there’s nothing in the slot that might be blocking pins, and make sure that your SD card is inserted all the way (it’s a spring-loaded slot, so you should hear it click).

Dear at_and_red:

thanks for your support
its working now
formatted again as FAT32 :slightly_smiling_face:

I have another question if you can support
is it possible to write a txt fil on SD on ABM82 mini ? how to start

Regards

Hi @khalil,

You can refer to this guide to write text file onto the SD card in AMB82-Mini.

File System – Simple applications with SD card – Realtek IoT/Wi-Fi MCU Solutions

Thank you.

Hi Kelvin:

thanks :slight_smile:

I need to do like attendance system, make a text file include
the persons login and logout and send an email to microsoft 365

Another support request:

  • I want to include real time clock, do I need RTC to connect to AMB82-mini like DS3231?
  • I need to send email to microsoft 365, it’s accepting receiving like Gmail?

Thank you

Hi @khalil,

For the first one, you do not need to connect an external RTC if you are able to connect the AMB82-Mini to the internet using WiFi. You can take a look at our NTPClient example (NTP – Retrieve Universal Time (UTC) by NTPClient library – Realtek IoT/Wi-Fi MCU Solutions)

For the second question, you probably need to use some SMTP library to set up the sending of email. Right now, the Arduino SDK do not have this example yet. You can raise a feature request at our Arduino github repo (Issues · ambiot/ambpro2_arduino · GitHub), we will review if it is feasible to make such a feature.

Thank you.

Hi Kelvin:

thanks for your support
I will check

Thank you