Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(Examples): Updated documentation of MAX78002 CSI2 example #861

Merged
merged 26 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
dbc204a
Replacing 2.4" TFT fonts with Liberation fonts
vicloginov Nov 6, 2023
7f06a76
Added copyright to fonts
vicloginov Nov 7, 2023
fd29398
Linter cleanup
vicloginov Nov 7, 2023
c91d245
Clang cleanup
vicloginov Nov 7, 2023
5ef5e7f
Add consolidated fonts
Jake-Carter Nov 7, 2023
f10e844
Include new fonts.mk from AI85, AI87 BSPs
Jake-Carter Nov 7, 2023
f13e07e
Update AI85, AI87 projects to use new fonts
Jake-Carter Nov 7, 2023
18020ec
Add copyrights
Jake-Carter Nov 7, 2023
ee1f89f
Restore faceid_evkit-riscv project, use new font
Jake-Carter Nov 8, 2023
40e8cc9
Restore kws20_demo-riscv project, use new fonts
Jake-Carter Nov 8, 2023
504c39f
Restore mnist-riscv project
Jake-Carter Nov 8, 2023
8c0c8d1
clang-format
Jake-Carter Nov 8, 2023
6223f68
cpplint
Jake-Carter Nov 8, 2023
34afbc4
clang-format
Jake-Carter Nov 8, 2023
cf2fe07
Update header guard
Jake-Carter Nov 8, 2023
c9cf568
clang-format
Jake-Carter Nov 8, 2023
6a04800
Update MAX32662, MAX32672, MAX32690 projects and BSPs to use new fonts
Jake-Carter Nov 8, 2023
8938634
clang-format
Jake-Carter Nov 8, 2023
4c7454d
Revert unintentional change to faceid_evkit default settings
Jake-Carter Nov 15, 2023
cc3598f
Merge branch 'main' of https://github.com/vicloginov/msdk
vicloginov Nov 18, 2023
969631b
Fixed bug in faceId RISC-V example
vicloginov Nov 22, 2023
db09e52
Merge branch 'main' of https://github.com/vicloginov/msdk
vicloginov Nov 22, 2023
45cab6f
Use TFT_ENABLE setting for all CNN examples
vicloginov Nov 22, 2023
6cc992b
Merge branch 'main' of https://github.com/vicloginov/msdk
vicloginov Jan 9, 2024
525f318
Updated documentation of CSI2 example
vicloginov Jan 9, 2024
35ea615
Added more details to README
vicloginov Jan 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 32 additions & 15 deletions Examples/MAX78002/CSI2/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Description

This example captures an image using the camera (e.g. OV5640) via MIPI CSI-2 Protocol and streams either to the on-board TFT display or to your PC through the COM port. Press PB0 to capture an image once the device is ready.
This example captures an image using the camera (e.g. OV5640) via MIPI CSI-2 Protocol, saves it into external SRAM and streams to your PC through the COM port. Press PB1 to capture an image once the device is ready.

Use the [utils/console.py](utils/console.py) script to grab the camera data and create a png image of the captured image. More information can be found in [utils/README.md](utils/README.md).
Use the [utils/console.py](utils/console.py) script to grab the camera data and create a PNG image of the captured image. More information can be found in [utils/README.md](utils/README.md).

## Software

Expand All @@ -22,38 +22,55 @@ $ python utils/console.py COM6
Started ImgCapture console and opened COM6
MCU: *SYNC*
MCU: Established communications with host!
MCU: Registered 3 total commands:
MCU: Registered 5 total commands:
MCU: -----
MCU: 'help' : Print this help string
MCU: 'reset' : Issue a soft reset to the host MCU.
MCU: 'capture' : Perform a standard blocking capture of a single image
MCU: 'set-reg' <register> <value> : Write a value to a camera register.
MCU: 'get-reg' <register> : Prints the value in a camera register.
MCU: -----
MCU:
MCU:
MCU: **** MIPI CSI-2 Example ****
MCU: This example streams the image data through the COM port
MCU: and a script running on the host pc converts the data into
MCU: a .png image. Note: You can not run the script and have
MCU: a serial terminal open running on the same COM port at the
MCU: the same time.
MCU: a .png image.
MCU:
MCU: Go into the pc_utility folder and run the script:
MCU: python grab_image.py [COM#] [baudrate]
MCU: python console.py [COM#]
MCU:
MCU: Press PB1 (SW4) to trigger a frame capture.
MCU: Press PB1 (SW4) or send the 'capture' command to trigger a frame capture.
MCU:
MCU: Initializing camera...
MCU: Camera ID = 5640
MCU: Initializing SRAM...
MCU: RAM ID:
MCU: MFID: 0x0d
MCU: KGD: 0x5d
MCU: Density: 0x02
MCU: EID: 0x588e670d
MCU: Capturing image...
MCU: Done! (took 73321 us)
MCU: Sending image over serial port...
MCU: *IMG* RGB565 153600 320 240
Collecting 153600 bytes...
$
```

## Required Connections

- Connect a USB cable between the PC and the CN2 (USB/PWR) connector.
- Install JP41 (CSI2 CAM I2C EN)
- Install JP40 (HW PWUP/SW PWUP)
- Connect CSI2 camera module to J8 (CSI CAMERA)
- Set JP38 to OFF position (DVP CAM PWR)
- Connect a USB cable between the PC and the CN2 (USB/UART) connector.
- Install jumper JP41 (CSI2 CAM I2C EN)
- Install jumper JP40 (HW PWUP/SW PWUP)
- Remove JP39 (SW CAM PWUP)
- Remove JP16 and JP17 (I2C1 SDA/I2C1 SL)
- This is required to ensure the I2C1 bus is pulled up properly for the CSI2 camera. Duplicate pull-ups result in unreliable camera communication.
- Connect the 5V power cable at (5V IN).
- Close jumper (RX - P0.0) and (TX - P0.1) at Headers JP23 (UART 0 EN).
- Install jumpers (RX - P0.0) and (TX - P0.1) at Header JP20 (UART 0 EN).
- Open an terminal application on the PC and connect to the EV kit's console UART t 115200, 8-N-1.
- Close jumper JP1 (LED1 EN).
- Close jumper JP2 (LED2 EN).
- Install jumper JP44 (LED0 EN).
- Install jumper JP45 (LED1 EN).
- Install jumper JP25 (PB1 PU).
- Connect the 5V power cable at (5V IN).
34 changes: 28 additions & 6 deletions Examples/MAX78002/CSI2/utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,39 @@ pip install -r requirements.txt
Started ImgCapture console and opened COM8
MCU: *SYNC*
MCU: Established communications with host!
MCU: Registered 7 total commands:
MCU: Registered 5 total commands:
MCU: -----
MCU: 'help' : Print this help string
MCU: 'reset' : Issue a soft reset to the host MCU.
MCU: 'capture' : Perform a standard blocking capture of a single image
MCU: 'set-reg' <register> <value> : Write a value to a camera register.
MCU: 'get-reg' <register> : Prints the value in a camera register.
MCU: -----
MCU: Initializing DMA
MCU: Initializing camera
MCU: Camera I2C slave address: 3c
MCU: Camera ID detected: 7fa2
MCU: Ready!
MCU:
MCU:
MCU: **** MIPI CSI-2 Example ****
MCU: This example streams the image data through the COM port
MCU: and a script running on the host pc converts the data into
MCU: a .png image.
MCU:
MCU: Go into the pc_utility folder and run the script:
MCU: python console.py [COM#]
MCU:
MCU: Press PB1 (SW4) or send the 'capture' command to trigger a frame capture.
MCU:
MCU: Initializing camera...
MCU: Camera ID = 5640
MCU: Initializing SRAM...
MCU: RAM ID:
MCU: MFID: 0x0d
MCU: KGD: 0x5d
MCU: Density: 0x02
MCU: EID: 0x588e670d
MCU: Capturing image...
MCU: Done! (took 73321 us)
MCU: Sending image over serial port...
MCU: *IMG* RGB565 153600 320 240
Collecting 153600 bytes...
$
```

Expand Down