I have my first Edge board and am trying to use the camera. The HM01B0 demo is stalling at the first read_pclk call in hm01b0_blocking_read_oneframe(). My compile/load output is below. I added printfs to main.c and HM01B0.c (attached). The terminal emulator fills up with lower case ‘p’ as shown in the code snip. I tried turning the camera connection over, and it acts exactly the same. It is now plugged in with the lens down, towards the battery holder. There is no battery - the board is running off the standard USB-serial board with the default jumper setting for 3v3. I am following instructions here:
https://learn.sparkfun.com/tutorials/us … o3-sdk/all
What could the problem be? Where would I start poking with a 'scope?
uint32_t hm01b0_blocking_read_oneframe(hm01b0_cfg_t *psCfg, uint8_t *pui8Buffer, uint32_t ui32BufferLen)
{
uint32_t ui32Err = HM01B0_ERR_OK;
uint32_t ui32Idx = 0x00;
am_util_stdio_printf("[%s] +\r\n", __func__);
uint32_t ui32HsyncCnt = 0x00;
while((ui32HsyncCnt < HM01B0_PIXEL_Y_NUM))
{
am_util_stdio_printf("%d:", ui32HsyncCnt);
while (0x00 == read_hsync())
{
am_util_stdio_printf(".");
}
am_util_stdio_printf(" hsync-done ");
// read one row
while(read_hsync())
{
am_util_stdio_printf("r");
int preps = 0;
while(0x00 == read_pclk())
{
if (0 == (preps++ & 0x00000FFF))
{
am_util_stdio_printf("p"); // <<<<< STUCK HERE
}
}
*(pui8Buffer + ui32Idx++) = read_byte();
am_util_stdio_printf("0x%02x ", *(pui8Buffer + ui32Idx - 1));
if (ui32Idx == ui32BufferLen) {
goto end;
}
while(read_pclk())
{
am_util_stdio_printf("P");
}
}
ui32HsyncCnt++;
}
end:
am_util_stdio_printf("[%s] - Byte Counts %d\r\n", __func__, ui32Idx);
return ui32Err;
}
Makefile:110: warning: you have not defined COM_PORT. Assuming it is COM4
Makefile:114: warning: you have not defined PYTHON3. assuming it is accessible by 'python3'
Makefile:118: defaulting to 115200 baud for ASB
Makefile:122: defaulting to 921600 baud for SVL
Makefile:127: warning: you have not defined SDKPATH so will continue assuming that the SDK root is at ../../../../..
Makefile:135: warning: you have not defined COMMONPATH so will continue assuming that the COMMON root is at ../../../../common
Makefile:143: warning: you have not defined BOARDPATH so will continue assuming that the BOARD root is at ../../..
Makefile:151: warning: you have not defined PROJECTPATH so will continue assuming that the PROJECT root is at ..
Cleaning...
Makefile:114: warning: you have not defined PYTHON3. assuming it is accessible by 'python3'
Makefile:122: defaulting to 921600 baud for SVL
Makefile:127: warning: you have not defined SDKPATH so will continue assuming that the SDK root is at ../../../../..
Makefile:135: warning: you have not defined COMMONPATH so will continue assuming that the COMMON root is at ../../../../common
Makefile:143: warning: you have not defined BOARDPATH so will continue assuming that the BOARD root is at ../../..
Makefile:151: warning: you have not defined PROJECTPATH so will continue assuming that the PROJECT root is at ..
Compiling gcc ../../../../common/examples/hm01b0_camera_uart/main.c
Compiling gcc ../../../../common/tools_sfe/templates/startup_gcc.c
Compiling gcc ../../../../common/third_party/hm01b0/HM01B0.c
Compiling gcc ../../../../../utils/am_util_stdio.c
Compiling gcc ../../../../../utils/am_util_delay.c
Linking gcc ../gcc/bin/hm01b0_camera_uart_asb.axf with script ../../../../common/tools_sfe/templates/asb_linker.ld
Copying gcc ../gcc/bin/hm01b0_camera_uart_asb.bin...
python3 ../../../../common/tools_sfe/asb/asb.py --bin ../gcc/bin/hm01b0_camera_uart_asb.bin --load-address-blob 0x20000 --magic-num 0xCB -o ../gcc/bin/hm01b0_camera_uart --version 0x0 --load-address-wired 0xC000 -i 6 --options 0x1 -b 921600 -port /dev/ttyS19 -r 2 -v
Header Size = 0x80
original app_size 0x5758 ( 22360 )
load_address 0xc000 ( 49152 )
app_size 0x5758 ( 22360 )
w0 = 0xcb0057d8
Security Value 0x10
w2 = 0x10008080
addrWord = 0xc000
versionKeyWord = 0x0
child0/feature = 0xffffffff
child1 = 0xffffffff
crc = 0xc02f5e1
Writing to file ../gcc/bin/hm01b0_camera_uart_OTA_blob.bin
testing: ../gcc/bin/hm01b0_camera_uart_OTA_blob.bin
Header Size = 0x60
app_size 0x57d8 ( 22488 )
Writing to file ../gcc/bin/hm01b0_camera_uart_Wired_OTA_blob.bin
Image from 0x0 to 0x57d8 will be loaded at 0x20000
Connecting over serial port /dev/ttyS19...
Sending Hello.
Received response for Hello
Bootloader connected
Received Status
length = 0x58
version = 0x5
Max Storage = 0x4ffa0
Status = 0x2
State = 0x7
AMInfo =
0x1
0xff2da3ff
0x55fff
0x1
0x4cd00005
0xffffffff
0xffffffff
0xffffffff
0xffffffff
0xffffffff
0xffffffff
0xffffffff
0xffffffff
0xffffffff
0xffffffff
0xffffffff
Sending OTA Descriptor = 0xfe000
Sending Update Command.
number of updates needed = 1
Sending block of size 0x5838 from 0x0 to 0x5838
Sending Data Packet of length 8180
Sending Data Packet of length 8180
Sending Data Packet of length 6224
Sending Reset Command.
Tries = 0
Upload complete!
HM01B0.zip (8.73 KB)