All the demos that feature external flash memory needs to be programmed with demo data.
Each respective project that features external memory usage has a built in programming mode.
Setting up the External Memory Programming Mode
There are two ways to program the external flash memory on the demo boards used.
· UART Mode
· USB Device Mode
To setup the projects using the UART Mode the following files are needed
1. UART.c
2. UART.h
To setup the projects using the USB Device Mode the following files are needed
1. usb_callback.c
2. usb_descriptors.c
3. usb_config.h
Common Files (distributed with the Demos under “install directory/Graphics/Common
1. comm._pkt.c
2. comm._pkt.h
3. comm._pkt_callback.c
4. comm._pkt_callback.h
5. ExternalMemory.h
6. FlashProgrammer.c
7. FlashProgrammer.h
The Hardware Profile will require the following for each mode.
UART mode:
#define USE_COMM_PKT_MEDIA_SERIAL_PORT #define BAUDRATE2 115200UL #define BRG_DIV2 4 #define BRGH2 1
// maximum packet size is needed to be defined for both // UART and USB Device modes. #define COMM_PKT_RX_MAX_SIZE (1024)
|
USB Device mode:
#define USE_COMM_PKT_MEDIA_USB
//#define USE_SELF_POWER_SENSE_IO
// Input used for self power // Pin used must be modified to match the used hardware, pin A2 here is // just an example #define tris_self_power TRISAbits.TRISA2 #define self_power 1
//#define USE_USB_BUS_SENSE_IO // Input used for bus sense #define tris_usb_bus_sense TRISBbits.TRISB5
// Special considerations required if using SESVD for // this purpose (see FRM chapter on USB). #define USB_BUS_SENSE U1OTGSTATbits.SESVD
// maximum packet size is needed to be defined for both // UART and USB Device modes. #define COMM_PKT_RX_MAX_SIZE (1024)
|