Live PhotoFrame Tutorial: Step 8

Step 8.1 - Adding application files

The modified application files app.c and app.h are developed for this lab. Copy these files from the dev_files folder of this lab at
apps\training\middleware\live_photoframe\live_photoframe_lab\dev_files and place them in apps\training\middleware\dev\live_photoframe\live_photoframe_lab\firmware\src. These files will replace the original app.c and app.h.

Step 8.2 - Modifying system_config.h

You need to add application specific definitions in the system_config.h file.
Open system_config.h and add the following code in the Application Configuration section:

Step 8.3 - Configuring the Application Switch

In this application, you need a button-press event to trigger a photo-capture. To achieve this, you have to configure a Change Notification for the S1 switch on the MEBII board, which is connected to GPIO:RA0. Change the handler code of the Change Notification which is present in system_interrupts.c.

1

Enabling Change Notification for the Switch.

In MPLAB® Harmony Configurator (MHC), navigate to Pin Settings and enable the change notification for the switch as shown in the graphic.

app_switch_cn_enable.png

2

Modifying the Interrupt Handler for Change Notification of Port A in system_interrupts.c

Step 8.4 - Replacing the Camera driver in the Harmony Framework

This step is needed to work around an issue related to Harmony version 2.01b The Camera driver file drv_camera_ovm7690.c needs to be replaced.

The Camera driver in the MPLAB Harmony v2.01b does not support the dynamic implementation of the timer driver. However, the TCP/IP stack (which is required for this lab) requires a timer of dynamic driver implementation. To accommodate this, the Camera driver has been modified.

Replace the existing Harmony Camera driver file drv_camera_ovm7690.c.

Copy the drv_camera_ovm7690.c file from this folder:
apps/training/middleware/live_photoframe/live_photoframe_lab/dev_files/source_files/
to this one: framework/driver/camera/ovm7690/src/
Make sure you make a backup of the existing drv_camera_ovm7690.c

replace_camera_driver.png

Step 8.5 - Adding the header file for the I²C driver in the Static Buffer Model

This step is needed to work around an issue related to the legacy Camera driver implementation.

The current versions of MPLAB Harmony support the I²C driver in the Static Buffer Model. However, the Camera driver implementation uses the Static Byte Model.
To overcome this, you must place a header file to avoid compilation issues for the project.
Copy the drv_i2c_static_buffer_model.h file from this folder:
apps/training/middleware/live_photoframe/live_photoframe_lab/dev_files/source_files/
to this one:
live_photoframe_lab/firmware/src/system_config/pic32mz_ef_sk_meb2/framework/driver/i2c
This will overcome the compilation error.

add_i2c_header.png



Next Step >

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.