background image

AN706-00040-2v0-E 

 

 

13 

 

4  PROGRAM EXECUTION METHOD 

4.1 

Program Execution Using Debugger 

4.1.1  Activation of KEIL Integrated Development Environment 

Double-clicking 

“AV_demo.uvproj” inside the Project folder activates the KEIL integrated 

development environment and opens the simple AV system project. 

(1)  Designation of Compile Options (MP3 and AAC Switch) 

 

Figure 8 Designation Operations of Compile Options 

As  shown  in  Figure  8,  right-clicking  on 

“AV_demo”  of  the  project  and  then  left-clicking 

“Options for Target „AV_demo‟…” opens the option settings screen. 

Содержание FM3 family

Страница 1: ...AN706 00040 2v0 E FM3 Family 32 BIT MICROCONTROLLER FM3 family Application Note Simple AV System Board User Manual ARM and Cortex M3 are the trademarks of ARM Limited in the EU and other countries ...

Страница 2: ...emplated for general use including without limitation ordinary industrial use general office use personal use and household use but are not designed developed and manufactured as contemplated 1 for use accompanying fatal risks or dangers that unless extremely high safety is secured could have a serious effect to the public and could lead directly to death personal injury severe physical damage or ...

Страница 3: ...0040 2v0 E 2 Revision History Rev Date Remark 1 0 Aug 23 2011 First Edition 2 0 Feb 06 2012 Correction format Correction lineup of FM3 Correction by RoHS c compliant for board parts change and software change ...

Страница 4: ... 13 4 1 2 Start of Sample Program Export and Debug 16 4 1 3 Program Execution Using Debugger 18 4 2 Standalone Program Execution 18 5 SUPPORTED MEDIA 19 5 1 Formats that can be Used for USB Memory 19 5 2 Audio Data 19 5 3 Image Data 20 6 OPERATION METHOD 21 6 1 MP3 File Play 21 6 2 AAC File Play 27 7 SPECIFICATIONS 29 7 1 Hardware 29 7 1 1 General Specifications 29 7 1 2 Hardware Block Diagram 30 ...

Страница 5: ...e Library 50 7 2 3 System Specifications 51 7 2 3 1 Microcontroller System Specifications 51 7 2 3 2 Memory Map 52 7 2 3 3 MFS System Specifications 53 7 2 3 4 DMAC System Specifications 53 7 2 3 5 Interrupt System Specifications 54 7 2 4 API Specifications 55 7 2 4 1 Audio Playback API 55 7 2 4 2 Image Display API 56 7 2 4 3 LED Control API 59 7 2 4 4 Switch Detection API 60 7 2 4 5 Timer Control...

Страница 6: ...ssing Function 84 7 2 8 4 HMI Task Processing Function 85 7 2 8 5 AUDIO Play Task Processing Function 87 7 2 8 6 Switch Press Detection Processing Function 91 7 2 8 7 Processing Function After Switch Press Detection 92 7 2 8 8 Touch Panel Touch Detection Processing Function 93 7 2 8 9 Processing After Touch Panel Touch Detection Function 94 7 2 9 File Configuration 95 ...

Страница 7: ...tion note is described about below products TYPE0 Series Product Number not included Package suffix MB9B500B MB9BF504NB MB9BF505NB MB9BF506NB MB9BF504RB MB9BF505RB MB9BF506RB MB9B300B MB9BF304NB MB9BF305NB MB9BF306NB MB9BF304RB MB9BF305RB MB9BF306RB ...

Страница 8: ...yed by outputting the data decoded by the MP3 decoder to the DAC You can select and play MP3 files by switch operation as well AAC The AAC file to be played is selected by switch operation and the AAC file is imported from the USB memory by the file system The imported AAC file is decoded by AAC decoder and the data is output to the DAC and played If playing an AAC file image output to the LCD and...

Страница 9: ...ppearance of the USB memory is shown in Figure 4 and a photograph the external appearance of the USB cable is shown in Figure 5 Table 1 List of System Items No Name Pcs Remarks 1 Simple AV System Board 1 Consists of microcontroller board KEIL MCB9BF500 LCD board and power supply cable 2 2 Pin power connection line 1 2 54mm pitch 3 ICE 1 KEIL ULINK2 4 USB memory 1 BUFFALO RUF C2GS BL U2 5 USB cable...

Страница 10: ...AN706 00040 2v0 E 9 Figure 3 ICE Figure 4 USB memory Figure 5 USB cable ...

Страница 11: ... Table 2 and equipment used as need is given in Table 3 Table 2 Equipment other than system items required No Name pcs Specifications Remarks 1 PC 1 Use USB host port for power supply If using ICE use USB host port Table 3 List of Equipment Used as Needed No Name pcs Specifications Remarks 1 Earphones or speakers 1 For audio output ...

Страница 12: ...AN706 00040 2v0 E 11 3 3 Board Appearance A photograph of the external appearance of the simple AV system board is shown in Figure 6 Figure 6 Photograph of External Appearance of Simple AV System Board ...

Страница 13: ...C and connect the Type B side to the USB power supply connector of the simple AV system board Press down the power switch with the USB cable connected The power supply switch is self locking and stays depressed while the power is on To turn the power off press the power switch again Select your favorite music USB Connector for Power Supply USB Cable B Connector Side Figure 7 USB Cable Insertion Po...

Страница 14: ...vproj inside the Project folder activates the KEIL integrated development environment and opens the simple AV system project 1 Designation of Compile Options MP3 and AAC Switch Figure 8 Designation Operations of Compile Options As shown in Figure 8 right clicking on AV_demo of the project and then left clicking Options for Target AV_demo opens the option settings screen ...

Страница 15: ...tion screen in the case of AAC set MUSIC_AAC Figure 9 Figure 10 Setting values MUSIC_MP3 MUSIC_AAC Setting values MUSIC_MP3 MUSIC_AAC Figure 9 C C Compile Options Designation Method Setting values MUSIC_MP3 MUSIC_AAC Setting values MUSIC_MP3 MUSIC_AAC Figure 10 ASM Compile Options Designation Method ...

Страница 16: ... Rebuilds program プログラムをリビルド プログラムをビルド Builds program Rebuilds program Figure 11 Simple AV System Build Click the location shown in Figure 11 to build or rebuild the program After successfully building or rebuilding the sample program can be exported to the microcontroller ...

Страница 17: ... is shown in Figure 12 The PC and simple AV system board are connected via ICE Figure 12 Equipment Connections for Exporting Program 2 Exporting the Program to the Microcontroller Click the location shown in Figure 13 to export the program to the microcontroller マイコンへプログラムを書き込み Writes program in microcontroller Figure 13 Exporting the Program to the Microcontroller ...

Страница 18: ...AN706 00040 2v0 E 17 3 Debug Activation Click the location shown in Figure 14 and activate the debugger Debugging can then be started Starts debug Figure 14 Operation of Debug Activation ...

Страница 19: ...Activated For other debugger operations see help 4 2 Standalone Program Execution When the program is exported and debugging is completed by the procedure given in 4 1 Program Execution Using Debugger turn the board s power off with the power switch and remove ICE from the simple AV system board After doing so the program is run by standalone by turning the power on with the power switch on the si...

Страница 20: ...nvironment offered as a sample are given in Table 5 If using MP3 AAC file decoder middleware a contract is required Table 5 Corresponding Audio Data No Item Description Remarks 1 File format MP3 or AAC MP3 and AAC cannot be handled simultaneously 2 File name music1 mp3 to music5 mp3 music1 aac to music5 aac 3 Sampling rate 8k 11 025k 12k 16k 22 05k 24k 32k 44 1k 48k Unit Hz 4 Bit rate 8k to 320kbp...

Страница 21: ...ct is required Table 6 Image Data Supported by the Sample Program No Item Description Remarks 1 File format JPEG 2 File name picture1 jpg to picture5 jpg select jpg 3 Resolution 240 320 to 3840 5120 Note If AAC decoder can be assembled for audio data processing the JPEG encoder decoder cannot be assembled due to restriction of the microcontroller built in RAM size ...

Страница 22: ... Indicator LED Figure 16 Operation Explanation Diagram 6 1 MP3 File Play 1 From Preparation to Power On Audio data music1 mp3 to music5 mp3 and image data picture1 jpg to picture5 jpg select jpg are contained in the root directory of the USB memory Insert USB memory in USB memory connector of simple AV system board Connect earphones or speakers to the speaker connector Connect USB cable to the USB...

Страница 23: ...ong selection previous switch selects audio file in the following order music5 mp3 music4 mp3 music1 mp3 If the next switch is pressed while music1 mp3 is selected music1 mp3 is then selected LED1 to LED5 correspond to music1 mp3 to music5 mp3 the lit LED indicated the file currently selected Songs can be selected while music is not played Select your favorite music Selection Next Switch Selection...

Страница 24: ... Switch Touch the thumbnail on the touch panel LCD MP3 picture1 jpg to picture5 jpg corresponds to music1 mp3 to music5 mp3 Touch the touch operation area image with your finger Select your favorite music Touch Operation Area Figure 19 Play Start Operation by Touch Panel The touched image is enlarged and the music linked with the image starts playing Example If the touched image were picture3 jpg ...

Страница 25: ...AN706 00040 2v0 E 24 Figure 20 LCD Display While Playing ...

Страница 26: ...lay Stop switch Play Stop Switch Figure 21 Play Stop Operation by Play Stop Switch Touch the touch panel When you touch the enlarged image with your finger the music stops playing Touch Operation Area Figure 22 Play Stop Operation by Touch Panel When music is stopped the image simultaneously switches the thumbnail display ...

Страница 27: ...AN706 00040 2v0 E 26 Select your favorite music Figure 23 Thumbnail Display ...

Страница 28: ...cts audio file in the following order music1 aac music2 aac music5 aac If the next switch is pressed while music5 aac is selected music5 aac is then selected Pressing the song selection previous switch selects audio file in the following order music5 aac music4 aac music1 aac If the next switch is pressed while music1 aac is selected music1 aac is then selected LED1 to LED5 correspond to music1 aa...

Страница 29: ... the following operation Press down the Play Stop switch Play Stop Switch Figure 25 Play Start Operation by Play Stop Switch 4 Play Stop Operation While music is playing it can be stopped by the following operation Press the Play Stop switch Play Stop Switch Figure 26 Play Stop Operation by Play Stop Switch ...

Страница 30: ...l connected equipment 4 Switch Key input switch Pushbutton switch x 4 5 Reset switch Pushbutton switch x 1 6 USB function Switch Jumper socket x 2 7 Indicator LCD panel with touch panel LCD 2 4 TFT 240 320 pixels Touch panel 4 wire resistive touch panel 8 LED 8 units 9 External I F Audio Speaker jack x 1ch 10 USB I F USB A type 1ch For USB memory connection 11 USB B type 2ch 12 JTAG I F For KEIL I...

Страница 31: ...ler Board 3 3V 3 3V LCD Board 27MHz 5V DAC USB Host JTAG ICE Clock Generator Speaker Jack USB Host Interface JTAG Interface USB Connector OSC CLK LDO LED X tal LED GPIO Counter Switch USB Memory USB host LCD Touch Panel External Bus Touch Panel Driver SCK SCK LCD Driver Backlight Driver CSIO Figure 27 Hardware Block Diagram ...

Страница 32: ...t Driver 1 ROHM BD6067GU 5 Touch Panel Driver 1 MAXIM MXB7843EUE 6 Clock Generator 1 IDT MK2705SLF 7 OSC 1 Kyocera CX3225SB27000D0GEJZ1 8 Counter 1 On Semiconductor MC74AC161DG 9 DA converter 1 Audio data conversion CIRRUS CS4354 CSZ 10 Speaker connector 1 For earphones or speakers connection Kycon STX 3500 11 USB B power supply connector 1 For supplying power from external USB host Refer to the f...

Страница 33: ...9 List of Microcontroller Pin Connections Pin No Pin Name Use Function Connection Destination I O Remarks 01 VCC 3 3V power supply 02 MDATA00 LCD controller D0 I O 03 MDATA01 LCD controller D1 I O 04 MDATA02 LCD controller D2 I O 05 MDATA03 LCD controller D3 I O 06 MDATA04 LCD controller D4 I O 07 MDATA05 LCD controller D5 I O 08 SPI_MISO Touch panel controller DOUT I 09 SPI_MOSI Touch panel contr...

Страница 34: ...l controller xCS O 21 INT10_1 Touch panel controller xPENIRQ I 22 Not used 23 Not used 24 Not used 25 Not used 26 Not used 27 Not used 28 Not used 29 Not used 30 VSS GND 31 VCC 3 3V power supply 32 Not used 33 Not used 34 Not used 35 Not used 36 Not used 37 Not used 38 C 4 7 μF capacitor 39 VSS GND 40 VCC 3 3V power supply 41 Not used 42 Not used 43 Not used 44 Not used 45 Not used ...

Страница 35: ...0 VSS GND 61 VCC 3 3V power supply 62 Not used Connected to potentiometer 63 Not used 64 P12 LCD backlight controller EN O LCD backlight control H Enable L Disable 65 MAD08 LCD controller RS O 66 P14 LCD controller RESET O L Reset active 67 MCSX0 LCD controller CS O 68 MOEX LCD controller RD O 69 MWEX LCD controller WR SCI O 70 AVCC 3 3V power supply 71 AVRH 3 3V power supply 72 AVSS GND 73 MDATA8...

Страница 36: ... Not used 89 Not used 90 VSS GND 91 VCC 3 3V power supply 92 TRSTX N C 93 TCK JTAG connector ETM connector I 94 TDI JTAG connector ETM connector I 95 TMS JTAG connector ETM connector I O 96 TDO JTAG connector ETM connector O 97 Not used ETM connector I 98 Not used ETM connector I 99 Not used ETM connector I 100 Not used ETM connector I 101 Not used ETM connector I 102 Not used 103 SOT4_0 DA conver...

Страница 37: ...t used 110 Not used 111 SCK5_1 DA converter SCK Binary Counter Q2 8 divisions output I 112 SOT5_1 DA converter SDIN O 113 P63 Clock Generator S0 O 114 Not used 115 P61 Clock Generator S1 O 116 Not used 117 USBVCC 3 3V power supply 118 UDM0 USB jumper pin for selection 119 UDP0 USB jumper pin for selection 120 VSS GND ...

Страница 38: ...amming of the microcontroller mounted on the microcontroller board can be carried out For details see the Flash Programming Manual of the microcontroller Setting Method Insert the jumper for switching modes of the microcontroller in the silk notation MD0H side The Operating Mode off the microcontroller is decided after releasing power on reset low voltage detection reset and INITX pin input reset ...

Страница 39: ... the microcontroller to L level switches to this mode Setting Method Insert the jumper for switching modes of the microcontroller in the silk notation MD0L side The Operating Mode off the microcontroller is decided after releasing power on reset low voltage detection reset and INITX pin input reset When selecting this mode set to USB function by switching USB host function of the microcontroller F...

Страница 40: ...ace Function Set when User Mode is Selected Overview The USB interface of the microcontroller is used as the host Setting Method Insert the jumper for switching modes of the microcontroller in the silk notation HOST side Figure 31 USB Host Function Setting Method 2 USB Function Interface Function Set when Serial Writer Mode is Selected Overview The USB interface of the microcontroller is used as t...

Страница 41: ...enerator Pin No 5 CLK Pin No 3 S0 Pin No 104 SCK4_0 Pin No 112 SOT5_1 Pin No 113 P63 11 2896MHz or 12 288MHz 1 4112MHz or 1 536MHz Binary Counter Pin No 2 CP Pin No 12 Q2 Pin No 6 S1 Pin No 115 P61 Microcontroller Figure 33 DA Converter External Appearance and Connection Diagram 7 1 6 Switches 7 1 6 1 Power switch The LCD board is equipped with a power switch The external appearance of the power s...

Страница 42: ...p Switch P73 Pin No 108 P68 Pin No 54 P73 Figure 35 Key Input Switch External Appearance and Connection Diagram 7 1 6 3 Reset Switch The microcontroller board is equipped with a reset switch The external appearance and connection diagram of the reset switch are shown in Figure 36 Reset Switch Microcontroller 3 3V Reset Switch Reset Pin No 43 INITX Pressed Down L Reset Active Not Pressed Down H Res...

Страница 43: ...anel are given in Figure 10 For connection of microcontroller and LCD module with touch panel see Table 9 LCD Module W Touch Panel Figure 37 External Appearance of LCD Module with Touch Panel Figure 10 Specifications of LCD Module with Touch Panel No Item Description Remarks 1 LCD driver model ILI9320 ILI Technology 2 Touch panel driver MXB7843EUE MAXIM 3 LCD backlight driver BD6067GU ROHM 4 LCD 2...

Страница 44: ... supply status The external appearance of the power LED is shown in Figure 38 and the specifications are given in Table 11 Power LED Figure 38 Power LED external appearance Table 11 Power LED Specifications No Item Color Specifications Connection Destination 1 Power LED Red Power ON On Power OFF Off 5V power supply ...

Страница 45: ...3B Pin No 26 P3C P39 LED P3A LED P3B LED P3C LED 3 3V Figure 39 Selection Indicator LED External Appearance and Connection Diagram Table 12 Selection Indicator LED Specifications No Item Color Microcontroller connection destination Specifications 1 P38 LED Green Pin No 22 P38 Microcontroller H output Off Microcontroller L output On 2 P39 LED Green Pin No 23 P39 Microcontroller H output Off Microco...

Страница 46: ...or power supply uses a conventional USB B Type connector but the USB signal line is not connected Only VBUS and GND are connected USB Connector for Power Supply Figure 40 USB Connector for Power Supply 7 1 8 2 Audio Interface The LCD board is equipped with a speaker connector that functions as an audio interface The external appearance and connection diagram of the speaker connector are shown in F...

Страница 47: ...mory connector is shown in Figure 42 and the USB memory connector specifications are given in Table 13 USB Memory Connector Figure 42 USB Memory Connector External Appearance Table 13 USB Memory Connector Specifications Pin No I O Microcontroller connection destination Pin No Signal Name 1 5V VBUS 2 I O 118 UDM0 D 3 I O 119 UDP0 D 4 GND 5 GND I O as seen from the microcontroller ...

Страница 48: ... the pin assignment is given in Table 14 JTAG Interface Connector 1 2 9 10 Figure 43 JTAG Interface Connector External Appearance Table 14 JTAG Interface Connector Pin Assignment Microcontroller connection destination I O Pin No I O Microcontroller connection destination Pin No Signal Name Pin No Signal Name 3 3V 1 2 I O 95 TMS GND 3 4 I 93 TCK GND 5 6 O 96 TDO GND 7 8 I 94 TDI GND 9 10 I 43 RESET...

Страница 49: ...1 2 19 20 Figure 44 ETM Interface Connector External Appearance Table 15 ETM Interface Connector Pin Assignment Microcontroller connection destination I O Pin No I O Microcontroller connection destination Pin No Signal Name Pin No Signal Name 3 3V 1 2 I O 95 TMS GND 3 4 I 93 TCK GND 5 6 O 96 TDO GND 7 8 I 94 TDI GND 9 10 I 43 RESET GND 11 12 O 101 TRACECLK GND 13 14 O 97 TRACEDATA0 GND 15 16 O 98 ...

Страница 50: ... Driver LCD Control Driver Timer Control Driver Touch Panel Control driver Switch Detection Audio Play Image Display File System MDF Application Target Board Application Middleware Driver Hardware Application Interface Fujitsu Semiconductor Library Audio Play LED Control MP3 AAC Decoder Library JPEG Encoder Decoder Library USB Host Mass Storage Class MSC Driver USB Host Driver I2S Control Driver L...

Страница 51: ...ecoder library for embedded system Decodes MPEG Audio Layer III MP3 bit stream data and outputs PCM format bit stream data 3 AAC Decoder Name MPEG 4 2 AAC LC Decoder Library 2ch for FM3 V01 Evaluation Overview AAC audio decoder library for embedded system Decodes MPEG 4 and MPEG 2 AAC bit stream data and outputs PCM format bit stream data 4 JPEG Encoder Decoder Name JPEG Baseline Process Encoder D...

Страница 52: ...RAM 1 64 0 Kbytes MP3 Variable 32 0 Kbytes Stack 8 0 Kbytes Heap 24 0 Kbytes 63 8 Kbytes AAC Variable 24 3 Kbytes Stack 8 0 Kbytes Heap 31 5 Kbytes MFS 2 Uses 2 ch For I2 S communication With CSIO 3 as the slave mode realizes I2 S by serial output based on clock input from OSC For details see 7 2 3 3 MFS System Specifications DMAC Uses 4 ch ch 0 1 For USB host control ch 2 3 For CSIO data transfer...

Страница 53: ...00 Variable 0x1FFFE000 Heap Stack 0x20007FFF Vector 0x00000000 Vacancy GAP 0x000000F8 0x00000100 0x20000000 MP3 Program 0x0002626C Vacancy 0x0007FFFF ROM FLASH RAM 0x1FFF8000 Variable Variable Stack 0x20007FFF Vector 0x00000000 Vacancy GAP 0x000000F8 0x00000100 0x20000000 AAC Heap 0x1FFF81A0 0x1FFFFFA0 Vacancy 0x20005FA8 Vacancy 0x20007FA8 Figure 46 Memory Map ...

Страница 54: ...th channel 4 and 5 Clock uses 8 divisions of 11 2896MHz or 12 288MHz Because PCM data of 1 sample output to DAC is 16 bit Stereos 2ch it is played at the sample rate of 44 1kHz or 48kHz by 141120 16 bit 2ch 44100 1536000 16 bit 2 ch 48000 7 2 3 4 DMAC System Specifications DMAC system specifications are given in Table 18 Table 18 DMAC System Specifications Channel No Application Remarks 0 For data...

Страница 55: ...tor Number Remarks Reset Reset_Handler 01 Base timer ch 2 interrupt BTIM_IRQHandler 47 Processes an interrupt by 1ms cycle USB host each status interrupt USB_EP0_STA_IRQHandler 50 Processes an interrupt for USB host interrupt DMAC ch 2 interrupt DMA2_IRQHandler 56 Processes an interrupt for DMA ch2 interrupt If there is play data set transfer of audio data and LR channel data to I2 S ...

Страница 56: ...quisition function Parameter None Return value Audio playback processing status AUDIO_STAGE_INIT After completion of initialization AUDIO_STAGE_OPEN Audio data file open AUDIO_STAGE_LIBRARY_INIT Decoder library initialization AUDIO_STAGE_ANALYZE Audio data file decode AUDIO_STAGE_READ Audio data file read AUDIO_STAGE_DECODING Audio data decode AUDIO_STAGE_UPSAMPLE Decode data up sampling AUDIO_STA...

Страница 57: ...e Return value None 7 2 4 2 Image Display API Function void IMAGE_Init void Overview Image display processing initialization function Invoked before entering the main loop see 7 2 8 1 Main Processing Function Parameter None Return value None Function void IMAGE_ClearShow void Overview Image display clear function Displays entire LCD in white Parameter None Return value None ...

Страница 58: ...AREA6 Area 6 IMAGE_SHOW_AREA7 Area 7 IMAGE_SHOW_AREA8 Area 8 IMAGE_SHOW_AREA9 Area 9 IMAGE_SHOW_AREA_ALL All Color Backgroynd color designation LCD_COLOR_WHITE White LCD_COLOR_BLACK Black LCD_COLOR_GREY Grey LCD_COLOR_BLUE Blue 1 LCD_COLOR_BLUE Blue 2 LCD_COLOR_RED Red LCD_COLOR_MAGENTA Magenta LCD_COLOR_GREEN Green LCD_COLOR_CYAN Cyan LCD_COLOR_YELLOW Yellow Return value Processing results IMAGE_...

Страница 59: ...AN706 00040 2v0 E 58 LCD display area corresponds as follows Area1 Area2 Area3 Area4 Area5 Area6 Area7 Area8 Area9 Figure 47 LCD Display Area ...

Страница 60: ... LED control processing function Turns specified LED on or off Parameter IdCh Control target LED defined by bit bit0 LED1 bit1 LED2 bit2 LED3 bit3 LED4 bit4 LED5 bit5 LED6 bit6 LED7 bit7 LED8 LEDStatus LED on off control corresponding bit 0 off on when it is 1 bit0 LED1 bit1 LED2 bit2 LED3 bit3 LED4 bit4 LED5 bit5 LED6 bit6 LED7 bit7 LED8 Return value Processing results LED_RET_OK Normal completio...

Страница 61: ...Return value None Function STATUS SW_GetStatus uint8_t ButtonId uint8_t pStatus Overview Switch status acquisition function Parameter ButtonId Switch No 0 Play Stop switch 1 Song selection next switch 2 Song selection previous switch pStatus Pointer for place where switch status is stored SW_NO_PUSH Not pressed SW_PUSH Pressed Return value Processing results SW_RET_OK Normal completion SW_RET_INVA...

Страница 62: ...TUS TIMER_Start uint8_t IdCh Overview Timer start function Invoked before entering the main loop and after TIMER_Init invocation see 7 2 8 1 Main Processing Function Parameter IdCh Control target timer ch TIMER_CH2 Base timer ch 2 TIMER_CH3 Base timer ch 3 Ch 3 is not used Return value Processing results TIMER_RET_OK Normal completion TIMER_RET_INVALID_PARAMETER Parameter error TIMER_RET_ILLEGAL_E...

Страница 63: ...H_RET_ILLEGAL_ERROR Timer setting failure Function STATUS TOUCH_GetAreaStatus uint16_t Status Overview Touch panel area status acquisition function Parameter Status Pointer to area status acquisition information storage destination If successful area see Figure 47 status touch by 1 is written by bit bit0 Area 1 bit1 Area 2 bit2 Area 3 bit3 Area 4 bit4 Area 5 bit5 Area 6 bit6 Area 7 bit7 Area 8 bit...

Страница 64: ... sample rate Sampling rate AUDIO_SAMPLE_44100 44 1kHz AUDIO_SAMPLE_48000 48kHz Return value I2S_RET_OK Successful I2S_RET_ILLEGAL_ERROR Not yet initialized operating or stopped Function STATUS I2S_Stop void Overview Completes I2 S operation Stops CSIO Parameter None Return value I2S_RET_OK Successful I2S_RET_ILLEGAL_ERROR Not yet initialized or stopped Function uint8_t I2S_Get_Status void Overview...

Страница 65: ...m Concerning assembly of MP3 and AAC decoder The MP3 and AAC decoders cannot conduct processing simultaneously because the built in RAM size is insufficient Concerning JPEG file processing for AAC decoder assembly If an AAC decoder is assembled JPEG file decode processing cannot be conducted because the built in RAM size is insufficient ...

Страница 66: ... play stop switch is detected to be pressed down or if not detected but an area of the touch panel is detected to have been touched the JPEG files corresponding to the selected MP3 file are read from the USB memory and displayed for playback If the selection previous switch or selection next switch are detected to have been pressed down MP3 file selection is shifted and LED control is executed The...

Страница 67: ...us switch or Selection next switch pressed Open selected MP3 file Read selected MP3 header data and execute MP3 header analysis processing Change to audio data playback state Select MP3 LED control LED control driver module LED1 LED2 LED3 LED4 LED5 LED state Timer interrupt ch 2 1ms Area 1 Area 2 Area 3 Area 4 Area 5 Area 6 Area 7 Area 8 Area 9 Touch panel detection Was touch of touch panel detect...

Страница 68: ...ressed down or if not detected but an area of the touch panel is detected to have been touched playback is stopped the MPA file is closed all JPEF filed are read from the USB memory that images for selection are displayed and operation shifts to audio data playback stopped status Verify vacancy of input buffer If there is sufficient vacancy the MP3 file is read from the USB memory and copied in th...

Страница 69: ...enough empty area in the input buffer Read MP3 data from media and copy in the input buffer One frame of the data in the input buffer is decoded then store it to the RAW buffer Was one frame decoded successful Up sample the RAW buffer data and copy it to the output buffer Sampling data output module PCM data PCM data I2S output No No Yes Yes Media files Change to initialization state Read all JPEG...

Страница 70: ... shifts to audio data playback status This operation is shown in Figure 50 music1 aac music2 aac music3 aac music4 aac music5 aac Open selected AAC file Read selected AAC header data and execute AAC header analysis processing Select AAC LED control LED state No Yes Yes No No Yes AAC header Media files Switch detection module Play Stop switch Selection previous switch Selection next switch Switch c...

Страница 71: ...executed If the play stop button is detected to have been pressed down playback stops the AAC file is closed and operation shifts to audio data playback stop status Verify vacancy of input buffer If there is sufficient vacancy the AAC file is read from the USB memory and copied in the input buffer One elementary stream of the input buffer is decoded and stored in the RAW buffer When 1 elementary s...

Страница 72: ...rocessing Timer interrupt ch 2 1ms Are there enough empty area in the input buffer Read AAC data from media and copy in the input buffer One frame of the data in the input buffer is decoded then store it to the RAW buffer Was one frame decoded successful Up sample the RAW buffer data and copy it to the output buffer Sampling data output module PCM data PCM data I2S output No No Yes Yes Output buff...

Страница 73: ... Reset state Initial setting complete Media recognized Image display processing complete Play stop switch press or selection by touch panel Image display processing complete USB memory removed USB memory removed USB memory removed USB memory removed No corresponding MP3 file play stop switch press stop by touch panel or MP3 file play finish Figure 52 State Transition MP3 Reset State The simple AV ...

Страница 74: ...State Play stop switch selection previous switch selection next switch Does not function even if pressed down LCD Touch Panel Does not function even if touched LED All LEDs go off LCD Total screen displayed in white USB State where USB connection connector has not been inserted When a USB memory has been inserted into the USB memory connector after being recognized the system shifts to audio data ...

Страница 75: ...ack stop state Track1 Select your favorite music Track2 Track3 Track4 Track5 Figure 53 Audio Data Selection Image Display Individual State Play stop switch selection previous switch selection next switch Does not function even if pressed down LCD Touch Panel Does not function even if touched LED LED1 lights LCD Image display is as shown in Figure 53 USB State where USB memory is inserted in the US...

Страница 76: ...tate Selection previous switch selection next switch LED 1 to 5 shift lit LCD Touch Panel When the audio data images shown in Figure 53 are touched the system shifts to audio data image display processing state LED Playback target LED lights LED 1 lights when USB memory recognition processing is complete LCD Image display is as shown in Figure 53 USB State where USB memory is inserted in the USB m...

Страница 77: ...processing is completed for the LCD if the target MP3 file exists the system shifts to audio data playback state If the target MP3 file does not exist the system shifts to audio data selection image display processing state Individual State Play stop switch selection previous switch selection next switch Does not function even if pressed down LCD Touch Panel Does not function even if touched LED P...

Страница 78: ...image display processing state Selection previous switch selection next switch Does not function even if pressed down LCD Touch Panel If the touch panel is touched playback stops and the system shifts to audio data selection image display processing state LED The LED of the target audio data lights LCD Image display is as shown in Figure 54 USB State where USB memory is inserted in the USB memory ...

Страница 79: ...state Initialization state Reset state Initial setting complete Media recognized Play stop switch press USB memory removed USB memory removed Play stop switch press or AAC file play finish Figure 55 State Transition AAC Reset State The simple AV system is in reset state immediately after the power has been turned on In the reset state internal initialization is executed ...

Страница 80: ...gnized Individual State Play stop switch selection previous switch selection next switch Does not function even if pressed down LCD Touch Panel Does not function even if touched LED All LEDs go off LCD All LEDs go off USB State where USB connection connector has not been inserted When a USB memory has been inserted into the USB memory connector after being recognized the system shifts to audio dat...

Страница 81: ...in audio data playback state Selection previous switch selection next switch LED 1 to 5 shift lit LCD Touch Panel Does not function even if touched LED Playback target LED lights LED 1 lights when USB memory recognition processing is complete LCD All LEDs go off USB State where USB memory is inserted in the USB memory connector If the USB memory is removed in this state the system shifts to initia...

Страница 82: ... stop and the system shifts to audio data playback stop state Selection previous switch selection next switch Does not function even if pressed down LCD Touch Panel Does not function even if touched LED The LED of the target audio data lights LCD All LEDs go off USB State where USB memory is inserted in the USB memory connector If the USB memory is removed in this state playback stops and the syst...

Страница 83: ...ion setting mb9b500_system_boot Sample application variable initialization av_demoapp_init USB host driver initialization USBH_Initialize Interrupt enable while 1 Timer module initialization TIMER_Init LED module initialization LED_Init Audio module initialization AUDIO_Init Switch module initialization SW_Init Touch panel module initialization TOUCH_Init Timer ch 2 activation TIMER_Start IMAGE mo...

Страница 84: ...onnection event occur and disconnection event not occur Clear USB device disconnection event USB device disconnection event occur Set USB connection to USB device connected state Clear USB device disconnection event Set USB disconnection to USB device connected state Yes No USB host driver polling processing USBH_Polling Finish No Yes LED off LED_Set Figure 58 USB Task Processing Function Flow ...

Страница 85: ...edia read and write processing is registered Start MDF operation stage judgment MDF opened successfully MDF open processing av_demoapp_MDF_open Set action stage for MDF stage Light LED 1 MDF close processing av_demoapp_MDF_close Set MDF stage for initialization stage File open File close Finish Initialization Action Others No Yes Audio stage initialized No Yes Figure 59 File System MDF Task Proces...

Страница 86: ...dio stage initialized Set select display to HMI status Select Play 1 Others No Yes No Yes Display image for playback audio data on entire LCD IMAGE_show Display image for audio data selection screen on entire LCD IMAGE_show Display image for selecting each audio data on LCD selection screen IMAGE_show Switch press detection processing av_demoapp_sw_detect Processing after switch press detection av...

Страница 87: ... 1 USB device has been removed and HMI status is other than nitialization MP3 format Set initialization for HMI status Finish No Yes Clear image for entire LCD IMAGE_ClearShow Figure 61 HMI Task Processing Function Flow 2 ...

Страница 88: ...e USB memory using the MDF file system is decoded and played Start Set TRUE for audio play processing loop condition I2S status stop Audio stage is other than stop and other than initialization Set audio stage to stop Audio play processing loop condition true 1 Finish 2 No Yes No Yes No Yes Figure 62 AUDIO Task Processing Function Flow 1 ...

Страница 89: ...itialization Set stop for audio stage 1 Set analyze for audio stage Initialize decode library audio_decode_libraryinit Decode library successfully initialized No Yes Set stop for audio stage 1 Set file read for audio stage Analyze audio file header audio_decode_analyze Audio file header analyzed successfully No Yes Analyze 3 File read Decode Sampling Stop Others Figure 63 AUDIO Task Processing Fun...

Страница 90: ...Yes Decode Decode audio file audio_decode_decoding Set sampling for AUDIO stage 1 Set stop for audio stage Audio file decode results judgment Successfully decoded Set file read for audio stage Less than 1 frame Set library initialization for audio stage Reset possible error Others Reset impossible error 4 Sampling Stop Others Figure 64 AUDIO Task Processing Function Flow 3 ...

Страница 91: ...play start flag No Yes RAW data buffer has vacancy Set file read for audio stage Output buffer does not have sufficient vacancy No Yes Stop Stop audio play AUDIO_DecodeStop Set false for audio play processing loop condition Set initialization for audio stage Set false for audio play processing loop condition Others 1 Start I2 S by 48kHz I2 S_Start Is sampling rate 8k 12k 16k 24k 32k 48k Yes Start ...

Страница 92: ...t pressed for current switch press status Start Loop counter 0 Loop counter Number of SW buttons Increment loop counter No Yes No current switch press and switch status pressed Current switch pressed and switch status not pressed No Yes Set not pressed for current switch press status Set detection for current switch detection status Yes No Finish Get switch state SW_GetStatus Figure 66 Switch Pres...

Страница 93: ...stop switch press detection av_demoapp_sw_play_process Set no detection for play stop switch press detection status Selection next switch press detection Processing after selection next switch press detection av_demoapp_sw_next_process Set no detection for selection next switch press detection status Yes No Selection previous switch press detection Processing after selection previous switch press ...

Страница 94: ...es Current touch panel status changes to touch status Set current touch panel touch status to touch detection complete status Current touch panel status changes to no touch status Set current touch panel no touch status to touch detection complete status Set detection for current touch panel detection status Set touch panel area ID Increment loop counter Yes No Yes No Finish Get area status from t...

Страница 95: ...gure 69 is executed Start Touch panel detection HMI status judgment Select Touch panel area ID 1 to 4 6 Touch panel area ID 6 Set audio file No to 5 Set audio file No to touch panel area ID Yes No Yes No Yes No LED display update OK Set audio file No set as audio file ID Set play for HMI status Play Yes No Set stop for audio status Release touch panel detection status Others Finish Figure 69 Proce...

Страница 96: ...port c Hardware dependent processing source file hw_support h Hardware dependent processing header file av_demoapp c Application processing source file fs_service c File system service source file sys_mem c System memory processing source file sys_timer c System timer processing source file IRQ c Interrupt processing source file application_if Application interface directory audio Audio play proce...

Страница 97: ...h_config h User setting header file for touch panel control driver usbh_config h User setting header file for USB host driver usbh_msc_config h User setting header file for USB host mass storage class MSC driver drivers Driver directory i2s I2 S control driver directory i2s c I2 S control driver source file lcd LCD control driver directory lcd c LCD control driver source file lcd_ili9325 c ILI9325...

Страница 98: ... USB host controller processing header file usbh_mgr h USB host manager processing header file usbh_mh_core h USB Mini host controller driver Core processing header file usbh_mh_dma h USB Mini host controller driver Core processing header file usbh_mh_hal h USB Mini host controller driver Hardware physical control processing header file usbh_req h USB host request processing header file usb_msc US...

Страница 99: ...dent processing header file timer h Timer control driver header file touch h Touch panel control driver header file typedef h Type definition header file usbh h USB host driver header file usbh_msc h USB host mass storage class MSC driver header file cpu CPU dependent header file directory cpu_config h CPU setting header file mb9bf50x MB9BF500 Series definition header file directory cpu_define h C...

Отзывы: