STM32F10xxx DSP library firmware & FFT_Demo: STM32F10xxx DSP library firmware & FFT_Demo

  • Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • Directories

STM32F10xxx DSP library firmware & FFT_Demo

UM0585 "STM32F10xxx DSP library firmware "

Copyright 2009 STMicroelectronics

The STM32F10xxx DSP (digital signal processing) library, is a suite of common digital signal processing functions:

  • PID controller
  • Fast Fourier transform
  • FIR and IIR filters

The library contains C and assembly functions that have been ported and tested on the IAR EWARM 5.20, Keil RVMDK 3.23 and Raisonance RIDE7 (GNU compiler toolchains.). Please refer to the user manual UM0585 "STM32F10xxx DSP library firmware ".

The package is coming with a demonstration example for FFT"Fast Fourier Transform".

The STM32F10xxx DSP firmware Library and FFT Demo are based on STM32F10x Standard Peripheral Library. For full STM32F10x StdPeriph_Lib documentation, please visit the STM32 web site and check stm32f10x_stdperiph_lib_um.chm file inside the STM32F10x_StdPeriph_Lib zip package.

The STM32F10xxx DSP firmware Library and FFT Demo are structured as follows:

FFT_Demo

Manual tab sheets description:

Modules: Lists the different modules that compose this Firmware package: functions and data structures:(variables, defines, ...)

Files: Lists all the files and global.

Directory Hierarchy: List of directories.

Release Notes for The STM32F10xxx DSP firmware Library & FFT Demo

CMSIS Documentation CMSIS Documentation

License

The enclosed firmware and all the related documentation are not covered by a License Agreement, if you need such License you can contact your local STMicroelectronics office.

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

STM32F10x Standard Peripherals Library: Footer

For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit www.st.com/STM32


STM32F10xxx DSP library firmware & FFT_Demo: FFT_Demo Directory Content

  • Data Structures
  • Files
  • Directories

FFT_Demo Directory Content

src

  • FFT_Demo/src/stm3210b_lcd.c
  • FFT_Demo/src/stm32f10x_it.c
  • FFT_Demo/src/main.c
inc
  • FFT_Demo/inc/stm3210b_lcd.h
  • FFT_Demo/inc/stm32f10x_it.h
  • FFT_Demo/inc/stm32f10x_conf.h
  • FFT_Demo/inc/fonts.h


STM32F10xxx DSP library firmware & FFT_Demo: DSP_Lib Directory Content

DSP_Lib Directory Content

src

  • STM32F10x_DSP_Lib/src/iir_stm32.c
  • STM32F10x_DSP_Lib/src/PID_C_stm32.c
inc
  • STM32F10x_DSP_Lib/inc/stm32_dsp.h
  • STM32F10x_DSP_Lib/inc/table_fft.h


STM32F10xxx DSP library firmware & FFT_Demo: FFT_Demo Readme File

FFT_Demo Readme File

  ******************** (C) COPYRIGHT 2009 STMicroelectronics *******************
  * @file FFT_Demo/readme.txt
  * @author   MCD Application Team
  * @version  V2.0.0
  * @date     04/27/2009
  * @brief    Description of the STM32F10xxx DSP library.
  ******************************************************************************
  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  ******************************************************************************

Description
This firmware contains a DSP library and a demo running on the STM3210B-EVAL board.

The DSP library is s suite of common DSP functions, which are:

  • PID controller.
  • Complex 16-bit radix-4 FFT, 64, 256 and 1024 points.
  • FIR 16-bit filter.
  • IIR Direct Form I 16-bit filter.
  • IIR Canonical Form 16-bit filter. For more information, please refer to the user manual provided with this firmware.

The demo illustrates the use of the FFT function of the DSP library. It consists on applying the 64-points FFT transformation to two variable frequency waves, which are a sinus and a dual sinus. The waves and the result of the FFT transformation are displayed on the LCD of the STM3210B-EVAL board.

Directory contents
  • inc: containing the user header files
    • FFT_Demo/inc/stm32f10x_conf.h Library Configuration files
    • FFT_Demo/inc/stm32f10x_it.h Interrupt handlers header files
    • FFT_Demo/inc/stm3210b_lcd.h LCD firmware driver header file
    • FFT_Demo/inc/fonts.h LCD fonts size definition

  • src: containg the user source files
    • FFT_Demo/src/stm3210b_lcd.c LCD driver for Liquid Crystal Display Module of STM3210B-EVAL board
    • FFT_Demo/src/stm32f10x_it.c Interrupt handlers
    • FFT_Demo/src/main.c Main program

Hardware and Software environment
  • This example runs on STM32F10x High-Density, STM32F10x Medium-Density and STM32F10x Low-Density Devices.

  • This example has been tested with STMicroelectronics STM3210B-EVAL evaluation boards and can be easily tailored to any other supported device and development board.

  • The DSP library is fully independant from hardware.

How to use it ?
In order to load the FFT Demo code, you have do the following:

  • EWARM:
    • Open the FFT_Demo.eww workspace
    • In the workspace toolbar select the project config:
      • STM3210B-EVAL: to configure the project for STM32 High-density devices
    • Rebuild all files: Project->Rebuild all
    • Load project image: Project->Debug
    • Run program: Debug->Go(F5)

  • RIDE
    • Open the FFT_Demo.rprj project
    • In the configuration toolbar(Project->properties) select the project config:
      • STM3210B-EVAL: to configure the project for STM32 High-density devices
    • Rebuild all files: Project->build project
    • Load project image: Debug->start(ctrl+D)
    • Run program: Debug->Run(ctrl+F9)
      Note:
  • When activating the "assert" function in debug mode, this application may not work properly with RIDE toolchain.

  • RVMDK
    • Open the FFT_Demo.Uv2 project
    • In the build toolbar select the project config:
      • STM3210B-EVAL: to configure the project for STM32 High-density devices
    • Rebuild all files: Project->Rebuild all target files
    • Load project image: Debug->Start/Stop Debug Session
    • Run program: Debug->Run (F5)

Note:
  • Low-density devices are STM32F101xx and STM32F103xx microcontrollers where the Flash memory density ranges between 16 and 32 Kbytes.
  • Medium-density devices are STM32F101xx and STM32F103xx microcontrollers where the Flash memory density ranges between 32 and 128 Kbytes.
  • High-density devices are STM32F101xx and STM32F103xx microcontrollers where the Flash memory density ranges between 256 and 512 Kbytes.

© COPYRIGHT 2009 STMicroelectronics

STM32F10x Standard Peripherals Library: Footer

For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit www.st.com/STM32


STM32F10xxx DSP library firmware & FFT_Demo: FFT_Demo

FFT_Demo

Defines

#define | DISPLAY_LEFT 150
#define | DISPLAY_RIGHT 310
#define | LCD_HX8312 0x8312
#define | LCD_ILI9320 0x9320
#define | LCD_READ_REG 0x03
#define | LCD_SPFD5408 0x5408
#define | LCD_WRITE_REG 0x02
#define | NPT 64
#define | PI2 6.28318530717959
#define | READ_STATUS 0x01
#define | SET_INDEX 0x00
#define | START_BYTE 0x70

Functions

void | BusFault_Handler (void)
This function handles Bus Fault exception.
void | DebugMon_Handler (void)
This function handles Debug Monitor exception.
void | Delay (uint32_t nCount)
Inserts a delay time.
void | displayPowerMag (uint32_t DisplayPos, uint32_t scale)
Displays the power magnitude array following a FFT.
void | DisplayTitle (void)
Displays the initial menu and then background frame.
void | DSPDemoInit (void)
Initializes the DSP lib demo (clock, peripherals and LCD).
void | HardFault_Handler (void)
This function handles Hard Fault exception.
void | In_displayWaveform (uint32_t DisplayPos)
Displays the input array before filtering.
void | LCD_Clear (uint16_t Color)
Clears the hole LCD.
void | LCD_ClearLine (uint8_t Line)
Clears the selected line.
void | LCD_CtrlLinesConfig (void)
Configures LCD control lines in Output Push-Pull mode.
void | LCD_CtrlLinesWrite (GPIO_TypeDef *GPIOx, uint16_t CtrlPins, BitAction BitVal)
Sets or reset LCD control lines.
void | LCD_DisplayChar (uint8_t Line, uint16_t Column, uint8_t Ascii)
Displays one character (16dots width, 24dots height).
void | LCD_DisplayOff (void)
Disables the Display.
void | LCD_DisplayOn (void)
Enables the Display.
void | LCD_DisplayStringLine (uint8_t Line, uint8_t *ptr)
Displays a maximum of 20 char on the LCD.
void | LCD_DrawChar (uint8_t Xpos, uint16_t Ypos, const uint16_t *c)
Draws a character on LCD.
void | LCD_DrawCircle (uint8_t Xpos, uint16_t Ypos, uint16_t Radius)
Displays a circle.
void | LCD_DrawLine (uint8_t Xpos, uint16_t Ypos, uint16_t Length, uint8_t Direction)
Displays a line.
void | LCD_DrawMonoPict (const uint32_t *Pict)
Displays a monocolor picture.
void | LCD_DrawRect (uint8_t Xpos, uint16_t Ypos, uint8_t Height, uint16_t Width)
Displays a rectangle.
void | LCD_nCS_StartByte (uint8_t Start_Byte)
Reset LCD control line(/CS) and Send Start-Byte.
void | LCD_PowerOn (void)
Power on the LCD.
uint16_t | LCD_ReadReg (uint8_t LCD_Reg)
Reads the selected LCD Register.
void | LCD_SetBackColor (__IO uint16_t Color)
Sets the Background color.
void | LCD_SetCursor (uint8_t Xpos, uint16_t Ypos)
Sets the cursor position.
void | LCD_SetDisplayWindow (uint8_t Xpos, uint16_t Ypos, uint8_t Height, uint16_t Width)
Sets a display window.
void | LCD_SetTextColor (__IO uint16_t Color)
Sets the Text color.
void | LCD_Setup (void)
Setups the LCD.
void | LCD_SPIConfig (void)
Configures the SPI2 interface.
void | LCD_WindowModeDisable (void)
Disables LCD Window mode.
void | LCD_WriteRAM (uint16_t RGB_Code)
Writes to the LCD RAM.
void | LCD_WriteRAM_Prepare (void)
Prepare to write to the LCD RAM.
void | LCD_WriteRAMWord (uint16_t RGB_Code)
Writes 1 word to the LCD RAM.
void | LCD_WriteReg (uint8_t LCD_Reg, uint16_t LCD_RegValue)
Writes to the selected LCD register.
static void | LCD_WriteRegHX8312 (uint8_t LCD_Reg, uint8_t LCD_RegValue)
Writes to the selected LCD HX8312 register.
static void | LCD_WriteRegILI9320 (uint8_t LCD_Reg, uint16_t LCD_RegValue)
Writes to the selected LCD ILI9320 register.
void | LCD_WriteRegIndex (uint8_t LCD_Reg)
Writes index to select the LCD register.
int | main (void)
Main program.
void | MemManage_Handler (void)
This function handles Memory Manage exception.
void | MyDualSweep (uint32_t freqinc1, uint32_t freqinc2)
Produces a combination of two sinewaves as input signal.
void | MygSin (long nfill, long Fs, long Freq1, long Freq2, long Ampli)
Produces a combination of two sinewaves as input signal.
void | NMI_Handler (void)
This function handles NMI exception.
void | onesided (long nfill)
Removes the aliased part of the spectrum (not tested).
void | Out_displayWaveform (uint32_t DisplayPos)
Displays the output array after filtering.
void | PendSV_Handler (void)
This function handles PendSVC exception.
void | powerMag (long nfill, char *strPara)
Compute power magnitude of the FFT transform.
void | STM3210B_LCD_Init (void)
Initializes the LCD.
void | SVC_Handler (void)
This function handles SVCall exception.
void | SysTick_Handler (void)
This function handles SysTick Handler.
void | UsageFault_Handler (void)
This function handles Usage Fault exception.

Variables

static __IO uint16_t | BackColor = 0xFFFF
long | lBUFIN [NPT]
long | lBUFMAG [NPT+NPT/2]
long | lBUFOUT [NPT]
static __IO uint32_t | LCDType = LCD_ILI9320
uint16_t | TableFFT []
static __IO uint16_t | TextColor = 0x0000
volatile uint32_t | TimingDelay = 0
volatile uint32_t | TimingDelay

Define Documentation

#define DISPLAY_LEFT 150

Definition at line 41 of file main.c.

Referenced by MyDualSweep().

#define DISPLAY_RIGHT 310

Definition at line 40 of file main.c.

Referenced by MyDualSweep().

#define LCD_HX8312 0x8312

Definition at line 37 of file stm3210b_lcd.c.

Referenced by LCD_DisplayOff(), LCD_DisplayOn(), LCD_DrawCircle(), LCD_DrawLine(), LCD_PowerOn(), LCD_SetCursor(), LCD_SetDisplayWindow(), LCD_Setup(), LCD_SPIConfig(), LCD_WindowModeDisable(), LCD_WriteRAM(), LCD_WriteReg(), and STM3210B_LCD_Init().

#define LCD_ILI9320 0x9320

Definition at line 36 of file stm3210b_lcd.c.

Referenced by LCD_Clear(), LCD_DisplayOff(), LCD_DisplayOn(), LCD_DrawChar(), LCD_DrawCircle(), LCD_DrawLine(), LCD_DrawMonoPict(), LCD_PowerOn(), LCD_SetCursor(), LCD_SetDisplayWindow(), LCD_Setup(), LCD_SPIConfig(), LCD_WindowModeDisable(), LCD_WriteRAM(), LCD_WriteReg(), and STM3210B_LCD_Init().

#define LCD_READ_REG 0x03

Definition at line 44 of file stm3210b_lcd.c.

Referenced by LCD_ReadReg().

#define LCD_SPFD5408 0x5408

Definition at line 38 of file stm3210b_lcd.c.

Referenced by LCD_Clear(), LCD_DisplayOff(), LCD_DisplayOn(), LCD_DrawChar(), LCD_DrawCircle(), LCD_DrawLine(), LCD_DrawMonoPict(), LCD_PowerOn(), LCD_SetCursor(), LCD_SetDisplayWindow(), LCD_Setup(), LCD_SPIConfig(), LCD_WindowModeDisable(), LCD_WriteRAM(), LCD_WriteReg(), and STM3210B_LCD_Init().

#define LCD_WRITE_REG 0x02

Definition at line 43 of file stm3210b_lcd.c.

Referenced by LCD_WriteRAM_Prepare(), and LCD_WriteRegILI9320().

#define NPT 64

Definition at line 39 of file main.c.

Referenced by MyDualSweep().

#define PI2 6.28318530717959

Definition at line 37 of file main.c.

Referenced by MygSin().

#define READ_STATUS 0x01

Definition at line 42 of file stm3210b_lcd.c.

#define SET_INDEX 0x00

Definition at line 41 of file stm3210b_lcd.c.

Referenced by LCD_WriteRegIndex().

#define START_BYTE 0x70

Definition at line 40 of file stm3210b_lcd.c.

Referenced by LCD_ReadReg(), LCD_WriteRAM_Prepare(), LCD_WriteRegILI9320(), and LCD_WriteRegIndex().

Function Documentation

void BusFault_Handler ( void )

This function handles Bus Fault exception.

Parameters:
None
Return values:
: None

Definition at line 85 of file stm32f10x_it.c.

void DebugMon_Handler ( void )

This function handles Debug Monitor exception.

Parameters:
None
Return values:
: None

Definition at line 120 of file stm32f10x_it.c.

void Delay ( uint32_t nCount )

Inserts a delay time.

Parameters:
ount,: specifies the delay time length (time base 10 ms).
Return values:
: None

Definition at line 332 of file main.c.

References TimingDelay.

Referenced by DisplayTitle(), LCD_DisplayOff(), LCD_DisplayOn(), LCD_PowerOn(), and LCD_Setup().

void displayPowerMag | ( | uint32_t | DisplayPos,
 |  | uint32_t | scale
 | ) |  |

Displays the power magnitude array following a FFT.

Parameters:
splayPos indicates the beginning Y address on LCD : scale allows to normalize the result for optimal display
Return values:
: None

Definition at line 274 of file main.c.

References lBUFMAG, LCD_DrawLine(), LCD_SetTextColor(), Red, Vertical, and White.

Referenced by MyDualSweep().

void DisplayTitle ( void )

Displays the initial menu and then background frame.

Parameters:
None
Return values:
: None

Definition at line 300 of file main.c.

References Delay(), LCD_DisplayStringLine(), Line0, Line1, and Line9.

Referenced by main().

void DSPDemoInit ( void )

Initializes the DSP lib demo (clock, peripherals and LCD).

Parameters:
None
Return values:
: None

Definition at line 360 of file main.c.

References Black, LCD_Clear(), LCD_SetBackColor(), LCD_SetTextColor(), STM3210B_LCD_Init(), and White.

Referenced by main().

void HardFault_Handler ( void )

This function handles Hard Fault exception.

Parameters:
None
Return values:
: None

Definition at line 59 of file stm32f10x_it.c.

void In_displayWaveform ( uint32_t DisplayPos )

Displays the input array before filtering.

Parameters:
splayPos indicates the beginning Y address on LCD
Return values:
: None

Definition at line 213 of file main.c.

References Black, lBUFIN, LCD_DrawLine(), LCD_SetTextColor(), Vertical, and White.

Referenced by MyDualSweep().

void LCD_Clear ( uint16_t Color )

Clears the hole LCD.

Parameters:
lor,: the color of the background.
Return values:
: None

Definition at line 426 of file stm3210b_lcd.c.

References CtrlPin_NCS, LCD_CtrlLinesWrite(), LCD_ILI9320, LCD_SetCursor(), LCD_SPFD5408, LCD_WriteRAM(), LCD_WriteRAM_Prepare(), and LCDType.

Referenced by DSPDemoInit().

void LCD_ClearLine ( uint8_t Line )

Clears the selected line.

Parameters:
Line,: the Line to be cleared. This parameter can be one of the following values:
  • Linex: where x can be 0..9
Return values:
: None

Definition at line 414 of file stm3210b_lcd.c.

References LCD_DisplayStringLine().

void LCD_CtrlLinesConfig ( void )

Configures LCD control lines in Output Push-Pull mode.

Parameters:
None
Return values:
: None

Definition at line 1214 of file stm3210b_lcd.c.

References CtrlPin_NWR, CtrlPin_RS, and LCD_CtrlLinesWrite().

Referenced by LCD_Setup().

void LCD_CtrlLinesWrite | ( | GPIO_TypeDef * | GPIOx,
 |  | uint16_t | CtrlPins,
 |  | BitAction | BitVal
 | ) |  |

Sets or reset LCD control lines.

Parameters:
GPIOx,: where x can be B or D to select the GPIO peripheral.
CtrlPins,: the Control line. This parameter can be:
CtrlPin_NCS,: Chip Select pin (PB.02)
CtrlPin_NWR,: Read/Write Selection pin (PD.15)
CtrlPin_RS,: Register/RAM Selection pin (PD.07)
BitVal,: specifies the value to be written to the selected bit. This parameter can be:
Bit_RESET,: to clear the port pin
Bit_SET,: to set the port pin
Return values:
: None

Definition at line 1247 of file stm3210b_lcd.c.

Referenced by LCD_Clear(), LCD_CtrlLinesConfig(), LCD_DrawChar(), LCD_DrawLine(), LCD_DrawMonoPict(), LCD_nCS_StartByte(), LCD_ReadReg(), LCD_WriteRAM(), LCD_WriteRAMWord(), LCD_WriteRegHX8312(), LCD_WriteRegILI9320(), and LCD_WriteRegIndex().

void LCD_DisplayChar | ( | uint8_t | Line,
 |  | uint16_t | Column,
 |  | uint8_t | Ascii
 | ) |  |

Displays one character (16dots width, 24dots height).

Parameters:
Line,: the Line where to display the character shape . This parameter can be one of the following values:
  • Linex: where x can be 0..9
Column,: start column address.
Ascii,: character ascii code, must be between 0x20 and 0x7E.
Return values:
: None

Definition at line 528 of file stm3210b_lcd.c.

References ASCII_Table, and LCD_DrawChar().

Referenced by LCD_DisplayStringLine().

void LCD_DisplayOff ( void )

Disables the Display.

Parameters:
None
Return values:
: None

Definition at line 1191 of file stm3210b_lcd.c.

References Delay(), LCD_HX8312, LCD_ILI9320, LCD_SPFD5408, LCD_WriteReg(), LCDType, R0, R59, and R7.

void LCD_DisplayOn ( void )

Enables the Display.

Parameters:
None
Return values:
: None

Definition at line 1164 of file stm3210b_lcd.c.

References Delay(), LCD_HX8312, LCD_ILI9320, LCD_SPFD5408, LCD_WriteReg(), LCDType, R0, R1, R5, R59, and R7.

void LCD_DisplayStringLine | ( | uint8_t | Line,
 |  | uint8_t * | ptr
 | ) |  |

Displays a maximum of 20 char on the LCD.

Parameters:
Line,: the Line where to display the character shape . This parameter can be one of the following values:
  • Linex: where x can be 0..9
*ptr,: pointer to string to display on LCD.
Return values:
: None

Definition at line 544 of file stm3210b_lcd.c.

References LCD_DisplayChar().

Referenced by DisplayTitle(), and LCD_ClearLine().

void LCD_DrawChar | ( | uint8_t | Xpos,
 |  | uint16_t | Ypos,
 |  | const uint16_t * | c
 | ) |  |

Draws a character on LCD.

Parameters:
Xpos,: the Line where to display the character shape. This parameter can be one of the following values:
Linex,: where x can be 0..9
Ypos,: start column address.
c,: pointer to the character data.
Return values:
: None

Definition at line 482 of file stm3210b_lcd.c.

References BackColor, CtrlPin_NCS, LCD_CtrlLinesWrite(), LCD_ILI9320, LCD_SetCursor(), LCD_SPFD5408, LCD_WriteRAM(), LCD_WriteRAM_Prepare(), LCDType, and TextColor.

Referenced by LCD_DisplayChar().

void LCD_DrawCircle | ( | uint8_t | Xpos,
 |  | uint16_t | Ypos,
 |  | uint16_t | Radius
 | ) |  |

Displays a circle.

Parameters:
Xpos,: specifies the X position.
Ypos,: specifies the Y position.
Height,: display rectangle height.
Width,: display rectangle width.
Return values:
: None

Definition at line 719 of file stm3210b_lcd.c.

References LCD_HX8312, LCD_ILI9320, LCD_SetCursor(), LCD_SPFD5408, LCD_WriteRAM(), LCD_WriteRAMWord(), LCDType, and TextColor.

void LCD_DrawLine | ( | uint8_t | Xpos,
 |  | uint16_t | Ypos,
 |  | uint16_t | Length,
 |  | uint8_t | Direction
 | ) |  |

Displays a line.

Parameters:
Xpos,: specifies the X position.
Ypos,: specifies the Y position.
Length,: line length.
Direction,: line direction. This parameter can be one of the following values: Vertical or Horizontal.
Return values:
: None

Definition at line 651 of file stm3210b_lcd.c.

References CtrlPin_NCS, Horizontal, LCD_CtrlLinesWrite(), LCD_HX8312, LCD_ILI9320, LCD_SetCursor(), LCD_SPFD5408, LCD_WriteRAM(), LCD_WriteRAM_Prepare(), LCD_WriteRAMWord(), LCDType, and TextColor.

Referenced by displayPowerMag(), In_displayWaveform(), LCD_DrawRect(), and Out_displayWaveform().

void LCD_DrawMonoPict ( const uint32_t * Pict )

Displays a monocolor picture.

Parameters:
Pict,: pointer to the picture array.
Return values:
: None

Definition at line 824 of file stm3210b_lcd.c.

References BackColor, CtrlPin_NCS, LCD_CtrlLinesWrite(), LCD_ILI9320, LCD_SetCursor(), LCD_SPFD5408, LCD_WriteRAM(), LCD_WriteRAM_Prepare(), LCDType, and TextColor.

void LCD_DrawRect | ( | uint8_t | Xpos,
 |  | uint16_t | Ypos,
 |  | uint8_t | Height,
 |  | uint16_t | Width
 | ) |  |

Displays a rectangle.

Parameters:
Xpos,: specifies the X position.
Ypos,: specifies the Y position.
Height,: display rectangle height.
Width,: display rectangle width.
Return values:
: None

Definition at line 700 of file stm3210b_lcd.c.

References Horizontal, LCD_DrawLine(), and Vertical.

void LCD_nCS_StartByte ( uint8_t Start_Byte )

Reset LCD control line(/CS) and Send Start-Byte.

Parameters:
Start_Byte,: the Start-Byte to be sent
Return values:
: None

Definition at line 860 of file stm3210b_lcd.c.

References CtrlPin_NCS, and LCD_CtrlLinesWrite().

Referenced by LCD_ReadReg(), LCD_WriteRAM_Prepare(), LCD_WriteRegILI9320(), and LCD_WriteRegIndex().

void LCD_PowerOn ( void )

Power on the LCD.

Parameters:
None
Return values:
: None

Definition at line 1115 of file stm3210b_lcd.c.

References Delay(), LCD_HX8312, LCD_ILI9320, LCD_SPFD5408, LCD_WriteReg(), LCDType, R16, R17, R18, R19, R24, R27, R28, R30, R31, R32, R36, R41, and R7.

uint16_t LCD_ReadReg ( uint8_t LCD_Reg )

Reads the selected LCD Register.

Parameters:
None
Return values:
: LCD Register Value.

Definition at line 935 of file stm3210b_lcd.c.

References CtrlPin_NCS, LCD_CtrlLinesWrite(), LCD_nCS_StartByte(), LCD_READ_REG, LCD_WriteRegIndex(), and START_BYTE.

Referenced by STM3210B_LCD_Init().

void LCD_SetBackColor ( __IO uint16_t Color )

Sets the Background color.

Parameters:
Color,: specifies the Background color code RGB(5-6-5). LCD_DrawChar and LCD_DrawPicture functions.
Return values:
: None

Definition at line 400 of file stm3210b_lcd.c.

References BackColor.

Referenced by DSPDemoInit().

void LCD_SetCursor | ( | uint8_t | Xpos,
 |  | uint16_t | Ypos
 | ) |  |

Sets the cursor position.

Parameters:
Xpos,: specifies the X position.
Ypos,: specifies the Y position.
Return values:
: None

Definition at line 456 of file stm3210b_lcd.c.

References LCD_HX8312, LCD_ILI9320, LCD_SPFD5408, LCD_WriteReg(), LCDType, R32, R33, R66, R67, and R68.

Referenced by LCD_Clear(), LCD_DrawChar(), LCD_DrawCircle(), LCD_DrawLine(), LCD_DrawMonoPict(), and LCD_SetDisplayWindow().

void LCD_SetDisplayWindow | ( | uint8_t | Xpos,
 |  | uint16_t | Ypos,
 |  | uint8_t | Height,
 |  | uint16_t | Width
 | ) |  |

Sets a display window.

Parameters:
Xpos,: specifies the X buttom left position.
Ypos,: specifies the Y buttom left position.
Height,: display window height.
Width,: display window width.
Return values:
: None

Definition at line 573 of file stm3210b_lcd.c.

References LCD_HX8312, LCD_ILI9320, LCD_SetCursor(), LCD_SPFD5408, LCD_WriteReg(), LCDType, R1, R5, R69, R70, R71, R72, R73, R74, R80, R81, R82, and R83.

Referenced by LCD_WindowModeDisable().

void LCD_SetTextColor ( __IO uint16_t Color )

Sets the Text color.

Parameters:
Color,: specifies the Text color code RGB(5-6-5). and LCD_DrawPicture functions.
Return values:
: None

Definition at line 387 of file stm3210b_lcd.c.

References TextColor.

Referenced by displayPowerMag(), DSPDemoInit(), and In_displayWaveform().

void LCD_Setup ( void )

Setups the LCD.

Parameters:
None
Return values:
: None

Definition at line 65 of file stm3210b_lcd.c.

References Delay(), LCD_CtrlLinesConfig(), LCD_HX8312, LCD_ILI9320, LCD_SPFD5408, LCD_SPIConfig(), LCD_WriteReg(), LCDType, R0, R1, R10, R106, R118, R12, R128, R129, R13, R130, R131, R132, R133, R134, R135, R136, R137, R139, R14, R141, R143, R144, R145, R146, R147, R148, R149, R15, R150, R151, R152, R153, R154, R157, R16, R17, R18, R19, R192, R2, R20, R21, R22, R227, R229, R23, R231, R239, R24, R25, R26, R27, R28, R29, R3, R30, R31, R32, R33, R36, R37, R4, R40, R41, R43, R48, R49, R5, R50, R51, R52, R53, R54, R55, R56, R57, R59, R60, R61, R62, R63, R64, R65, R66, R67, R68, R69, R7, R70, R71, R72, R73, R74, R75, R76, R78, R79, R8, R80, R81, R82, R83, R9, R96, and R97.

Referenced by STM3210B_LCD_Init().

void LCD_SPIConfig ( void )

Configures the SPI2 interface.

Parameters:
None
Return values:
: None

Definition at line 1260 of file stm3210b_lcd.c.

References LCD_HX8312, LCD_ILI9320, LCD_SPFD5408, and LCDType.

Referenced by LCD_Setup().

void LCD_WindowModeDisable ( void )

Disables LCD Window mode.

Parameters:
None
Return values:
: None

Definition at line 625 of file stm3210b_lcd.c.

References LCD_HX8312, LCD_ILI9320, LCD_SetDisplayWindow(), LCD_SPFD5408, LCD_WriteReg(), LCDType, R1, R3, and R5.

void LCD_WriteRAM ( uint16_t RGB_Code )

Writes to the LCD RAM.

Parameters:
RGB_Code,: the pixel color in RGB mode (5-6-5).
Return values:
: None

Definition at line 1080 of file stm3210b_lcd.c.

References CtrlPin_NCS, CtrlPin_NWR, CtrlPin_RS, LCD_CtrlLinesWrite(), LCD_HX8312, LCD_ILI9320, LCD_SPFD5408, and LCDType.

Referenced by LCD_Clear(), LCD_DrawChar(), LCD_DrawCircle(), LCD_DrawLine(), LCD_DrawMonoPict(), and LCD_WriteRAMWord().

void LCD_WriteRAM_Prepare ( void )

Prepare to write to the LCD RAM.

Parameters:
None
Return values:
: None

Definition at line 1001 of file stm3210b_lcd.c.

References LCD_nCS_StartByte(), LCD_WRITE_REG, LCD_WriteRegIndex(), R34, and START_BYTE.

Referenced by LCD_Clear(), LCD_DrawChar(), LCD_DrawLine(), LCD_DrawMonoPict(), and LCD_WriteRAMWord().

void LCD_WriteRAMWord ( uint16_t RGB_Code )

Writes 1 word to the LCD RAM.

Parameters:
RGB_Code,: the pixel color in RGB mode (5-6-5).
Return values:
: None

Definition at line 1016 of file stm3210b_lcd.c.

References CtrlPin_NCS, LCD_CtrlLinesWrite(), LCD_WriteRAM(), and LCD_WriteRAM_Prepare().

Referenced by LCD_DrawCircle(), and LCD_DrawLine().

void LCD_WriteReg | ( | uint8_t | LCD_Reg,
 |  | uint16_t | LCD_RegValue
 | ) |  |

Writes to the selected LCD register.

Parameters:
LCD_Reg,: address of the selected register.
  • LCD_RegValue: value to write to the selected register.
Return values:
: None

Definition at line 1060 of file stm3210b_lcd.c.

References LCD_HX8312, LCD_ILI9320, LCD_SPFD5408, LCD_WriteRegHX8312(), LCD_WriteRegILI9320(), and LCDType.

Referenced by LCD_DisplayOff(), LCD_DisplayOn(), LCD_PowerOn(), LCD_SetCursor(), LCD_SetDisplayWindow(), LCD_Setup(), and LCD_WindowModeDisable().

static void LCD_WriteRegHX8312 | ( | uint8_t | LCD_Reg,
 |  | uint8_t | LCD_RegValue |
 | ) |  |  | [static]

Writes to the selected LCD HX8312 register.

Parameters:
LCD_Reg,: address of the selected register.
  • LCD_RegValue: value to write to the selected register.
Return values:
: None

Definition at line 1033 of file stm3210b_lcd.c.

References CtrlPin_NCS, CtrlPin_NWR, CtrlPin_RS, and LCD_CtrlLinesWrite().

Referenced by LCD_WriteReg().

static void LCD_WriteRegILI9320 | ( | uint8_t | LCD_Reg,
 |  | uint16_t | LCD_RegValue |
 | ) |  |  | [static]

Writes to the selected LCD ILI9320 register.

Parameters:
LCD_Reg,: address of the selected register.
  • LCD_RegValue: value to write to the selected register.
Return values:
: None

Definition at line 907 of file stm3210b_lcd.c.

References CtrlPin_NCS, LCD_CtrlLinesWrite(), LCD_nCS_StartByte(), LCD_WRITE_REG, LCD_WriteRegIndex(), and START_BYTE.

Referenced by LCD_WriteReg().

void LCD_WriteRegIndex ( uint8_t LCD_Reg )

Writes index to select the LCD register.

Parameters:
LCD_Reg,: address of the selected register.
Return values:
: None

Definition at line 878 of file stm3210b_lcd.c.

References CtrlPin_NCS, LCD_CtrlLinesWrite(), LCD_nCS_StartByte(), SET_INDEX, and START_BYTE.

Referenced by LCD_ReadReg(), LCD_WriteRAM_Prepare(), and LCD_WriteRegILI9320().

int main ( void )

Main program.

Parameters:
None
Return values:
: None

Definition at line 69 of file main.c.

References DisplayTitle(), DSPDemoInit(), and MyDualSweep().

void MemManage_Handler ( void )

This function handles Memory Manage exception.

Parameters:
None
Return values:
: None

Definition at line 72 of file stm32f10x_it.c.

void MyDualSweep | ( | uint32_t | freqinc1,
 |  | uint32_t | freqinc2
 | ) |  |

Produces a combination of two sinewaves as input signal.

Parameters:
eq1,: frequency increment for 1st sweep Freq2: frequency increment for 2nd sweep
Return values:
: None

Definition at line 89 of file main.c.

References cr4_fft_64_stm32(), DISPLAY_LEFT, DISPLAY_RIGHT, displayPowerMag(), In_displayWaveform(), lBUFIN, lBUFOUT, MygSin(), NPT, and powerMag().

Referenced by main().

void MygSin | ( | long | nfill,
 |  | long | Fs,
 |  | long | Freq1,
 |  | long | Freq2,
 |  | long | Ampli
 | ) |  |

Produces a combination of two sinewaves as input signal.

Parameters:
ill,: length of the array holding input signal Fs: sampling frequency Freq1: frequency of the 1st sinewave Freq2: frequency of the 2nd sinewave Ampli: scaling factor
Return values:
: None

Definition at line 137 of file main.c.

References lBUFIN, and PI2.

Referenced by MyDualSweep().

void NMI_Handler ( void )

This function handles NMI exception.

Parameters:
None
Return values:
: None

Definition at line 50 of file stm32f10x_it.c.

void onesided ( long nfill )

Removes the aliased part of the spectrum (not tested).

Parameters:
ill,: length of the array holding power mag
Return values:
: None

Definition at line 165 of file main.c.

References lBUFMAG.

Referenced by powerMag().

void Out_displayWaveform ( uint32_t DisplayPos )

Displays the output array after filtering.

Parameters:
splayPos indicates the beginning Y address on LCD
Return values:
: None

Definition at line 246 of file main.c.

References lBUFOUT, LCD_DrawLine(), and Vertical.

void PendSV_Handler ( void )

This function handles PendSVC exception.

Parameters:
None
Return values:
: None

Definition at line 129 of file stm32f10x_it.c.

void powerMag | ( | long | nfill,
 |  | char * | strPara
 | ) |  |

Compute power magnitude of the FFT transform.

Parameters:
ill,: length of the array holding power mag : strPara: if set to "1SIDED", removes aliases part of spectrum (not tested)
Return values:
: None

Definition at line 187 of file main.c.

References lBUFMAG, lBUFOUT, and onesided().

Referenced by MyDualSweep().

void STM3210B_LCD_Init ( void )

Initializes the LCD.

Parameters:
None
Return values:
: None

Definition at line 352 of file stm3210b_lcd.c.

References LCD_HX8312, LCD_ILI9320, LCD_ReadReg(), LCD_Setup(), LCD_SPFD5408, LCDType, and R0.

Referenced by DSPDemoInit().

void SVC_Handler ( void )

This function handles SVCall exception.

Parameters:
None
Return values:
: None

Definition at line 111 of file stm32f10x_it.c.

void SysTick_Handler ( void )

This function handles SysTick Handler.

Parameters:
None
Return values:
: None

Definition at line 138 of file stm32f10x_it.c.

References TimingDelay.

void UsageFault_Handler ( void )

This function handles Usage Fault exception.

Parameters:
None
Return values:
: None

Definition at line 98 of file stm32f10x_it.c.

Variable Documentation

__IO uint16_t BackColor = 0xFFFF [static]

Definition at line 49 of file stm3210b_lcd.c.

Referenced by LCD_DrawChar(), LCD_DrawMonoPict(), and LCD_SetBackColor().

long lBUFIN[NPT]

Definition at line 47 of file main.c.

Referenced by In_displayWaveform(), MyDualSweep(), and MygSin().

long lBUFMAG[NPT+NPT/2]

Definition at line 49 of file main.c.

Referenced by displayPowerMag(), onesided(), and powerMag().

long lBUFOUT[NPT]

Definition at line 48 of file main.c.

Referenced by MyDualSweep(), Out_displayWaveform(), and powerMag().

__IO uint32_t LCDType = LCD_ILI9320 [static]

Definition at line 50 of file stm3210b_lcd.c.

Referenced by LCD_Clear(), LCD_DisplayOff(), LCD_DisplayOn(), LCD_DrawChar(), LCD_DrawCircle(), LCD_DrawLine(), LCD_DrawMonoPict(), LCD_PowerOn(), LCD_SetCursor(), LCD_SetDisplayWindow(), LCD_Setup(), LCD_SPIConfig(), LCD_WindowModeDisable(), LCD_WriteRAM(), LCD_WriteReg(), and STM3210B_LCD_Init().

uint16_t TableFFT[]

Definition at line 30 of file table_fft.h.

__IO uint16_t TextColor = 0x0000 [static]

Definition at line 49 of file stm3210b_lcd.c.

Referenced by LCD_DrawChar(), LCD_DrawCircle(), LCD_DrawLine(), LCD_DrawMonoPict(), and LCD_SetTextColor().

volatile uint32_t TimingDelay = 0

Definition at line 37 of file stm32f10x_it.c.

Referenced by Delay(), and SysTick_Handler().

volatile uint32_t TimingDelay

Definition at line 37 of file stm32f10x_it.c.

Referenced by Delay(), and SysTick_Handler().


STM32F10xxx DSP library firmware & FFT_Demo: STM32F10x_DSP_Lib

STM32F10x_DSP_Lib

Functions

uint16_t | DoFullPID (uint16_t In, uint16_t Ref, uint16_t *Coeff)
PID in C, Error computed inside the routine.
uint16_t | DoPID (uint16_t Error, uint16_t *Coeff)
PID in C, Error computed outside the routine.
void | iir_biquad_stm32 (uint16_t *y, uint16_t *x, int16_t *IIRCoeff, uint16_t ny)
Canonique Form of 8th order IIR filter, factorized in 4 biquads sections in series.

Variables

uint16_t | IntTerm = 0
uint16_t | IntTerm_C = 0
uint16_t | PrevError = 0
uint16_t | PrevError_C = 0

Function Documentation

uint16_t DoFullPID | ( | uint16_t | In,
 |  | uint16_t | Ref,
 |  | uint16_t * | Coeff
 | ) |  |

PID in C, Error computed inside the routine.

Parameters:
: Input (measured value) Ref: reference (target value) Coeff: pointer to the coefficient table
Return values:
: PID output (command)

Definition at line 77 of file PID_C_stm32.c.

References IntTerm_C, and PrevError_C.

uint16_t DoPID | ( | uint16_t | Error,
 |  | uint16_t * | Coeff
 | ) |  |

PID in C, Error computed outside the routine.

Parameters:
ror,: difference between reference and measured value Coeff: pointer to the coefficient table
Return values:
: PID output (command)

Definition at line 50 of file PID_C_stm32.c.

References IntTerm_C, and PrevError_C.

void iir_biquad_stm32 | ( | uint16_t * | y,
 |  | uint16_t * | x,
 |  | int16_t * | IIRCoeff,
 |  | uint16_t | ny
 | ) |  |

Canonique Form of 8th order IIR filter, factorized in 4 biquads sections in series.

Parameters:
y,: Output array .
x,: Input array
IIRCoeff,: IIR Filter Coefficients, an array of 20 shorts
ny,: the number of output samples
Return values:
: None

Canonic form

Definition at line 49 of file iir_stm32.c.

Variable Documentation

uint16_t IntTerm = 0

Definition at line 36 of file PID_C_stm32.c.

uint16_t IntTerm_C = 0

Definition at line 37 of file PID_C_stm32.c.

Referenced by DoFullPID(), and DoPID().

uint16_t PrevError = 0

Definition at line 36 of file PID_C_stm32.c.

uint16_t PrevError_C = 0

Definition at line 37 of file PID_C_stm32.c.

Referenced by DoFullPID(), and DoPID().


STM32F10xxx DSP library firmware & FFT_Demo: COEFS Struct Reference

  • Data Structure Index
  • Data Fields

COEFS Struct Reference

#include <stm32_dsp.h>

Data Fields

uint16_t * | h
uint32_t | nh

Detailed Description

Definition at line 32 of file stm32_dsp.h.

Field Documentation

uint16_t* COEFS::h

Definition at line 33 of file stm32_dsp.h.

uint32_t COEFS::nh

Definition at line 34 of file stm32_dsp.h.

The documentation for this struct was generated from the following file:
  • stm32_dsp.h


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • Data Structure Index
  • Data Fields
  • All
  • Variables
Here is a list of all struct and union fields with links to the structures/unions they belong to:

  • h : COEFS
  • nh : COEFS


STM32F10xxx DSP library firmware & FFT_Demo: fonts.h File Reference

  • File List
  • Globals
STM32F10x_DSP_Lib_V2.0.0 » Project » FFT_Demo » inc

fonts.h File Reference

This file contains all the LCD fonts size definition. More...

#include "stm32f10x.h"

Go to the source code of this file.

Variables

const uint16_t ASCII_Table []

Detailed Description

This file contains all the LCD fonts size definition.

Author:
MCD Application Team
Version:
V2.0.0
Date:
04/27/2009
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2009 STMicroelectronics

Definition in file fonts.h.

Variable Documentation

const uint16_t ASCII_Table[]

Definition at line 33 of file fonts.h.

Referenced by LCD_DisplayChar().


STM32F10xxx DSP library firmware & FFT_Demo: iir_stm32.c File Reference

STM32F10x_DSP_Lib_V2.0.0 » Libraries » STM32F10x_DSP_Lib » src

iir_stm32.c File Reference

This source file contains IIR functions in C. More...

#include "stm32_dsp.h"
#include "stm32f10x.h"

Go to the source code of this file.

Functions

void iir_biquad_stm32 (uint16_t *y, uint16_t *x, int16_t *IIRCoeff, uint16_t ny)
Canonique Form of 8th order IIR filter, factorized in 4 biquads sections in series.

Detailed Description

This source file contains IIR functions in C.

Author:
MCD Application Team
Version:
V2.0.0
Date:
04/27/2009
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2009 STMicroelectronics

Definition in file iir_stm32.c.


STM32F10xxx DSP library firmware & FFT_Demo: main.c File Reference

STM32F10x_DSP_Lib_V2.0.0 » Project » FFT_Demo » src

main.c File Reference

Main program body. More...

#include "stm32f10x.h"
#include <math.h>
#include "stm3210b_lcd.h"
#include "stm32_dsp.h"
#include "table_fft.h"

Go to the source code of this file.

Defines

#define | DISPLAY_LEFT 150
#define | DISPLAY_RIGHT 310
#define | NPT 64
#define | PI2 6.28318530717959

Functions

void | Delay (uint32_t nCount)
Inserts a delay time.
void | displayPowerMag (uint32_t DisplayPos, uint32_t scale)
Displays the power magnitude array following a FFT.
void | DisplayTitle (void)
Displays the initial menu and then background frame.
void | DSPDemoInit (void)
Initializes the DSP lib demo (clock, peripherals and LCD).
void | In_displayWaveform (uint32_t DisplayPos)
Displays the input array before filtering.
int | main (void)
Main program.
void | MyDualSweep (uint32_t freqinc1, uint32_t freqinc2)
Produces a combination of two sinewaves as input signal.
void | MygSin (long nfill, long Fs, long Freq1, long Freq2, long Ampli)
Produces a combination of two sinewaves as input signal.
void | onesided (long nfill)
Removes the aliased part of the spectrum (not tested).
void | Out_displayWaveform (uint32_t DisplayPos)
Displays the output array after filtering.
void | powerMag (long nfill, char *strPara)
Compute power magnitude of the FFT transform.

Variables

long | lBUFIN [NPT]
long | lBUFMAG [NPT+NPT/2]
long | lBUFOUT [NPT]
uint16_t | TableFFT []
volatile uint32_t | TimingDelay

Detailed Description

Main program body.

Author:
MCD Application Team
Version:
V2.0.0
Date:
04/27/2009
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2009 STMicroelectronics

Definition in file main.c.


STM32F10xxx DSP library firmware & FFT_Demo: PID_C_stm32.c File Reference

STM32F10x_DSP_Lib_V2.0.0 » Libraries » STM32F10x_DSP_Lib » src

PID_C_stm32.c File Reference

This source file contains code PID controller. More...

#include "stm32f10x.h"
#include "stm32_dsp.h"

Go to the source code of this file.

Functions

uint16_t | DoFullPID (uint16_t In, uint16_t Ref, uint16_t *Coeff)
PID in C, Error computed inside the routine.
uint16_t | DoPID (uint16_t Error, uint16_t *Coeff)
PID in C, Error computed outside the routine.

Variables

uint16_t | IntTerm = 0
uint16_t | IntTerm_C = 0
uint16_t | PrevError = 0
uint16_t | PrevError_C = 0

Detailed Description

This source file contains code PID controller.

Author:
MCD Application Team
Version:
V2.0.0
Date:
04/27/2009
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2009 STMicroelectronics

Definition in file PID_C_stm32.c.


STM32F10xxx DSP library firmware & FFT_Demo: stm3210b_lcd.c File Reference

STM32F10x_DSP_Lib_V2.0.0 » Project » FFT_Demo » src

stm3210b_lcd.c File Reference

This file includes the LCD driver for AM-240320LTNQW00H (LCD_HX8312), AM-240320L8TNQW00H (LCD_ILI9320), AM-240320LDTNQW00H (LCD_SPFD5408B) Liquid Crystal Display Module of STM3210B-EVAL board. More...

#include "stm3210b_lcd.h"
#include "fonts.h"

Go to the source code of this file.

Defines

#define | LCD_HX8312 0x8312
#define | LCD_ILI9320 0x9320
#define | LCD_READ_REG 0x03
#define | LCD_SPFD5408 0x5408
#define | LCD_WRITE_REG 0x02
#define | READ_STATUS 0x01
#define | SET_INDEX 0x00
#define | START_BYTE 0x70

Functions

void | LCD_Clear (uint16_t Color)
Clears the hole LCD.
void | LCD_ClearLine (uint8_t Line)
Clears the selected line.
void | LCD_CtrlLinesConfig (void)
Configures LCD control lines in Output Push-Pull mode.
void | LCD_CtrlLinesWrite (GPIO_TypeDef *GPIOx, uint16_t CtrlPins, BitAction BitVal)
Sets or reset LCD control lines.
void | LCD_DisplayChar (uint8_t Line, uint16_t Column, uint8_t Ascii)
Displays one character (16dots width, 24dots height).
void | LCD_DisplayOff (void)
Disables the Display.
void | LCD_DisplayOn (void)
Enables the Display.
void | LCD_DisplayStringLine (uint8_t Line, uint8_t *ptr)
Displays a maximum of 20 char on the LCD.
void | LCD_DrawChar (uint8_t Xpos, uint16_t Ypos, const uint16_t *c)
Draws a character on LCD.
void | LCD_DrawCircle (uint8_t Xpos, uint16_t Ypos, uint16_t Radius)
Displays a circle.
void | LCD_DrawLine (uint8_t Xpos, uint16_t Ypos, uint16_t Length, uint8_t Direction)
Displays a line.
void | LCD_DrawMonoPict (const uint32_t *Pict)
Displays a monocolor picture.
void | LCD_DrawRect (uint8_t Xpos, uint16_t Ypos, uint8_t Height, uint16_t Width)
Displays a rectangle.
void | LCD_nCS_StartByte (uint8_t Start_Byte)
Reset LCD control line(/CS) and Send Start-Byte.
void | LCD_PowerOn (void)
Power on the LCD.
uint16_t | LCD_ReadReg (uint8_t LCD_Reg)
Reads the selected LCD Register.
void | LCD_SetBackColor (__IO uint16_t Color)
Sets the Background color.
void | LCD_SetCursor (uint8_t Xpos, uint16_t Ypos)
Sets the cursor position.
void | LCD_SetDisplayWindow (uint8_t Xpos, uint16_t Ypos, uint8_t Height, uint16_t Width)
Sets a display window.
void | LCD_SetTextColor (__IO uint16_t Color)
Sets the Text color.
void | LCD_Setup (void)
Setups the LCD.
void | LCD_SPIConfig (void)
Configures the SPI2 interface.
void | LCD_WindowModeDisable (void)
Disables LCD Window mode.
void | LCD_WriteRAM (uint16_t RGB_Code)
Writes to the LCD RAM.
void | LCD_WriteRAM_Prepare (void)
Prepare to write to the LCD RAM.
void | LCD_WriteRAMWord (uint16_t RGB_Code)
Writes 1 word to the LCD RAM.
void | LCD_WriteReg (uint8_t LCD_Reg, uint16_t LCD_RegValue)
Writes to the selected LCD register.
static void | LCD_WriteRegHX8312 (uint8_t LCD_Reg, uint8_t LCD_RegValue)
Writes to the selected LCD HX8312 register.
static void | LCD_WriteRegILI9320 (uint8_t LCD_Reg, uint16_t LCD_RegValue)
Writes to the selected LCD ILI9320 register.
void | LCD_WriteRegIndex (uint8_t LCD_Reg)
Writes index to select the LCD register.
void | STM3210B_LCD_Init (void)
Initializes the LCD.

Variables

static __IO uint16_t | BackColor = 0xFFFF
static __IO uint32_t | LCDType = LCD_ILI9320
static __IO uint16_t | TextColor = 0x0000

Detailed Description

This file includes the LCD driver for AM-240320LTNQW00H (LCD_HX8312), AM-240320L8TNQW00H (LCD_ILI9320), AM-240320LDTNQW00H (LCD_SPFD5408B) Liquid Crystal Display Module of STM3210B-EVAL board.

Author:
MCD Application Team
Version:
V2.0.0
Date:
04/27/2009
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2009 STMicroelectronics

Definition in file stm3210b_lcd.c.


STM32F10xxx DSP library firmware & FFT_Demo: stm3210b_lcd.h File Reference

STM32F10x_DSP_Lib_V2.0.0 » Project » FFT_Demo » inc

stm3210b_lcd.h File Reference

This file contains all the functions prototypes for the stm3210b_lcd firmware driver. More...

#include "stm32f10x.h"

Go to the source code of this file.

Defines

#define | Black 0x0000
#define | Blue 0x001F
#define | Blue2 0x051F
#define | CtrlPin_NCS GPIO_Pin_2
#define | CtrlPin_NWR GPIO_Pin_15
#define | CtrlPin_RS GPIO_Pin_7
#define | Cyan 0x7FFF
#define | Green 0x07E0
#define | Grey 0xF7DE
#define | Horizontal 0x00
#define | Line0 0
#define | Line1 24
#define | Line2 48
#define | Line3 72
#define | Line4 96
#define | Line5 120
#define | Line6 144
#define | Line7 168
#define | Line8 192
#define | Line9 216
#define | Magenta 0xF81F
#define | R0 0x00
#define | R1 0x01
#define | R10 0x0A
#define | R106 0x6A
#define | R118 0x76
#define | R12 0x0C
#define | R128 0x80
#define | R129 0x81
#define | R13 0x0D
#define | R130 0x82
#define | R131 0x83
#define | R132 0x84
#define | R133 0x85
#define | R134 0x86
#define | R135 0x87
#define | R136 0x88
#define | R137 0x89
#define | R139 0x8B
#define | R14 0x0E
#define | R140 0x8C
#define | R141 0x8D
#define | R143 0x8F
#define | R144 0x90
#define | R145 0x91
#define | R146 0x92
#define | R147 0x93
#define | R148 0x94
#define | R149 0x95
#define | R15 0x0F
#define | R150 0x96
#define | R151 0x97
#define | R152 0x98
#define | R153 0x99
#define | R154 0x9A
#define | R157 0x9D
#define | R16 0x10
#define | R17 0x11
#define | R18 0x12
#define | R19 0x13
#define | R192 0xC0
#define | R193 0xC1
#define | R2 0x02
#define | R20 0x14
#define | R21 0x15
#define | R22 0x16
#define | R227 0xE3
#define | R229 0xE5
#define | R23 0x17
#define | R231 0xE7
#define | R239 0xEF
#define | R24 0x18
#define | R25 0x19
#define | R26 0x1A
#define | R27 0x1B
#define | R28 0x1C
#define | R29 0x1D
#define | R3 0x03
#define | R30 0x1E
#define | R31 0x1F
#define | R32 0x20
#define | R33 0x21
#define | R34 0x22
#define | R36 0x24
#define | R37 0x25
#define | R4 0x04
#define | R40 0x28
#define | R41 0x29
#define | R43 0x2B
#define | R45 0x2D
#define | R48 0x30
#define | R49 0x31
#define | R5 0x05
#define | R50 0x32
#define | R51 0x33
#define | R52 0x34
#define | R53 0x35
#define | R54 0x36
#define | R55 0x37
#define | R56 0x38
#define | R57 0x39
#define | R59 0x3B
#define | R6 0x06
#define | R60 0x3C
#define | R61 0x3D
#define | R62 0x3E
#define | R63 0x3F
#define | R64 0x40
#define | R65 0x41
#define | R66 0x42
#define | R67 0x43
#define | R68 0x44
#define | R69 0x45
#define | R7 0x07
#define | R70 0x46
#define | R71 0x47
#define | R72 0x48
#define | R73 0x49
#define | R74 0x4A
#define | R75 0x4B
#define | R76 0x4C
#define | R77 0x4D
#define | R78 0x4E
#define | R79 0x4F
#define | R8 0x08
#define | R80 0x50
#define | R81 0x51
#define | R82 0x52
#define | R83 0x53
#define | R9 0x09
#define | R96 0x60
#define | R97 0x61
#define | Red 0xF800
#define | Vertical 0x01
#define | White 0xFFFF
#define | Yellow 0xFFE0

Functions

void | Delay (uint32_t nCount)
Inserts a delay time.
void | LCD_Clear (uint16_t Color)
Clears the hole LCD.
void | LCD_ClearLine (uint8_t Line)
Clears the selected line.
void | LCD_CtrlLinesConfig (void)
Configures LCD control lines in Output Push-Pull mode.
void | LCD_CtrlLinesWrite (GPIO_TypeDef *GPIOx, uint16_t CtrlPins, BitAction BitVal)
Sets or reset LCD control lines.
void | LCD_DisplayChar (uint8_t Line, uint16_t Column, uint8_t Ascii)
Displays one character (16dots width, 24dots height).
void | LCD_DisplayOff (void)
Disables the Display.
void | LCD_DisplayOn (void)
Enables the Display.
void | LCD_DisplayStringLine (uint8_t Line, uint8_t *ptr)
Displays a maximum of 20 char on the LCD.
void | LCD_DrawChar (uint8_t Xpos, uint16_t Ypos, const uint16_t *c)
Draws a character on LCD.
void | LCD_DrawCircle (uint8_t Xpos, uint16_t Ypos, uint16_t Radius)
Displays a circle.
void | LCD_DrawLine (uint8_t Xpos, uint16_t Ypos, uint16_t Length, uint8_t Direction)
Displays a line.
void | LCD_DrawMonoPict (const uint32_t *Pict)
Displays a monocolor picture.
void | LCD_DrawRect (uint8_t Xpos, uint16_t Ypos, uint8_t Height, uint16_t Width)
Displays a rectangle.
void | LCD_nCS_StartByte (uint8_t Start_Byte)
Reset LCD control line(/CS) and Send Start-Byte.
void | LCD_PowerOn (void)
Power on the LCD.
uint16_t | LCD_ReadReg (uint8_t LCD_Reg)
Reads the selected LCD Register.
void | LCD_SetBackColor (__IO uint16_t Color)
Sets the Background color.
void | LCD_SetCursor (uint8_t Xpos, uint16_t Ypos)
Sets the cursor position.
void | LCD_SetDisplayWindow (uint8_t Xpos, uint16_t Ypos, uint8_t Height, uint16_t Width)
Sets a display window.
void | LCD_SetTextColor (__IO uint16_t Color)
Sets the Text color.
void | LCD_Setup (void)
Setups the LCD.
void | LCD_SPIConfig (void)
Configures the SPI2 interface.
void | LCD_WindowModeDisable (void)
Disables LCD Window mode.
void | LCD_WriteRAM (uint16_t RGB_Code)
Writes to the LCD RAM.
void | LCD_WriteRAM_Prepare (void)
Prepare to write to the LCD RAM.
void | LCD_WriteRAMWord (uint16_t RGB_Code)
Writes 1 word to the LCD RAM.
void | LCD_WriteReg (uint8_t LCD_Reg, uint16_t LCD_RegValue)
Writes to the selected LCD register.
void | LCD_WriteRegIndex (uint8_t LCD_Reg)
Writes index to select the LCD register.
void | STM3210B_LCD_Init (void)
Initializes the LCD.

Detailed Description

This file contains all the functions prototypes for the stm3210b_lcd firmware driver.

Author:
MCD Application Team
Version:
V2.0.0
Date:
04/27/2009
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2009 STMicroelectronics

Definition in file stm3210b_lcd.h.

Define Documentation

#define Black 0x0000

Definition at line 153 of file stm3210b_lcd.h.

Referenced by DSPDemoInit(), and In_displayWaveform().

#define Blue 0x001F

Definition at line 155 of file stm3210b_lcd.h.

#define Blue2 0x051F

Definition at line 156 of file stm3210b_lcd.h.

#define CtrlPin_NCS GPIO_Pin_2

Definition at line 147 of file stm3210b_lcd.h.

Referenced by LCD_Clear(), LCD_DrawChar(), LCD_DrawLine(), LCD_DrawMonoPict(), LCD_nCS_StartByte(), LCD_ReadReg(), LCD_WriteRAM(), LCD_WriteRAMWord(), LCD_WriteRegHX8312(), LCD_WriteRegILI9320(), and LCD_WriteRegIndex().

#define CtrlPin_NWR GPIO_Pin_15

Definition at line 149 of file stm3210b_lcd.h.

Referenced by LCD_CtrlLinesConfig(), LCD_WriteRAM(), and LCD_WriteRegHX8312().

#define CtrlPin_RS GPIO_Pin_7

Definition at line 148 of file stm3210b_lcd.h.

Referenced by LCD_CtrlLinesConfig(), LCD_WriteRAM(), and LCD_WriteRegHX8312().

#define Cyan 0x7FFF

Definition at line 160 of file stm3210b_lcd.h.

#define Green 0x07E0

Definition at line 159 of file stm3210b_lcd.h.

#define Grey 0xF7DE

Definition at line 154 of file stm3210b_lcd.h.

#define Horizontal 0x00

Definition at line 174 of file stm3210b_lcd.h.

Referenced by LCD_DrawLine(), and LCD_DrawRect().

#define Line0 0

Definition at line 163 of file stm3210b_lcd.h.

Referenced by DisplayTitle().

#define Line1 24

Definition at line 164 of file stm3210b_lcd.h.

Referenced by DisplayTitle().

#define Line2 48

Definition at line 165 of file stm3210b_lcd.h.

#define Line3 72

Definition at line 166 of file stm3210b_lcd.h.

#define Line4 96

Definition at line 167 of file stm3210b_lcd.h.

#define Line5 120

Definition at line 168 of file stm3210b_lcd.h.

#define Line6 144

Definition at line 169 of file stm3210b_lcd.h.

#define Line7 168

Definition at line 170 of file stm3210b_lcd.h.

#define Line8 192

Definition at line 171 of file stm3210b_lcd.h.

#define Line9 216

Definition at line 172 of file stm3210b_lcd.h.

Referenced by DisplayTitle().

#define Magenta 0xF81F

Definition at line 158 of file stm3210b_lcd.h.

#define R0 0x00

Definition at line 34 of file stm3210b_lcd.h.

Referenced by LCD_DisplayOff(), LCD_DisplayOn(), LCD_Setup(), and STM3210B_LCD_Init().

#define R1 0x01

Definition at line 35 of file stm3210b_lcd.h.

Referenced by LCD_DisplayOn(), LCD_SetDisplayWindow(), LCD_Setup(), and LCD_WindowModeDisable().

#define R10 0x0A

Definition at line 44 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R106 0x6A

Definition at line 111 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R118 0x76

Definition at line 112 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R12 0x0C

Definition at line 45 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R128 0x80

Definition at line 113 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R129 0x81

Definition at line 114 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R13 0x0D

Definition at line 46 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R130 0x82

Definition at line 115 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R131 0x83

Definition at line 116 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R132 0x84

Definition at line 117 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R133 0x85

Definition at line 118 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R134 0x86

Definition at line 119 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R135 0x87

Definition at line 120 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R136 0x88

Definition at line 121 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R137 0x89

Definition at line 122 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R139 0x8B

Definition at line 123 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R14 0x0E

Definition at line 47 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R140 0x8C

Definition at line 124 of file stm3210b_lcd.h.

#define R141 0x8D

Definition at line 125 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R143 0x8F

Definition at line 126 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R144 0x90

Definition at line 127 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R145 0x91

Definition at line 128 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R146 0x92

Definition at line 129 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R147 0x93

Definition at line 130 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R148 0x94

Definition at line 131 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R149 0x95

Definition at line 132 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R15 0x0F

Definition at line 48 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R150 0x96

Definition at line 133 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R151 0x97

Definition at line 134 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R152 0x98

Definition at line 135 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R153 0x99

Definition at line 136 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R154 0x9A

Definition at line 137 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R157 0x9D

Definition at line 138 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R16 0x10

Definition at line 49 of file stm3210b_lcd.h.

Referenced by LCD_PowerOn(), and LCD_Setup().

#define R17 0x11

Definition at line 50 of file stm3210b_lcd.h.

Referenced by LCD_PowerOn(), and LCD_Setup().

#define R18 0x12

Definition at line 51 of file stm3210b_lcd.h.

Referenced by LCD_PowerOn(), and LCD_Setup().

#define R19 0x13

Definition at line 52 of file stm3210b_lcd.h.

Referenced by LCD_PowerOn(), and LCD_Setup().

#define R192 0xC0

Definition at line 139 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R193 0xC1

Definition at line 140 of file stm3210b_lcd.h.

#define R2 0x02

Definition at line 36 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R20 0x14

Definition at line 53 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R21 0x15

Definition at line 54 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R22 0x16

Definition at line 55 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R227 0xE3

Definition at line 141 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R229 0xE5

Definition at line 142 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R23 0x17

Definition at line 56 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R231 0xE7

Definition at line 143 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R239 0xEF

Definition at line 144 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R24 0x18

Definition at line 57 of file stm3210b_lcd.h.

Referenced by LCD_PowerOn(), and LCD_Setup().

#define R25 0x19

Definition at line 58 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R26 0x1A

Definition at line 59 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R27 0x1B

Definition at line 60 of file stm3210b_lcd.h.

Referenced by LCD_PowerOn(), and LCD_Setup().

#define R28 0x1C

Definition at line 61 of file stm3210b_lcd.h.

Referenced by LCD_PowerOn(), and LCD_Setup().

#define R29 0x1D

Definition at line 62 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R3 0x03

Definition at line 37 of file stm3210b_lcd.h.

Referenced by LCD_Setup(), and LCD_WindowModeDisable().

#define R30 0x1E

Definition at line 63 of file stm3210b_lcd.h.

Referenced by LCD_PowerOn(), and LCD_Setup().

#define R31 0x1F

Definition at line 64 of file stm3210b_lcd.h.

Referenced by LCD_PowerOn(), and LCD_Setup().

#define R32 0x20

Definition at line 65 of file stm3210b_lcd.h.

Referenced by LCD_PowerOn(), LCD_SetCursor(), and LCD_Setup().

#define R33 0x21

Definition at line 66 of file stm3210b_lcd.h.

Referenced by LCD_SetCursor(), and LCD_Setup().

#define R34 0x22

Definition at line 67 of file stm3210b_lcd.h.

Referenced by LCD_WriteRAM_Prepare().

#define R36 0x24

Definition at line 68 of file stm3210b_lcd.h.

Referenced by LCD_PowerOn(), and LCD_Setup().

#define R37 0x25

Definition at line 69 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R4 0x04

Definition at line 38 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R40 0x28

Definition at line 70 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R41 0x29

Definition at line 71 of file stm3210b_lcd.h.

Referenced by LCD_PowerOn(), and LCD_Setup().

#define R43 0x2B

Definition at line 72 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R45 0x2D

Definition at line 73 of file stm3210b_lcd.h.

#define R48 0x30

Definition at line 74 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R49 0x31

Definition at line 75 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R5 0x05

Definition at line 39 of file stm3210b_lcd.h.

Referenced by LCD_DisplayOn(), LCD_SetDisplayWindow(), LCD_Setup(), and LCD_WindowModeDisable().

#define R50 0x32

Definition at line 76 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R51 0x33

Definition at line 77 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R52 0x34

Definition at line 78 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R53 0x35

Definition at line 79 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R54 0x36

Definition at line 80 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R55 0x37

Definition at line 81 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R56 0x38

Definition at line 82 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R57 0x39

Definition at line 83 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R59 0x3B

Definition at line 84 of file stm3210b_lcd.h.

Referenced by LCD_DisplayOff(), LCD_DisplayOn(), and LCD_Setup().

#define R6 0x06

Definition at line 40 of file stm3210b_lcd.h.

#define R60 0x3C

Definition at line 85 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R61 0x3D

Definition at line 86 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R62 0x3E

Definition at line 87 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R63 0x3F

Definition at line 88 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R64 0x40

Definition at line 89 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R65 0x41

Definition at line 90 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R66 0x42

Definition at line 91 of file stm3210b_lcd.h.

Referenced by LCD_SetCursor(), and LCD_Setup().

#define R67 0x43

Definition at line 92 of file stm3210b_lcd.h.

Referenced by LCD_SetCursor(), and LCD_Setup().

#define R68 0x44

Definition at line 93 of file stm3210b_lcd.h.

Referenced by LCD_SetCursor(), and LCD_Setup().

#define R69 0x45

Definition at line 94 of file stm3210b_lcd.h.

Referenced by LCD_SetDisplayWindow(), and LCD_Setup().

#define R7 0x07

Definition at line 41 of file stm3210b_lcd.h.

Referenced by LCD_DisplayOff(), LCD_DisplayOn(), LCD_PowerOn(), and LCD_Setup().

#define R70 0x46

Definition at line 95 of file stm3210b_lcd.h.

Referenced by LCD_SetDisplayWindow(), and LCD_Setup().

#define R71 0x47

Definition at line 96 of file stm3210b_lcd.h.

Referenced by LCD_SetDisplayWindow(), and LCD_Setup().

#define R72 0x48

Definition at line 97 of file stm3210b_lcd.h.

Referenced by LCD_SetDisplayWindow(), and LCD_Setup().

#define R73 0x49

Definition at line 98 of file stm3210b_lcd.h.

Referenced by LCD_SetDisplayWindow(), and LCD_Setup().

#define R74 0x4A

Definition at line 99 of file stm3210b_lcd.h.

Referenced by LCD_SetDisplayWindow(), and LCD_Setup().

#define R75 0x4B

Definition at line 100 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R76 0x4C

Definition at line 101 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R77 0x4D

Definition at line 102 of file stm3210b_lcd.h.

#define R78 0x4E

Definition at line 103 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R79 0x4F

Definition at line 104 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R8 0x08

Definition at line 42 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R80 0x50

Definition at line 105 of file stm3210b_lcd.h.

Referenced by LCD_SetDisplayWindow(), and LCD_Setup().

#define R81 0x51

Definition at line 106 of file stm3210b_lcd.h.

Referenced by LCD_SetDisplayWindow(), and LCD_Setup().

#define R82 0x52

Definition at line 107 of file stm3210b_lcd.h.

Referenced by LCD_SetDisplayWindow(), and LCD_Setup().

#define R83 0x53

Definition at line 108 of file stm3210b_lcd.h.

Referenced by LCD_SetDisplayWindow(), and LCD_Setup().

#define R9 0x09

Definition at line 43 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R96 0x60

Definition at line 109 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define R97 0x61

Definition at line 110 of file stm3210b_lcd.h.

Referenced by LCD_Setup().

#define Red 0xF800

Definition at line 157 of file stm3210b_lcd.h.

Referenced by displayPowerMag().

#define Vertical 0x01

Definition at line 175 of file stm3210b_lcd.h.

Referenced by displayPowerMag(), In_displayWaveform(), LCD_DrawRect(), and Out_displayWaveform().

#define White 0xFFFF

Definition at line 152 of file stm3210b_lcd.h.

Referenced by displayPowerMag(), DSPDemoInit(), and In_displayWaveform().

#define Yellow 0xFFE0

Definition at line 161 of file stm3210b_lcd.h.


STM32F10xxx DSP library firmware & FFT_Demo: stm32_dsp.h File Reference

STM32F10x_DSP_Lib_V2.0.0 » Libraries » STM32F10x_DSP_Lib » inc

stm32_dsp.h File Reference

This source file contains prototypes of DSP functions. More...

#include "stm32f10x.h"

Go to the source code of this file.

Data Structures

struct | COEFS

Functions

void | cr4_fft_1024_stm32 (void *pssOUT, void *pssIN, uint16_t Nbin)
void | cr4_fft_256_stm32 (void *pssOUT, void *pssIN, uint16_t Nbin)
void | cr4_fft_64_stm32 (void *pssOUT, void *pssIN, uint16_t Nbin)
uint16_t | DoFullPID (uint16_t In, uint16_t Ref, uint16_t *Coeff)
PID in C, Error computed inside the routine.
uint16_t | DoPID (uint16_t Error, uint16_t *Coeff)
PID in C, Error computed outside the routine.
void | fir_16by16_stm32 (void *y, void *x, COEFS *c, uint32_t N)
void | iir_biquad_stm32 (uint16_t *y, uint16_t *x, int16_t *IIRCoeff, uint16_t ny)
Canonique Form of 8th order IIR filter, factorized in 4 biquads sections in series.
void | iirarma_stm32 (void *y, void *x, uint16_t *h2, uint16_t *h1, uint32_t ny)
uint16_t | PID_stm32 (uint16_t Error, uint16_t *Coeff)

Detailed Description

This source file contains prototypes of DSP functions.

Author:
MCD Application Team
Version:
V2.0.0
Date:
04/27/2009
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2009 STMicroelectronics

Definition in file stm32_dsp.h.

Function Documentation

void cr4_fft_1024_stm32 | ( | void * | pssOUT,
 |  | void * | pssIN,
 |  | uint16_t | Nbin
 | ) |  |

void cr4_fft_256_stm32 | ( | void * | pssOUT,
 |  | void * | pssIN,
 |  | uint16_t | Nbin
 | ) |  |

void cr4_fft_64_stm32 | ( | void * | pssOUT,
 |  | void * | pssIN,
 |  | uint16_t | Nbin
 | ) |  |

Referenced by MyDualSweep().

void fir_16by16_stm32 | ( | void * | y,
 |  | void * | x,
 |  | COEFS * | c,
 |  | uint32_t | N
 | ) |  |

void iirarma_stm32 | ( | void * | y,
 |  | void * | x,
 |  | uint16_t * | h2,
 |  | uint16_t * | h1,
 |  | uint32_t | ny
 | ) |  |

uint16_t PID_stm32 | ( | uint16_t | Error,
 |  | uint16_t * | Coeff
 | ) |  |


STM32F10xxx DSP library firmware & FFT_Demo: stm32f10x_conf.h File Reference

STM32F10x_DSP_Lib_V2.0.0 » Project » FFT_Demo » inc

stm32f10x_conf.h File Reference

Library configuration file. More...

#include "stm32f10x_flash.h"
#include "stm32f10x_gpio.h"
#include "stm32f10x_rcc.h"
#include "stm32f10x_spi.h"
#include "misc.h"

Go to the source code of this file.

Defines

#define assert_param(expr) ((void)0)

Detailed Description

Library configuration file.

Author:
MCD Application Team
Version:
V2.0.0
Date:
04/27/2009
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2009 STMicroelectronics

Definition in file stm32f10x_conf.h.

Define Documentation

#define assert_param ( expr ) ((void)0)

Definition at line 73 of file stm32f10x_conf.h.


STM32F10xxx DSP library firmware & FFT_Demo: stm32f10x_it.c File Reference

STM32F10x_DSP_Lib_V2.0.0 » Project » FFT_Demo » src

stm32f10x_it.c File Reference

Main Interrupt Service Routines. This file provides template for all exceptions handler and peripherals interrupt service routine. More...

#include "stm32f10x_it.h"

Go to the source code of this file.

Functions

void | BusFault_Handler (void)
This function handles Bus Fault exception.
void | DebugMon_Handler (void)
This function handles Debug Monitor exception.
void | HardFault_Handler (void)
This function handles Hard Fault exception.
void | MemManage_Handler (void)
This function handles Memory Manage exception.
void | NMI_Handler (void)
This function handles NMI exception.
void | PendSV_Handler (void)
This function handles PendSVC exception.
void | SVC_Handler (void)
This function handles SVCall exception.
void | SysTick_Handler (void)
This function handles SysTick Handler.
void | UsageFault_Handler (void)
This function handles Usage Fault exception.

Variables

volatile uint32_t | TimingDelay = 0

Detailed Description

Main Interrupt Service Routines. This file provides template for all exceptions handler and peripherals interrupt service routine.

Author:
MCD Application Team
Version:
V2.0.0
Date:
04/27/2009
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2009 STMicroelectronics

Definition in file stm32f10x_it.c.


STM32F10xxx DSP library firmware & FFT_Demo: stm32f10x_it.h File Reference

STM32F10x_DSP_Lib_V2.0.0 » Project » FFT_Demo » inc

stm32f10x_it.h File Reference

This file contains the headers of the interrupt handlers. More...

#include "stm32f10x.h"

Go to the source code of this file.

Functions

void | BusFault_Handler (void)
This function handles Bus Fault exception.
void | DebugMon_Handler (void)
This function handles Debug Monitor exception.
void | HardFault_Handler (void)
This function handles Hard Fault exception.
void | MemManage_Handler (void)
This function handles Memory Manage exception.
void | NMI_Handler (void)
This function handles NMI exception.
void | PendSV_Handler (void)
This function handles PendSVC exception.
void | SVC_Handler (void)
This function handles SVCall exception.
void | SysTick_Handler (void)
This function handles SysTick Handler.
void | UsageFault_Handler (void)
This function handles Usage Fault exception.

Detailed Description

This file contains the headers of the interrupt handlers.

Author:
MCD Application Team
Version:
V2.0.0
Date:
04/27/2009
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2009 STMicroelectronics

Definition in file stm32f10x_it.h.


STM32F10xxx DSP library firmware & FFT_Demo: table_fft.h File Reference

STM32F10x_DSP_Lib_V2.0.0 » Libraries » STM32F10x_DSP_Lib » inc

table_fft.h File Reference

Contains the coefficients required for FFT computation. More...

Go to the source code of this file.

Variables

uint16_t TableFFT []

Detailed Description

Contains the coefficients required for FFT computation.

Author:
MCD Application Team
Version:
V2.0.0
Date:
04/27/2009
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2009 STMicroelectronics

Definition in file table_fft.h.


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • a
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- a -

  • ASCII_Table : fonts.h
  • assert_param : stm32f10x_conf.h


STM32F10xxx DSP library firmware & FFT_Demo: Data Structures

  • Data Structure Index
  • Data Fields

Data Structures

Here are the data structures with brief descriptions:
COEFS


STM32F10xxx DSP library firmware & FFT_Demo: Alphabetical List

  • Data Structure Index
  • Data Fields

Data Structure Index

C

C
COEFS

C


CMSIS: Cortex Microcontroller Software Interface Standard

Cortex Microcontroller Software Interface Standard

This file describes the Cortex Microcontroller Software Interface Standard (CMSIS).

Version: 1.10 - 24. Feb. 2009

Information in this file, the accompany manuals, and software is
Copyright © ARM Ltd.
All rights reserved.

Revision History

  • Version 1.00: initial release.
  • Version 1.01: added __LDREXx, __STREXx, and __CLREX.
  • Version 1.02: added Cortex-M0.
  • Version 1.10: second review.

Contents

  1. About
  2. Coding Rules and Conventions
  3. CMSIS Files
  4. Core Peripheral Access Layer
  5. CMSIS Example

About

The Cortex Microcontroller Software Interface Standard (CMSIS) answers the challenges that are faced when software components are deployed to physical microcontroller devices based on a Cortex-M0 / Cortex-M1 or Cortex-M3 processor. The CMSIS will be also expanded to future Cortex-M processor cores (the term Cortex-Mx is used to indicate that). The CMSIS is defined in close co-operation with various silicon and software vendors and provides a common approach to interface to peripherals, real-time operating systems, and middleware components.

ARM provides as part of the CMSIS the following software layers that are available for various compiler implementations:

  • Core Peripheral Access Layer: contains name definitions, address definitions and helper functions to access core registers and peripherals. It defines also an device independent interface for RTOS Kernels that includes debug channel definitions.
  • Middleware Access Layer: provides common methods to access peripherals for the software industry. The Middleware Access Layer is adapted by the Silicon Vendor for the device specific peripherals used by middleware components. The middleware access layer is currently in development and not yet part of this documentation

These software layers are expanded by Silicon partners with:

  • Device Peripheral Access Layer: provides definitions for all device peripherals
  • Access Functions for Peripherals (optional): provides additional helper functions for peripherals

CMSIS defines for a Cortex-Mx Microcontroller System:

  • A common way to access peripheral registers and a common way to define exception vectors.
  • The register names of the Core Peripherals and the names of the Core Exception Vectors.
  • An device independent interface for RTOS Kernels including a debug channel.
  • Interfaces for middleware components (TCP/IP Stack, Flash File System).

By using CMSIS compliant software components, the user can easier re-use template code. CMSIS is intended to enable the combination of software components from multiple middleware vendors.

Coding Rules and Conventions

The following section describes the coding rules and conventions used in the CMSIS implementation. It contains also information about data types and version number information.

Essentials

  • The CMSIS C code conforms to MISRA 2004 rules. In case of MISRA violations, there are disable and enable sequences for PC-LINT inserted.
  • ANSI standard data types defined in the ANSI C header file <stdint.h> are used.
  • #define constants that include expressions must be enclosed by parenthesis.
  • Variables and parameters have a complete data type.
  • All functions in the Core Peripheral Access Layer are re-entrant.
  • The Core Peripheral Access Layer has no blocking code (which means that wait/query loops are done at other software layers such as the Middleware Access Layer).
  • For each exception/interrupt there is definition for:
    • an exception/interrupt handler with the postfix _Handler (for exceptions) or _IRQHandler (for interrupts).
    • a default exception/interrupt handler (weak definition) that contains an endless loop.
    • a #define of the interrupt number with the postfix _IRQn.

Recommendations

The CMSIS recommends the following conventions for identifiers.

  • CAPITAL names to identify Core Registers, Peripheral Registers, and CPU Instructions.
  • CamelCase names to identify peripherals access functions and interrupts.
  • PERIPHERAL_ prefix to identify functions that belong to specify peripherals.
  • Doxygen comments for all functions are included as described under Function Comments below.
Comments
  • Comments use the ANSI C90 style (/* comment */) or C++ style (// comment). It is assumed that the programming tools support today consistently the C++ comment style.
  • Function Comments provide for each function the following information:
    • one-line brief function overview.
    • detailed parameter explanation.
    • detailed information about return values.
    • detailed description of the actual function.

    Doxygen Example:

    /**
 * @brief  Enable Interrupt in NVIC Interrupt Controller
 * @param  IRQn  interrupt number that specifies the interrupt
 * @return none.
 * Enable the specified interrupt in the NVIC Interrupt Controller.
 * Other settings of the interrupt such as priority are not affected.
 */

Data Types and IO Type Qualifiers

The Cortex-Mx HAL uses the standard types from the standard ANSI C header file <stdint.h>. IO Type Qualifiers are used to specify the access to peripheral variables. IO Type Qualifiers are indented to be used for automatic generation of debug information of peripheral registers.

IO Type Qualifier | #define | Description
__I | volatile const | Read access only
__O | volatile | Write access only
__IO | volatile | Read and write access

CMSIS Version Number

File core_cm3.h contains the version number of the CMSIS with the following define:

#define __CM3_CMSIS_VERSION_MAIN  (0x00)      /* [31:16] main version       */
#define __CM3_CMSIS_VERSION_SUB   (0x03)      /* [15:0]  sub version        */
#define __CM3_CMSIS_VERSION       ((__CM3_CMSIS_VERSION_MAIN << 16) | __CM3_CMSIS_VERSION_SUB)

File core_cm0.h contains the version number of the CMSIS with the following define:

#define __CM0_CMSIS_VERSION_MAIN  (0x00)      /* [31:16] main version       */
#define __CM0_CMSIS_VERSION_SUB   (0x00)      /* [15:0]  sub version        */
#define __CM0_CMSIS_VERSION       ((__CM0_CMSIS_VERSION_MAIN << 16) | __CM0_CMSIS_VERSION_SUB)

CMSIS Cortex Core

File core_cm3.h contains the type of the CMSIS Cortex-Mx with the following define:

#define __CORTEX_M                (0x03)

File core_cm0.h contains the type of the CMSIS Cortex-Mx with the following define:

#define __CORTEX_M                (0x00)

CMSIS Files

This section describes the Files provided in context with the CMSIS to access the Cortex-Mx hardware and peripherals.

File | Provider | Description
device.h | Device specific (provided by silicon partner) | Defines the peripherals for the actual device. The file may use several other include files to define the peripherals of the actual device.
core_cm0.h | ARM (for RealView ARMCC, IAR, and GNU GCC) | Defines the core peripherals for the Cortex-M0 CPU and core peripherals.
core_cm3.h | ARM (for RealView ARMCC, IAR, and GNU GCC) | Defines the core peripherals for the Cortex-M3 CPU and core peripherals.
core_cm0.c | ARM (for RealView ARMCC, IAR, and GNU GCC) | Provides helper functions that access core registers.
core_cm0.c | ARM (for RealView ARMCC, IAR, and GNU GCC) | Provides helper functions that access core registers.
startup_device | ARM (adapted by compiler partner / silicon partner) | Provides the Cortex-Mx startup code and the complete (device specific) Interrupt Vector Table
system_device | ARM (adapted by silicon partner) | Provides a device specific configuration file for the device. It configures the device initializes typically the oscillator (PLL) that is part of the microcontroller device

device.h

The file device.h is provided by the silicon vendor and is the central include file that the application programmer is using in the C source code. This file contains:

  • Interrupt Number Definition: provides interrupt numbers (IRQn) for all core and device specific exceptions and interrupts.

  • Configuration for core_cm0.h / core_cm3.h: reflects the actual configuration of the Cortex-Mx processor that is part of the actual device. As such the file core_cm0.h / core_cm3.h is included that implements access to processor registers and core peripherals.

  • Device Peripheral Access Layer: provides definitions for all device peripherals. It contains all data structures and the address mapping for the device specific peripherals.

  • Access Functions for Peripherals (optional): provides additional helper functions for peripherals that are useful for programming of these peripherals. Access Functions may be provided as inline functions or can be extern references to a device specific library provided by the silicon vendor.

Interrupt Number Definition

To access the device specific interrupts the device.h file defines IRQn numbers for the complete device using a enum typedef as shown below:

typedef enum IRQn
{
/******  Cortex-M3 Processor Exceptions/Interrupt Numbers ************************************************/
  NonMaskableInt_IRQn             = -14,      /*!< 2 Non Maskable Interrupt                              */
  MemoryManagement_IRQn           = -12,      /*!< 4 Cortex-M3 Memory Management Interrupt               */
  BusFault_IRQn                   = -11,      /*!< 5 Cortex-M3 Bus Fault Interrupt                       */
  UsageFault_IRQn                 = -10,      /*!< 6 Cortex-M3 Usage Fault Interrupt                     */
  SVCall_IRQn                     = -5,       /*!< 11 Cortex-M3 SV Call Interrupt                        */
  DebugMonitor_IRQn               = -4,       /*!< 12 Cortex-M3 Debug Monitor Interrupt                  */
  PendSV_IRQn                     = -2,       /*!< 14 Cortex-M3 Pend SV Interrupt                        */
  SysTick_IRQn                    = -1,       /*!< 15 Cortex-M3 System Tick Interrupt                    */
/******  STM32 specific Interrupt Numbers ****************************************************************/
  WWDG_STM_IRQn                   = 0,        /*!< Window WatchDog Interrupt                             */
  PVD_STM_IRQn                    = 1,        /*!< PVD through EXTI Line detection Interrupt             */
  :
  :
  } IRQn_Type;

Configuration for core_cm0.h / core_cm3.h

The Cortex-Mx core configuration options which are defined for each device implementation. Some configuration options are reflected in the CMSIS layer using the #define settings described below.

To access core peripherals file device.h includes file core_cm0.h / core_cm3.h. Several features in core_cm0.h / core_cm3.h are configured by the following defines that must be defined before #include <core_cm0.h> / #include <core_cm3.h> preprocessor command.

#define | File | Value | Description
__NVIC_PRIO_BITS | core_cm0.h | (2) | Number of priority bits implemented in the NVIC (device specific)
__NVIC_PRIO_BITS | core_cm3.h | (2 ... 8) | Number of priority bits implemented in the NVIC (device specific)
__MPU_PRESENT | core_cm0.h, core_cm3.h | (0, 1) | Defines if an MPU is present or not
__Vendor_SysTickConfig | core_cm0.h, core_cm3.h | (1) | When this define is setup to 1, the SysTickConfig function in core_cm3.h is excluded. In this case the device.h file must contain a vendor specific implementation of this function.

Device Peripheral Access Layer

Each peripheral uses a PERIPHERAL_ prefix to identify peripheral registers and functions that access this specific peripheral. If more than one peripheral of the same type exists, identifiers have a postfix (digit or letter). For example:

  • UART_Type: defines the generic register layout for all UART channels in a device.
  • UART1: is a pointer to a register structure that refers to a specific UART. For example UART1->DR is the data register of UART1.
  • UART_SendChar(UART1, c): is a generic function that works with all UART's in the device. To communicate the UART that it accesses the first parameter is a pointer to the actual UART register structure.
  • UART1_SendChar(c): is an UART1 specific implementation (in this case the send function).
Minimal Requiements

To access the peripheral registers and related function in a device the files device.h and core_cm0.h / core_cm3.h defines as a minimum:

  • The Register Layout Typedef for each peripheral that defines all register names. Names that start with RESERVE are used to introduce space into the structure to adjust the addresses of the peripheral registers. For example:
    typedef struct {
  __IO uint32_t CTRL;      /* SysTick Control and Status Register */
  __IO uint32_t LOAD;      /* SysTick Reload Value Register       */
  __IO uint32_t VAL;       /* SysTick Current Value Register      */
  __I  uint32_t CALIB;     /* SysTick Calibration Register        */
  } SysTick_Type;
  • Base Address for each peripheral (in case of multiple peripherals that use the same register layout typedef multiple base addresses are defined). For example:
    #define SysTick_BASE (SCS_BASE + 0x0010)            /* SysTick Base Address */
  • Access Definition for each peripheral (in case of multiple peripherals that use the same register layout typedef multiple access definitions exist, i.e. UART0, UART1). For Example:
    #define SysTick ((SysTick_Type *) SysTick_BASE)     /* SysTick access definition */

These definitions allow to access the peripheral registers from user code with simple assignments like:

SysTick->CTRL = 0;
Optional Features

In addition the device.h file may define:

  • #define constants that simplify access to the peripheral registers. These constant define bit-positions or other specific patterns are that required for the programming of the peripheral registers. The identifiers used start with the name of the PERIPERHAL_. It is recommended to use CAPITAL letters for such #define constants.
  • Functions that perform more complex functions with the peripheral (i.e. status query before a sending register is accessed). Again these function start with the name of the PERIPHERAL_.

core_cm0.h and core_cm0.c

File core_cm0.h describes the data structures for the Cortex-M0 core peripherals and does the address mapping of this structures. It also provides basic access to the Cortex-M0 core registers and core peripherals with efficient functions (defined as static inline).

File core_cm0.c defines several helper functions that access processor registers.

Together these files implement the Core Peripheral Access Layer for a Cortex-M0.

core_cm3.h and core_cm3.c

File core_cm3.h describes the data structures for the Cortex-M3 core peripherals and does the address mapping of this structures. It also provides basic access to the Cortex-M3 core registers and core peripherals with efficient functions (defined as static inline).

File core_cm3.c defines several helper functions that access processor registers.

Together these files implement the Core Peripheral Access Layer for a Cortex-M3.

startup_device

A template file for startup_device is provided by ARM for each supported compiler. It is adapted by the silicon vendor to include interrupt vectors for all device specific interrupt handlers. Each interrupt handler is defined as weak function to an dummy handler. Therefore the interrupt handler can be directly used in application software without any requirements to adapt the startup_device file.

The following exception names are fixed and define the start of the vector table for a Cortex-M0:

__Vectors       DCD     __initial_sp              ; Top of Stack
                DCD     Reset_Handler             ; Reset Handler
                DCD     NMI_Handler               ; NMI Handler
                DCD     HardFault_Handler         ; Hard Fault Handler
                DCD     0                         ; Reserved
                DCD     0                         ; Reserved
                DCD     0                         ; Reserved
                DCD     0                         ; Reserved
                DCD     0                         ; Reserved
                DCD     0                         ; Reserved
                DCD     0                         ; Reserved
                DCD     SVC_Handler               ; SVCall Handler
                DCD     0                         ; Reserved
                DCD     0                         ; Reserved
                DCD     PendSV_Handler            ; PendSV Handler
                DCD     SysTick_Handler           ; SysTick Handler

The following exception names are fixed and define the start of the vector table for a Cortex-M3:

__Vectors       DCD     __initial_sp              ; Top of Stack
                DCD     Reset_Handler             ; Reset Handler
                DCD     NMI_Handler               ; NMI Handler
                DCD     HardFault_Handler         ; Hard Fault Handler
                DCD     MemManage_Handler         ; MPU Fault Handler
                DCD     BusFault_Handler          ; Bus Fault Handler
                DCD     UsageFault_Handler        ; Usage Fault Handler
                DCD     0                         ; Reserved
                DCD     0                         ; Reserved
                DCD     0                         ; Reserved
                DCD     0                         ; Reserved
                DCD     SVC_Handler               ; SVCall Handler
                DCD     DebugMon_Handler          ; Debug Monitor Handler
                DCD     0                         ; Reserved
                DCD     PendSV_Handler            ; PendSV Handler
                DCD     SysTick_Handler           ; SysTick Handler

In the following examples for device specific interrupts are shown:

; External Interrupts
                DCD     WWDG_IRQHandler           ; Window Watchdog
                DCD     PVD_IRQHandler            ; PVD through EXTI Line detect
                DCD     TAMPER_IRQHandler         ; Tamper

Device specific interrupts must have a dummy function that can be overwritten in user code. Below is an example for this dummy function.

Default_Handler PROC
                EXPORT WWDG_IRQHandler   [WEAK]
                EXPORT PVD_IRQHandler    [WEAK]
                EXPORT TAMPER_IRQHandler [WEAK]
                :
                :
                WWDG_IRQHandler
                PVD_IRQHandler
                TAMPER_IRQHandler
                :
                :
                B .
                ENDP

The user application may simply define an interrupt handler function by using the handler name as shown below.

void WWDG_IRQHandler(void)
{
  :
  :
}

system_device.c

A template file for system_device.c is provided by ARM but adapted by the silicon vendor to match their actual device. As a minimum requirement this file must provide a device specific system configuration function and a global variable that contains the system frequency. It configures the device and initializes typically the oscillator (PLL) that is part of the microcontroller device.

The file system_device.c must provide as a minimum requirement the SystemInit function as shown below.

Function Definition | Description
void SystemInit (void) | Setup the microcontroller system. Typically this function configures the oscillator (PLL) that is part of the microcontroller device. For systems with variable clock speed it also updates the variable SystemFrequency.

Also part of the file system_device.c is the variable SystemFrequency which contains the current CPU clock speed shown below.

Variable Definition | Description
uint32_t SystemFrequency | Contains the system frequency (which is the system clock frequency supplied to the SysTick timer and the processor core clock). This variable can be used by the user application after the call to the function SystemInit() to setup the SysTick timer or configure other parameters. It may also be used by debugger to query the frequency of the debug timer or configure the trace clock speed. This variable may also be defined in the const space. The compiler must be configured to avoid the removal of this variable in case that the application program is not using it. It is important for debug systems that the variable is physically present in memory so that it can be examined to configure the debugger.

Note

  • The above definitions are the minimum requirements for the file system_device.c. This file may export more functions or variables that provide a more flexible configuration of the microcontroller system.

Core Peripheral Access Layer

Cortex-Mx Core Register Access

The following functions are defined in core_cm0.h / core_cm3.h and provide access to Cortex-Mx core registers.

Function Definition | Core | Core Register | Description
void __enable_irq (void) | M0, M3 | PRIMASK = 0 | Global Interrupt enable (using the instruction CPSIE i)
void __disable_irq (void) | M0, M3 | PRIMASK = 1 | Global Interrupt disable (using the instruction CPSID i)
void __set_PRIMASK (uint32_t value) | M0, M3 | PRIMASK = value | Assign value to Priority Mask Register (using the instruction MSR)
uint32_t __get_PRIMASK (void) | M0, M3 | return PRIMASK | Return Priority Mask Register (using the instruction MRS)
void __enable_fault_irq (void) | M3 | FAULTMASK = 0 | Global Fault exception and Interrupt enable (using the instruction CPSIE f)
void __disable_fault_irq (void) | M3 | FAULTMASK = 1 | Global Fault exception and Interrupt disable (using the instruction CPSID f)
void __set_FAULTMASK (uint32_t value) | M3 | FAULTMASK = value | Assign value to Fault Mask Register (using the instruction MSR)
uint32_t __get_FAULTMASK (void) | M3 | return FAULTMASK | Return Fault Mask Register (using the instruction MRS)
void __set_BASEPRI (uint32_t value) | M3 | BASEPRI = value | Set Base Priority (using the instruction MSR)
uiuint32_t __get_BASEPRI (void) | M3 | return BASEPRI | Return Base Priority (using the instruction MRS)
void __set_CONTROL (uint32_t value) | M0, M3 | CONTROL = value | Set CONTROL register value (using the instruction MSR)
uint32_t __get_CONTROL (void) | M0, M3 | return CONTROL | Return Control Register Value (using the instruction MRS)
void __set_PSP (uint32_t TopOfProcStack) | M0, M3 | PSP = TopOfProcStack | Set Process Stack Pointer value (using the instruction MSR)
uint32_t __get_PSP (void) | M0, M3 | return PSP | Return Process Stack Pointer (using the instruction MRS)
void __set_MSP (uint32_t TopOfMainStack) | M0, M3 | MSP = TopOfMainStack | Set Main Stack Pointer (using the instruction MSR)
uint32_t __get_MSP (void) | M0, M3 | return MSP | Return Main Stack Pointer (using the instruction MRS)

Cortex-Mx Instruction Access

The following functions are defined in core_cm0.h / core_cm3.hand generate specific Cortex-Mx instructions. The functions are implemented in the file core_cm0.c / core_cm3.c.

Name | Core | Generated CPU Instruction | Description
void __WFI (void) | M0, M3 | WFI | Wait for Interrupt
void __WFE (void) | M0, M3 | WFE | Wait for Event
void __SEV (void) | M0, M3 | SEV | Set Event
void __ISB (void) | M0, M3 | ISB | Instruction Synchronization Barrier
void __DSB (void) | M0, M3 | DSB | Data Synchronization Barrier
void __DMB (void) | M0, M3 | DMB | Data Memory Barrier
uint32_t __REV (uint32_t value) | M0, M3 | REV | Reverse byte order in integer value.
uint32_t __REV16 (uint16_t value) | M0, M3 | REV16 | Reverse byte order in unsigned short value.
sint32_t __REVSH (sint16_t value) | M0, M3 | REVSH | Reverse byte order in signed short value with sign extension to integer.
uint32_t __RBIT (uint32_t value) | M3 | RBIT | Reverse bit order of value
uint8_t __LDREXB (uint8_t *addr) | M3 | LDREXB | Load exclusive byte
uint16_t __LDREXH (uint16_t *addr) | M3 | LDREXH | Load exclusive half-word
uint32_t __LDREXW (uint32_t *addr) | M3 | LDREXW | Load exclusive word
uint32_t __STREXB (uint8_t value, uint8_t *addr) | M3 | STREXB | Store exclusive byte
uint32_t __STREXB (uint16_t value, uint16_t *addr) | M3 | STREXH | Store exclusive half-word
uint32_t __STREXB (uint32_t value, uint32_t *addr) | M3 | STREXW | Store exclusive word
void __CLREX (void) | M3 | CLREX | Remove the exclusive lock created by __LDREXB, __LDREXH, or __LDREXW

NVIC Access Functions

The CMSIS provides access to the NVIC via the register interface structure and several helper functions that simplify the setup of the NVIC. The CMSIS HAL uses IRQ numbers (IRQn) to identify the interrupts. The first device interrupt has the IRQn value 0. Therefore negative IRQn values are used for processor core exceptions.

For the IRQn values of core exceptions the file device.h provides the following enum names.

Core Exception enum Value | Core | IRQn | Description
NonMaskableInt_IRQn | M0, M3 | -14 | Cortex-Mx Non Maskable Interrupt
MemoryManagement_IRQn | M3 | -12 | Cortex-Mx Memory Management Interrupt
BusFault_IRQn | M3 | -11 | Cortex-Mx Bus Fault Interrupt
UsageFault_IRQn | M3 | -10 | Cortex-Mx Usage Fault Interrupt
SVCall_IRQn | M0, M3 | -5 | Cortex-Mx SV Call Interrupt
DebugMonitor_IRQn | M3 | -4 | Cortex-Mx Debug Monitor Interrupt
PendSV_IRQn | M0, M3 | -2 | Cortex-Mx Pend SV Interrupt
SysTick_IRQn | M0, M3 | -1 | Cortex-Mx System Tick Interrupt

The following functions simplify the setup of the NVIC. The functions are defined as static inline.

Name | Core | Parameter | Description
void NVIC_SetPriorityGrouping(uint32_t priority_grouping) | M0, M3 | Priority Grouping Value | Set the Priority Grouping (Groups . Subgroups)
void NVIC_EnableIRQ(IRQn_Type IRQn) | M0, M3 | IRQ Number | Enable IRQn
void NVIC_DisableIRQ(IRQn_Type IRQn) | M0, M3 | IRQ Number | Disable IRQn
uint32_t NVIC_GetPendingIRQ (IRQn_Type IRQn) | M0, M3 | IRQ Number | Return true (IRQ-Number) if IRQn is pending
void NVIC_SetPendingIRQ (IRQn_Type IRQn) | M0, M3 | IRQ Number | Set IRQn Pending
void NVIC_ClearPendingIRQ (IRQn_Type IRQn) | M0, M3 | IRQ Number | Clear IRQn Pending Status
uint32_t NVIC_GetActive (IRQn_Type IRQn) | M3 | IRQ Number | Return the IRQn of the active interrupt
void NVIC_SetPriority (IRQn_Type IRQn, uint32_t priority) | M0, M3 | IRQ Number, Priority | Set Priority for IRQn (not threadsafe for Cortex-M0)
uint32_t NVIC_GetPriority (IRQn_Type IRQn) | M0, M3 | IRQ Number | Get Priority for IRQn
void NVIC_SystemReset (void) | M0, M3 | (void) | Resets the System

Note

  • The processor exceptions have negative enum values. Device specific interrupts have positive enum values and start with 0. The values are defined in device.h file.

SysTick Configuration Function

The following function is used to configure the SysTick timer and start the SysTick interrupt.

Name | Parameter | Description
uint32_t SysTickConfig (uint32_t ticks) | ticks is SysTick counter reload value | Setup the SysTick timer and enable the SysTick interrupt. After this call the SysTick timer creates interrupts with the specified time interval. Return: 0 when successful, 1 on failure.

Cortex-M3 ITM Debug Access

The Cortex-M3 incorporates the Instrumented Trace Macrocell (ITM) that provides together with the Serial Viewer Output trace capabilities for the microcontroller system. The ITM has 32 communication channels; two ITM communication channels are used by CMSIS to output the following information:

  • ITM Channel 0: implements the ITM_putchar function which can be used for printf-style output via the debug interface.
  • ITM Channel 31: is reserved for the RTOS kernel and can be used for kernel awareness debugging.

Note

  • The ITM channel 31 is selected for the RTOS kernel since some kernels may use the Privileged level for program execution. ITM channels have 4 groups with 8 channels each, whereby each group can be configured for access rights in the Unprivileged level. The ITM channel 0 may be therefore enabled for the user task whereas ITM channel 31 may be accessible only in Privileged level from the RTOS kernel itself.

The prototype of the ITM_putchar routine is shown in the table below.

Name | Parameter | Description
void uint32_t ITM_putchar(uint32_t chr) | character to output | The function outputs a character via the ITM channel 0. The function returns when no debugger is connected that has booked the output. It is blocking when a debugger is connected, but the previous character send is not transmitted. Return: the input character 'chr'.

Example for the usage of the ITM Channel 31 for RTOS Kernels:

  // check if debugger connected and ITM channel enabled for tracing
  if ((CoreDebug->DEMCR & CoreDebug_DEMCR_TRCENA) &&
  (ITM->TCR & ITM_TCR_ITMENA) &&
  (ITM->TER & (1UL << 31))) {
    // transmit trace data
    while (ITM->PORT31_U32 == 0);
    ITM->PORT[31].u8 = task_id;      // id of next task
    while (ITM->PORT[31].u32 == 0);
    ITM->PORT[31].u32 = task_status; // status information
  }

CMSIS Example

The following section shows a typical example for using the CMSIS layer in user applications.

#include <device.h>                              // file name depends on the device used.

void SysTick_Handler (void)  {                   // SysTick Interrupt Handler
  ;
}

void TIM1_UP_IRQHandler (void)  {                // Timer Interrupt Handler
  ;
}

void timer1_init(int frequency) {
                                                 // set up Timer (device specific)
  NVIC_SetPriority (TIM1_UP_IRQn, 1);            // Set Timer priority
  NVIC_EnableIRQ (TIM1_UP_IRQn);                 // Enable Timer Interrupt
}

void main (void) {
  SystemInit ();

  if (SysTick_Config (SystemFrequency / 1000)) { // Setup SysTick Timer for 1 msec interrupts
    :                                            // Handle Error
    :
    while (1);
  }

  timer1_init ();                                // device specific timer

  while (1);
}


STM32F10xxx DSP library firmware & FFT_Demo: C:/STM32x/Application Notes/Update_Lib_V3.0.0_AN/STM32F10x_DSP_Lib_V2.0.0/Project/FFT_Demo/src/ Directory Reference

STM32F10x_DSP_Lib_V2.0.0 » Project » FFT_Demo » src

src Directory Reference

Files

file | main.c [code]
Main program body.
file | stm3210b_lcd.c [code]
This file includes the LCD driver for AM-240320LTNQW00H (LCD_HX8312), AM-240320L8TNQW00H (LCD_ILI9320), AM-240320LDTNQW00H (LCD_SPFD5408B) Liquid Crystal Display Module of STM3210B-EVAL board.
file | stm32f10x_it.c [code]
Main Interrupt Service Routines. This file provides template for all exceptions handler and peripherals interrupt service routine.


STM32F10xxx DSP library firmware & FFT_Demo: C:/STM32x/Application Notes/Update_Lib_V3.0.0_AN/STM32F10x_DSP_Lib_V2.0.0/Libraries/ Directory Reference

STM32F10x_DSP_Lib_V2.0.0 » Libraries

Libraries Directory Reference

Directories

directory STM32F10x_DSP_Lib


STM32F10xxx DSP library firmware & FFT_Demo: C:/STM32x/Application Notes/Update_Lib_V3.0.0_AN/STM32F10x_DSP_Lib_V2.0.0/Libraries/STM32F10x_DSP_Lib/ Directory Reference

STM32F10x_DSP_Lib_V2.0.0 » Libraries » STM32F10x_DSP_Lib

STM32F10x_DSP_Lib Directory Reference

Directories

directory | inc
directory | src


STM32F10xxx DSP library firmware & FFT_Demo: C:/STM32x/Application Notes/Update_Lib_V3.0.0_AN/STM32F10x_DSP_Lib_V2.0.0/Libraries/STM32F10x_DSP_Lib/inc/ Directory Reference

STM32F10x_DSP_Lib_V2.0.0 » Libraries » STM32F10x_DSP_Lib » inc

inc Directory Reference

Files

file | stm32_dsp.h [code]
This source file contains prototypes of DSP functions.
file | table_fft.h [code]
Contains the coefficients required for FFT computation.


STM32F10xxx DSP library firmware & FFT_Demo: C:/STM32x/Application Notes/Update_Lib_V3.0.0_AN/STM32F10x_DSP_Lib_V2.0.0/Project/FFT_Demo/inc/ Directory Reference

STM32F10x_DSP_Lib_V2.0.0 » Project » FFT_Demo » inc

inc Directory Reference

Files

file | fonts.h [code]
This file contains all the LCD fonts size definition.
file | stm3210b_lcd.h [code]
This file contains all the functions prototypes for the stm3210b_lcd firmware driver.
file | stm32f10x_conf.h [code]
Library configuration file.
file | stm32f10x_it.h [code]
This file contains the headers of the interrupt handlers.


STM32F10xxx DSP library firmware & FFT_Demo: C:/STM32x/Application Notes/Update_Lib_V3.0.0_AN/STM32F10x_DSP_Lib_V2.0.0/ Directory Reference

STM32F10x_DSP_Lib_V2.0.0

STM32F10x_DSP_Lib_V2.0.0 Directory Reference

Directories

directory | Libraries
directory | Project


STM32F10xxx DSP library firmware & FFT_Demo: C:/STM32x/Application Notes/Update_Lib_V3.0.0_AN/STM32F10x_DSP_Lib_V2.0.0/Project/FFT_Demo/ Directory Reference

STM32F10x_DSP_Lib_V2.0.0 » Project » FFT_Demo

FFT_Demo Directory Reference

Directories

directory | inc
directory | src


STM32F10xxx DSP library firmware & FFT_Demo: C:/STM32x/Application Notes/Update_Lib_V3.0.0_AN/STM32F10x_DSP_Lib_V2.0.0/Project/ Directory Reference

STM32F10x_DSP_Lib_V2.0.0 » Project

Project Directory Reference

Directories

directory FFT_Demo


STM32F10xxx DSP library firmware & FFT_Demo: C:/STM32x/Application Notes/Update_Lib_V3.0.0_AN/STM32F10x_DSP_Lib_V2.0.0/Libraries/STM32F10x_DSP_Lib/src/ Directory Reference

STM32F10x_DSP_Lib_V2.0.0 » Libraries » STM32F10x_DSP_Lib » src

src Directory Reference

Files

file | iir_stm32.c [code]
This source file contains IIR functions in C.
file | PID_C_stm32.c [code]
This source file contains code PID controller.


STM32F10xxx DSP library firmware & FFT_Demo: Directory Hierarchy

Directories

This directory hierarchy is sorted roughly, but not completely, alphabetically:
  • STM32F10x_DSP_Lib_V2.0.0
    • Libraries
      • STM32F10x_DSP_Lib
        • inc
        • src
    • Project
      • FFT_Demo
        • inc
        • src


STM32F10xxx DSP library firmware & FFT_Demo: FFT_Demo.txt File Reference

FFT_Demo.txt File Reference

STM32F10x Standard Peripherals Library: Footer

For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit www.st.com/STM32


STM32F10xxx DSP library firmware & FFT_Demo: File Index

File List

Here is a list of all files with brief descriptions:
fonts.h [code] | This file contains all the LCD fonts size definition
iir_stm32.c [code] | This source file contains IIR functions in C
main.c [code] | Main program body
PID_C_stm32.c [code] | This source file contains code PID controller
stm3210b_lcd.c [code] | This file includes the LCD driver for AM-240320LTNQW00H (LCD_HX8312), AM-240320L8TNQW00H (LCD_ILI9320), AM-240320LDTNQW00H (LCD_SPFD5408B) Liquid Crystal Display Module of STM3210B-EVAL board
stm3210b_lcd.h [code] | This file contains all the functions prototypes for the stm3210b_lcd firmware driver
stm32_dsp.h [code] | This source file contains prototypes of DSP functions
stm32f10x_conf.h [code] | Library configuration file
stm32f10x_it.c [code] | Main Interrupt Service Routines. This file provides template for all exceptions handler and peripherals interrupt service routine
stm32f10x_it.h [code] | This file contains the headers of the interrupt handlers
table_fft.h [code] | Contains the coefficients required for FFT computation


STM32F10xxx DSP library firmware & FFT_Demo: fonts.h Source File

STM32F10x_DSP_Lib_V2.0.0 » Project » FFT_Demo » inc

fonts.h

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file FFT_Demo/inc/fonts.h
00004   * @author  MCD Application Team
00005   * @version  V2.0.0
00006   * @date  04/27/2009
00007   * @brief  This file contains all the LCD fonts size definition.
00008   ******************************************************************************
00009   * @copy
00010   *
00011   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
00012   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
00013   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
00014   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
00015   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
00016   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
00017   *
00018   * <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2>
00019   */
00020
00021
00022 /* Define to prevent recursive inclusion -------------------------------------*/
00023 #ifndef __FONTS_H
00024 #define __FONTS_H
00025
00026 /* Includes ------------------------------------------------------------------*/
00027 #include "stm32f10x.h"
00028
00029
00030 /* Exported types ------------------------------------------------------------*/
00031      /* ASCII Table: each character is 16 column (16dots large)
00032         and 24 raw (24 dots high) */
00033      const uint16_t ASCII_Table[] =
00034        {
00035          /* Space ' ' */
00036          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00037          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00038          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00039          /* '!' */
00040          0x0000, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180,
00041          0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0000, 0x0000,
00042          0x0180, 0x0180, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00043          /* '"' */
00044          0x0000, 0x0000, 0x00CC, 0x00CC, 0x00CC, 0x00CC, 0x00CC, 0x00CC,
00045          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00046          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00047          /* '#' */
00048          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0C60, 0x0C60,
00049          0x0C60, 0x0630, 0x0630, 0x1FFE, 0x1FFE, 0x0630, 0x0738, 0x0318,
00050          0x1FFE, 0x1FFE, 0x0318, 0x0318, 0x018C, 0x018C, 0x018C, 0x0000,
00051          /* '$' */
00052          0x0000, 0x0080, 0x03E0, 0x0FF8, 0x0E9C, 0x1C8C, 0x188C, 0x008C,
00053          0x0098, 0x01F8, 0x07E0, 0x0E80, 0x1C80, 0x188C, 0x188C, 0x189C,
00054          0x0CB8, 0x0FF0, 0x03E0, 0x0080, 0x0080, 0x0000, 0x0000, 0x0000,
00055          /* '%' */
00056          0x0000, 0x0000, 0x0000, 0x180E, 0x0C1B, 0x0C11, 0x0611, 0x0611,
00057          0x0311, 0x0311, 0x019B, 0x018E, 0x38C0, 0x6CC0, 0x4460, 0x4460,
00058          0x4430, 0x4430, 0x4418, 0x6C18, 0x380C, 0x0000, 0x0000, 0x0000,
00059          /* '&' */
00060          0x0000, 0x01E0, 0x03F0, 0x0738, 0x0618, 0x0618, 0x0330, 0x01F0,
00061          0x00F0, 0x00F8, 0x319C, 0x330E, 0x1E06, 0x1C06, 0x1C06, 0x3F06,
00062          0x73FC, 0x21F0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00063          /* ''' */
00064          0x0000, 0x0000, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C,
00065          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00066          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00067          /* '(' */
00068          0x0000, 0x0200, 0x0300, 0x0180, 0x00C0, 0x00C0, 0x0060, 0x0060,
00069          0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030,
00070          0x0060, 0x0060, 0x00C0, 0x00C0, 0x0180, 0x0300, 0x0200, 0x0000,
00071          /* ')' */
00072          0x0000, 0x0020, 0x0060, 0x00C0, 0x0180, 0x0180, 0x0300, 0x0300,
00073          0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600,
00074          0x0300, 0x0300, 0x0180, 0x0180, 0x00C0, 0x0060, 0x0020, 0x0000,
00075          /* '*' */
00076          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00C0, 0x00C0,
00077          0x06D8, 0x07F8, 0x01E0, 0x0330, 0x0738, 0x0000, 0x0000, 0x0000,
00078          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00079          /* '+' */
00080          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0180, 0x0180,
00081          0x0180, 0x0180, 0x0180, 0x3FFC, 0x3FFC, 0x0180, 0x0180, 0x0180,
00082          0x0180, 0x0180, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00083          /* ',' */
00084          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00085          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00086          0x0000, 0x0180, 0x0180, 0x0100, 0x0100, 0x0080, 0x0000, 0x0000,
00087          /* '-' */
00088          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00089          0x0000, 0x0000, 0x0000, 0x0000, 0x07E0, 0x07E0, 0x0000, 0x0000,
00090          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00091          /* '.' */
00092          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00093          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00094          0x0000, 0x00C0, 0x00C0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00095          /* '/' */
00096          0x0000, 0x0C00, 0x0C00, 0x0600, 0x0600, 0x0600, 0x0300, 0x0300,
00097          0x0300, 0x0380, 0x0180, 0x0180, 0x0180, 0x00C0, 0x00C0, 0x00C0,
00098          0x0060, 0x0060, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00099          /* '0' */
00100          0x0000, 0x03E0, 0x07F0, 0x0E38, 0x0C18, 0x180C, 0x180C, 0x180C,
00101          0x180C, 0x180C, 0x180C, 0x180C, 0x180C, 0x180C, 0x0C18, 0x0E38,
00102          0x07F0, 0x03E0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00103          /* '1' */
00104          0x0000, 0x0100, 0x0180, 0x01C0, 0x01F0, 0x0198, 0x0188, 0x0180,
00105          0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180,
00106          0x0180, 0x0180, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00107          /* '2' */
00108          0x0000, 0x03E0, 0x0FF8, 0x0C18, 0x180C, 0x180C, 0x1800, 0x1800,
00109          0x0C00, 0x0600, 0x0300, 0x0180, 0x00C0, 0x0060, 0x0030, 0x0018,
00110          0x1FFC, 0x1FFC, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00111          /* '3' */
00112          0x0000, 0x01E0, 0x07F8, 0x0E18, 0x0C0C, 0x0C0C, 0x0C00, 0x0600,
00113          0x03C0, 0x07C0, 0x0C00, 0x1800, 0x1800, 0x180C, 0x180C, 0x0C18,
00114          0x07F8, 0x03E0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00115          /* '4' */
00116          0x0000, 0x0C00, 0x0E00, 0x0F00, 0x0F00, 0x0D80, 0x0CC0, 0x0C60,
00117          0x0C60, 0x0C30, 0x0C18, 0x0C0C, 0x3FFC, 0x3FFC, 0x0C00, 0x0C00,
00118          0x0C00, 0x0C00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00119          /* '5' */
00120          0x0000, 0x0FF8, 0x0FF8, 0x0018, 0x0018, 0x000C, 0x03EC, 0x07FC,
00121          0x0E1C, 0x1C00, 0x1800, 0x1800, 0x1800, 0x180C, 0x0C1C, 0x0E18,
00122          0x07F8, 0x03E0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00123          /* '6' */
00124          0x0000, 0x07C0, 0x0FF0, 0x1C38, 0x1818, 0x0018, 0x000C, 0x03CC,
00125          0x0FEC, 0x0E3C, 0x1C1C, 0x180C, 0x180C, 0x180C, 0x1C18, 0x0E38,
00126          0x07F0, 0x03E0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00127          /* '7' */
00128          0x0000, 0x1FFC, 0x1FFC, 0x0C00, 0x0600, 0x0600, 0x0300, 0x0380,
00129          0x0180, 0x01C0, 0x00C0, 0x00E0, 0x0060, 0x0060, 0x0070, 0x0030,
00130          0x0030, 0x0030, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00131          /* '8' */
00132          0x0000, 0x03E0, 0x07F0, 0x0E38, 0x0C18, 0x0C18, 0x0C18, 0x0638,
00133          0x07F0, 0x07F0, 0x0C18, 0x180C, 0x180C, 0x180C, 0x180C, 0x0C38,
00134          0x0FF8, 0x03E0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00135          /* '9' */
00136          0x0000, 0x03E0, 0x07F0, 0x0E38, 0x0C1C, 0x180C, 0x180C, 0x180C,
00137          0x1C1C, 0x1E38, 0x1BF8, 0x19E0, 0x1800, 0x0C00, 0x0C00, 0x0E1C,
00138          0x07F8, 0x01F0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00139          /* ':' */
00140          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0180, 0x0180,
00141          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00142          0x0180, 0x0180, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00143          /* ';' */
00144          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0180, 0x0180,
00145          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00146          0x0180, 0x0180, 0x0100, 0x0100, 0x0080, 0x0000, 0x0000, 0x0000,
00147          /* '<' */
00148          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00149          0x1000, 0x1C00, 0x0F80, 0x03E0, 0x00F8, 0x0018, 0x00F8, 0x03E0,
00150          0x0F80, 0x1C00, 0x1000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00151          /* '=' */
00152          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00153          0x1FF8, 0x0000, 0x0000, 0x0000, 0x1FF8, 0x0000, 0x0000, 0x0000,
00154          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00155          /* '>' */
00156          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00157          0x0008, 0x0038, 0x01F0, 0x07C0, 0x1F00, 0x1800, 0x1F00, 0x07C0,
00158          0x01F0, 0x0038, 0x0008, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00159          /* '?' */
00160          0x0000, 0x03E0, 0x0FF8, 0x0C18, 0x180C, 0x180C, 0x1800, 0x0C00,
00161          0x0600, 0x0300, 0x0180, 0x00C0, 0x00C0, 0x00C0, 0x0000, 0x0000,
00162          0x00C0, 0x00C0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00163          /* '@' */
00164          0x0000, 0x0000, 0x07E0, 0x1818, 0x2004, 0x29C2, 0x4A22, 0x4411,
00165          0x4409, 0x4409, 0x4409, 0x2209, 0x1311, 0x0CE2, 0x4002, 0x2004,
00166          0x1818, 0x07E0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00167          /* 'A' */
00168          0x0000, 0x0380, 0x0380, 0x06C0, 0x06C0, 0x06C0, 0x0C60, 0x0C60,
00169          0x1830, 0x1830, 0x1830, 0x3FF8, 0x3FF8, 0x701C, 0x600C, 0x600C,
00170          0xC006, 0xC006, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00171          /* 'B' */
00172          0x0000, 0x03FC, 0x0FFC, 0x0C0C, 0x180C, 0x180C, 0x180C, 0x0C0C,
00173          0x07FC, 0x0FFC, 0x180C, 0x300C, 0x300C, 0x300C, 0x300C, 0x180C,
00174          0x1FFC, 0x07FC, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00175          /* 'C' */
00176          0x0000, 0x07C0, 0x1FF0, 0x3838, 0x301C, 0x700C, 0x6006, 0x0006,
00177          0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x6006, 0x700C, 0x301C,
00178          0x1FF0, 0x07E0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00179          /* 'D' */
00180          0x0000, 0x03FE, 0x0FFE, 0x0E06, 0x1806, 0x1806, 0x3006, 0x3006,
00181          0x3006, 0x3006, 0x3006, 0x3006, 0x3006, 0x1806, 0x1806, 0x0E06,
00182          0x0FFE, 0x03FE, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00183          /* 'E' */
00184          0x0000, 0x3FFC, 0x3FFC, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C,
00185          0x1FFC, 0x1FFC, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C,
00186          0x3FFC, 0x3FFC, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00187          /* 'F' */
00188          0x0000, 0x3FF8, 0x3FF8, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018,
00189          0x1FF8, 0x1FF8, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018,
00190          0x0018, 0x0018, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00191          /* 'G' */
00192          0x0000, 0x0FE0, 0x3FF8, 0x783C, 0x600E, 0xE006, 0xC007, 0x0003,
00193          0x0003, 0xFE03, 0xFE03, 0xC003, 0xC007, 0xC006, 0xC00E, 0xF03C,
00194          0x3FF8, 0x0FE0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00195          /* 'H' */
00196          0x0000, 0x300C, 0x300C, 0x300C, 0x300C, 0x300C, 0x300C, 0x300C,
00197          0x3FFC, 0x3FFC, 0x300C, 0x300C, 0x300C, 0x300C, 0x300C, 0x300C,
00198          0x300C, 0x300C, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00199          /* 'I' */
00200          0x0000, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180,
00201          0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180,
00202          0x0180, 0x0180, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00203          /* 'J' */
00204          0x0000, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600,
00205          0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0618, 0x0618, 0x0738,
00206          0x03F0, 0x01E0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00207          /* 'K' */
00208          0x0000, 0x3006, 0x1806, 0x0C06, 0x0606, 0x0306, 0x0186, 0x00C6,
00209          0x0066, 0x0076, 0x00DE, 0x018E, 0x0306, 0x0606, 0x0C06, 0x1806,
00210          0x3006, 0x6006, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00211          /* 'L' */
00212          0x0000, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018,
00213          0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018,
00214          0x1FF8, 0x1FF8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00215          /* 'M' */
00216          0x0000, 0xE00E, 0xF01E, 0xF01E, 0xF01E, 0xD836, 0xD836, 0xD836,
00217          0xD836, 0xCC66, 0xCC66, 0xCC66, 0xC6C6, 0xC6C6, 0xC6C6, 0xC6C6,
00218          0xC386, 0xC386, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00219          /* 'N' */
00220          0x0000, 0x300C, 0x301C, 0x303C, 0x303C, 0x306C, 0x306C, 0x30CC,
00221          0x30CC, 0x318C, 0x330C, 0x330C, 0x360C, 0x360C, 0x3C0C, 0x3C0C,
00222          0x380C, 0x300C, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00223          /* 'O' */
00224          0x0000, 0x07E0, 0x1FF8, 0x381C, 0x700E, 0x6006, 0xC003, 0xC003,
00225          0xC003, 0xC003, 0xC003, 0xC003, 0xC003, 0x6006, 0x700E, 0x381C,
00226          0x1FF8, 0x07E0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00227          /* 'P' */
00228          0x0000, 0x0FFC, 0x1FFC, 0x380C, 0x300C, 0x300C, 0x300C, 0x300C,
00229          0x180C, 0x1FFC, 0x07FC, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C,
00230          0x000C, 0x000C, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00231          /* 'Q' */
00232          0x0000, 0x07E0, 0x1FF8, 0x381C, 0x700E, 0x6006, 0xE003, 0xC003,
00233          0xC003, 0xC003, 0xC003, 0xC003, 0xE007, 0x6306, 0x3F0E, 0x3C1C,
00234          0x3FF8, 0xF7E0, 0xC000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00235          /* 'R' */
00236          0x0000, 0x0FFE, 0x1FFE, 0x3806, 0x3006, 0x3006, 0x3006, 0x3806,
00237          0x1FFE, 0x07FE, 0x0306, 0x0606, 0x0C06, 0x1806, 0x1806, 0x3006,
00238          0x3006, 0x6006, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00239          /* 'S' */
00240          0x0000, 0x03E0, 0x0FF8, 0x0C1C, 0x180C, 0x180C, 0x000C, 0x001C,
00241          0x03F8, 0x0FE0, 0x1E00, 0x3800, 0x3006, 0x3006, 0x300E, 0x1C1C,
00242          0x0FF8, 0x07E0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00243          /* 'T' */
00244          0x0000, 0x7FFE, 0x7FFE, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180,
00245          0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180,
00246          0x0180, 0x0180, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00247          /* 'U' */
00248          0x0000, 0x300C, 0x300C, 0x300C, 0x300C, 0x300C, 0x300C, 0x300C,
00249          0x300C, 0x300C, 0x300C, 0x300C, 0x300C, 0x300C, 0x300C, 0x1818,
00250          0x1FF8, 0x07E0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00251          /* 'V' */
00252          0x0000, 0x6003, 0x3006, 0x3006, 0x3006, 0x180C, 0x180C, 0x180C,
00253          0x0C18, 0x0C18, 0x0E38, 0x0630, 0x0630, 0x0770, 0x0360, 0x0360,
00254          0x01C0, 0x01C0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00255          /* 'W' */
00256          0x0000, 0x6003, 0x61C3, 0x61C3, 0x61C3, 0x3366, 0x3366, 0x3366,
00257          0x3366, 0x3366, 0x3366, 0x1B6C, 0x1B6C, 0x1B6C, 0x1A2C, 0x1E3C,
00258          0x0E38, 0x0E38, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00259          /* 'X' */
00260          0x0000, 0xE00F, 0x700C, 0x3018, 0x1830, 0x0C70, 0x0E60, 0x07C0,
00261          0x0380, 0x0380, 0x03C0, 0x06E0, 0x0C70, 0x1C30, 0x1818, 0x300C,
00262          0x600E, 0xE007, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00263          /* 'Y' */
00264          0x0000, 0xC003, 0x6006, 0x300C, 0x381C, 0x1838, 0x0C30, 0x0660,
00265          0x07E0, 0x03C0, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180,
00266          0x0180, 0x0180, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00267          /* 'Z' */
00268          0x0000, 0x7FFC, 0x7FFC, 0x6000, 0x3000, 0x1800, 0x0C00, 0x0600,
00269          0x0300, 0x0180, 0x00C0, 0x0060, 0x0030, 0x0018, 0x000C, 0x0006,
00270          0x7FFE, 0x7FFE, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00271          /* '[' */
00272          0x0000, 0x03E0, 0x03E0, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060,
00273          0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060,
00274          0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x03E0, 0x03E0, 0x0000,
00275          /* '\' */
00276          0x0000, 0x0030, 0x0030, 0x0060, 0x0060, 0x0060, 0x00C0, 0x00C0,
00277          0x00C0, 0x01C0, 0x0180, 0x0180, 0x0180, 0x0300, 0x0300, 0x0300,
00278          0x0600, 0x0600, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00279          /* ']' */
00280          0x0000, 0x03E0, 0x03E0, 0x0300, 0x0300, 0x0300, 0x0300, 0x0300,
00281          0x0300, 0x0300, 0x0300, 0x0300, 0x0300, 0x0300, 0x0300, 0x0300,
00282          0x0300, 0x0300, 0x0300, 0x0300, 0x0300, 0x03E0, 0x03E0, 0x0000,
00283          /* '^' */
00284          0x0000, 0x0000, 0x01C0, 0x01C0, 0x0360, 0x0360, 0x0360, 0x0630,
00285          0x0630, 0x0C18, 0x0C18, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00286          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00287          /* '_' */
00288          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00289          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00290          0x0000, 0xFFFF, 0xFFFF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00291          /* ''' */
00292          0x0000, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x0000,
00293          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00294          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00295          /* 'a' */
00296          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x03F0, 0x07F8,
00297          0x0C1C, 0x0C0C, 0x0F00, 0x0FF0, 0x0CF8, 0x0C0C, 0x0C0C, 0x0F1C,
00298          0x0FF8, 0x18F0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00299          /* 'b' */
00300          0x0000, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x03D8, 0x0FF8,
00301          0x0C38, 0x1818, 0x1818, 0x1818, 0x1818, 0x1818, 0x1818, 0x0C38,
00302          0x0FF8, 0x03D8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00303          /* 'c' */
00304          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x03C0, 0x07F0,
00305          0x0E30, 0x0C18, 0x0018, 0x0018, 0x0018, 0x0018, 0x0C18, 0x0E30,
00306          0x07F0, 0x03C0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00307          /* 'd' */
00308          0x0000, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1BC0, 0x1FF0,
00309          0x1C30, 0x1818, 0x1818, 0x1818, 0x1818, 0x1818, 0x1818, 0x1C30,
00310          0x1FF0, 0x1BC0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00311          /* 'e' */
00312          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x03C0, 0x0FF0,
00313          0x0C30, 0x1818, 0x1FF8, 0x1FF8, 0x0018, 0x0018, 0x1838, 0x1C30,
00314          0x0FF0, 0x07C0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00315          /* 'f' */
00316          0x0000, 0x0F80, 0x0FC0, 0x00C0, 0x00C0, 0x00C0, 0x07F0, 0x07F0,
00317          0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0,
00318          0x00C0, 0x00C0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00319          /* 'g' */
00320          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0DE0, 0x0FF8,
00321          0x0E18, 0x0C0C, 0x0C0C, 0x0C0C, 0x0C0C, 0x0C0C, 0x0C0C, 0x0E18,
00322          0x0FF8, 0x0DE0, 0x0C00, 0x0C0C, 0x061C, 0x07F8, 0x01F0, 0x0000,
00323          /* 'h' */
00324          0x0000, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x07D8, 0x0FF8,
00325          0x1C38, 0x1818, 0x1818, 0x1818, 0x1818, 0x1818, 0x1818, 0x1818,
00326          0x1818, 0x1818, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00327          /* 'i' */
00328          0x0000, 0x00C0, 0x00C0, 0x0000, 0x0000, 0x0000, 0x00C0, 0x00C0,
00329          0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0,
00330          0x00C0, 0x00C0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00331          /* 'j' */
00332          0x0000, 0x00C0, 0x00C0, 0x0000, 0x0000, 0x0000, 0x00C0, 0x00C0,
00333          0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0,
00334          0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00F8, 0x0078, 0x0000,
00335          /* 'k' */
00336          0x0000, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x0C0C, 0x060C,
00337          0x030C, 0x018C, 0x00CC, 0x006C, 0x00FC, 0x019C, 0x038C, 0x030C,
00338          0x060C, 0x0C0C, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00339          /* 'l' */
00340          0x0000, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0,
00341          0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0,
00342          0x00C0, 0x00C0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00343          /* 'm' */
00344          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3C7C, 0x7EFF,
00345          0xE3C7, 0xC183, 0xC183, 0xC183, 0xC183, 0xC183, 0xC183, 0xC183,
00346          0xC183, 0xC183, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00347          /* 'n' */
00348          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0798, 0x0FF8,
00349          0x1C38, 0x1818, 0x1818, 0x1818, 0x1818, 0x1818, 0x1818, 0x1818,
00350          0x1818, 0x1818, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00351          /* 'o' */
00352          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x03C0, 0x0FF0,
00353          0x0C30, 0x1818, 0x1818, 0x1818, 0x1818, 0x1818, 0x1818, 0x0C30,
00354          0x0FF0, 0x03C0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00355          /* 'p' */
00356          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x03D8, 0x0FF8,
00357          0x0C38, 0x1818, 0x1818, 0x1818, 0x1818, 0x1818, 0x1818, 0x0C38,
00358          0x0FF8, 0x03D8, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0000,
00359          /* 'q' */
00360          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1BC0, 0x1FF0,
00361          0x1C30, 0x1818, 0x1818, 0x1818, 0x1818, 0x1818, 0x1818, 0x1C30,
00362          0x1FF0, 0x1BC0, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x0000,
00363          /* 'r' */
00364          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x07B0, 0x03F0,
00365          0x0070, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030,
00366          0x0030, 0x0030, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00367          /* 's' */
00368          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x03E0, 0x03F0,
00369          0x0E38, 0x0C18, 0x0038, 0x03F0, 0x07C0, 0x0C00, 0x0C18, 0x0E38,
00370          0x07F0, 0x03E0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00371          /* 't' */
00372          0x0000, 0x0000, 0x0080, 0x00C0, 0x00C0, 0x00C0, 0x07F0, 0x07F0,
00373          0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0,
00374          0x07C0, 0x0780, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00375          /* 'u' */
00376          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1818, 0x1818,
00377          0x1818, 0x1818, 0x1818, 0x1818, 0x1818, 0x1818, 0x1818, 0x1C38,
00378          0x1FF0, 0x19E0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00379          /* 'v' */
00380          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x180C, 0x0C18,
00381          0x0C18, 0x0C18, 0x0630, 0x0630, 0x0630, 0x0360, 0x0360, 0x0360,
00382          0x01C0, 0x01C0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00383          /* 'w' */
00384          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x41C1, 0x41C1,
00385          0x61C3, 0x6363, 0x6363, 0x6363, 0x3636, 0x3636, 0x3636, 0x1C1C,
00386          0x1C1C, 0x1C1C, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00387          /* 'x' */
00388          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x381C, 0x1C38,
00389          0x0C30, 0x0660, 0x0360, 0x0360, 0x0360, 0x0360, 0x0660, 0x0C30,
00390          0x1C38, 0x381C, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00391          /* 'y' */
00392          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3018, 0x1830,
00393          0x1830, 0x1870, 0x0C60, 0x0C60, 0x0CE0, 0x06C0, 0x06C0, 0x0380,
00394          0x0380, 0x0380, 0x0180, 0x0180, 0x01C0, 0x00F0, 0x0070, 0x0000,
00395          /* 'z' */
00396          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1FFC, 0x1FFC,
00397          0x0C00, 0x0600, 0x0300, 0x0180, 0x00C0, 0x0060, 0x0030, 0x0018,
00398          0x1FFC, 0x1FFC, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00399          /* '{' */
00400          0x0000, 0x0300, 0x0180, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C0,
00401          0x00C0, 0x0060, 0x0060, 0x0030, 0x0060, 0x0040, 0x00C0, 0x00C0,
00402          0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x0180, 0x0300, 0x0000, 0x0000,
00403          /* '|' */
00404          0x0000, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180,
00405          0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180,
00406          0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0000,
00407          /* '}' */
00408          0x0000, 0x0060, 0x00C0, 0x01C0, 0x0180, 0x0180, 0x0180, 0x0180,
00409          0x0180, 0x0300, 0x0300, 0x0600, 0x0300, 0x0100, 0x0180, 0x0180,
00410          0x0180, 0x0180, 0x0180, 0x0180, 0x00C0, 0x0060, 0x0000, 0x0000,
00411          /* '~' */
00412          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00413          0x10F0, 0x1FF8, 0x0F08, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00414          0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
00415       };
00416 /* Exported constants --------------------------------------------------------*/
00417 /* Exported macro ------------------------------------------------------------*/
00418 /* Exported functions ------------------------------------------------------- */
00419
00420 #endif /* __FONTS_H */
00421
00422 /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields - Variables

  • Data Structure Index
  • Data Fields
  • All
  • Variables

  • h : COEFS
  • nh : COEFS


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • a
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- l -

  • lBUFIN : main.c
  • lBUFMAG : main.c
  • lBUFOUT : main.c
  • LCD_Clear() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_ClearLine() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_CtrlLinesConfig() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_CtrlLinesWrite() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_DisplayChar() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_DisplayOff() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_DisplayOn() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_DisplayStringLine() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_DrawChar() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_DrawCircle() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_DrawLine() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_DrawMonoPict() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_DrawRect() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_HX8312 : stm3210b_lcd.c
  • LCD_ILI9320 : stm3210b_lcd.c
  • LCD_nCS_StartByte() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_PowerOn() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_READ_REG : stm3210b_lcd.c
  • LCD_ReadReg() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_SetBackColor() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_SetCursor() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_SetDisplayWindow() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_SetTextColor() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_Setup() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_SPFD5408 : stm3210b_lcd.c
  • LCD_SPIConfig() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_WindowModeDisable() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_WRITE_REG : stm3210b_lcd.c
  • LCD_WriteRAM() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_WriteRAM_Prepare() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_WriteRAMWord() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_WriteReg() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_WriteRegHX8312() : stm3210b_lcd.c
  • LCD_WriteRegILI9320() : stm3210b_lcd.c
  • LCD_WriteRegIndex() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCDType : stm3210b_lcd.c
  • Line0 : stm3210b_lcd.h
  • Line1 : stm3210b_lcd.h
  • Line2 : stm3210b_lcd.h
  • Line3 : stm3210b_lcd.h
  • Line4 : stm3210b_lcd.h
  • Line5 : stm3210b_lcd.h
  • Line6 : stm3210b_lcd.h
  • Line7 : stm3210b_lcd.h
  • Line8 : stm3210b_lcd.h
  • Line9 : stm3210b_lcd.h


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • a
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- m -

  • Magenta : stm3210b_lcd.h
  • main() : main.c
  • MemManage_Handler() : stm32f10x_it.c , stm32f10x_it.h
  • MyDualSweep() : main.c
  • MygSin() : main.c


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • a
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- n -

  • NMI_Handler() : stm32f10x_it.h , stm32f10x_it.c
  • NPT : main.c


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • a
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- o -

  • onesided() : main.c
  • Out_displayWaveform() : main.c


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • a
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- b -

  • BackColor : stm3210b_lcd.c
  • Black : stm3210b_lcd.h
  • Blue : stm3210b_lcd.h
  • Blue2 : stm3210b_lcd.h
  • BusFault_Handler() : stm32f10x_it.h , stm32f10x_it.c


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • a
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- c -

  • cr4_fft_1024_stm32() : stm32_dsp.h
  • cr4_fft_256_stm32() : stm32_dsp.h
  • cr4_fft_64_stm32() : stm32_dsp.h
  • CtrlPin_NCS : stm3210b_lcd.h
  • CtrlPin_NWR : stm3210b_lcd.h
  • CtrlPin_RS : stm3210b_lcd.h
  • Cyan : stm3210b_lcd.h


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • a
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- d -

  • DebugMon_Handler() : stm32f10x_it.h , stm32f10x_it.c
  • Delay() : main.c , stm3210b_lcd.h
  • DISPLAY_LEFT : main.c
  • DISPLAY_RIGHT : main.c
  • displayPowerMag() : main.c
  • DisplayTitle() : main.c
  • DoFullPID() : stm32_dsp.h , PID_C_stm32.c
  • DoPID() : PID_C_stm32.c , stm32_dsp.h
  • DSPDemoInit() : main.c


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • a
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- f -

  • fir_16by16_stm32() : stm32_dsp.h


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • a
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- g -

  • Green : stm3210b_lcd.h
  • Grey : stm3210b_lcd.h


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • a
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- h -

  • HardFault_Handler() : stm32f10x_it.h , stm32f10x_it.c
  • Horizontal : stm3210b_lcd.h


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • a
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- i -

  • iir_biquad_stm32() : stm32_dsp.h , iir_stm32.c
  • iirarma_stm32() : stm32_dsp.h
  • In_displayWaveform() : main.c
  • IntTerm : PID_C_stm32.c
  • IntTerm_C : PID_C_stm32.c


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • a
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- p -

  • PendSV_Handler() : stm32f10x_it.h , stm32f10x_it.c
  • PI2 : main.c
  • PID_stm32() : stm32_dsp.h
  • powerMag() : main.c
  • PrevError : PID_C_stm32.c
  • PrevError_C : PID_C_stm32.c


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • a
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- r -

  • R0 : stm3210b_lcd.h
  • R1 : stm3210b_lcd.h
  • R10 : stm3210b_lcd.h
  • R106 : stm3210b_lcd.h
  • R118 : stm3210b_lcd.h
  • R12 : stm3210b_lcd.h
  • R128 : stm3210b_lcd.h
  • R129 : stm3210b_lcd.h
  • R13 : stm3210b_lcd.h
  • R130 : stm3210b_lcd.h
  • R131 : stm3210b_lcd.h
  • R132 : stm3210b_lcd.h
  • R133 : stm3210b_lcd.h
  • R134 : stm3210b_lcd.h
  • R135 : stm3210b_lcd.h
  • R136 : stm3210b_lcd.h
  • R137 : stm3210b_lcd.h
  • R139 : stm3210b_lcd.h
  • R14 : stm3210b_lcd.h
  • R140 : stm3210b_lcd.h
  • R141 : stm3210b_lcd.h
  • R143 : stm3210b_lcd.h
  • R144 : stm3210b_lcd.h
  • R145 : stm3210b_lcd.h
  • R146 : stm3210b_lcd.h
  • R147 : stm3210b_lcd.h
  • R148 : stm3210b_lcd.h
  • R149 : stm3210b_lcd.h
  • R15 : stm3210b_lcd.h
  • R150 : stm3210b_lcd.h
  • R151 : stm3210b_lcd.h
  • R152 : stm3210b_lcd.h
  • R153 : stm3210b_lcd.h
  • R154 : stm3210b_lcd.h
  • R157 : stm3210b_lcd.h
  • R16 : stm3210b_lcd.h
  • R17 : stm3210b_lcd.h
  • R18 : stm3210b_lcd.h
  • R19 : stm3210b_lcd.h
  • R192 : stm3210b_lcd.h
  • R193 : stm3210b_lcd.h
  • R2 : stm3210b_lcd.h
  • R20 : stm3210b_lcd.h
  • R21 : stm3210b_lcd.h
  • R22 : stm3210b_lcd.h
  • R227 : stm3210b_lcd.h
  • R229 : stm3210b_lcd.h
  • R23 : stm3210b_lcd.h
  • R231 : stm3210b_lcd.h
  • R239 : stm3210b_lcd.h
  • R24 : stm3210b_lcd.h
  • R25 : stm3210b_lcd.h
  • R26 : stm3210b_lcd.h
  • R27 : stm3210b_lcd.h
  • R28 : stm3210b_lcd.h
  • R29 : stm3210b_lcd.h
  • R3 : stm3210b_lcd.h
  • R30 : stm3210b_lcd.h
  • R31 : stm3210b_lcd.h
  • R32 : stm3210b_lcd.h
  • R33 : stm3210b_lcd.h
  • R34 : stm3210b_lcd.h
  • R36 : stm3210b_lcd.h
  • R37 : stm3210b_lcd.h
  • R4 : stm3210b_lcd.h
  • R40 : stm3210b_lcd.h
  • R41 : stm3210b_lcd.h
  • R43 : stm3210b_lcd.h
  • R45 : stm3210b_lcd.h
  • R48 : stm3210b_lcd.h
  • R49 : stm3210b_lcd.h
  • R5 : stm3210b_lcd.h
  • R50 : stm3210b_lcd.h
  • R51 : stm3210b_lcd.h
  • R52 : stm3210b_lcd.h
  • R53 : stm3210b_lcd.h
  • R54 : stm3210b_lcd.h
  • R55 : stm3210b_lcd.h
  • R56 : stm3210b_lcd.h
  • R57 : stm3210b_lcd.h
  • R59 : stm3210b_lcd.h
  • R6 : stm3210b_lcd.h
  • R60 : stm3210b_lcd.h
  • R61 : stm3210b_lcd.h
  • R62 : stm3210b_lcd.h
  • R63 : stm3210b_lcd.h
  • R64 : stm3210b_lcd.h
  • R65 : stm3210b_lcd.h
  • R66 : stm3210b_lcd.h
  • R67 : stm3210b_lcd.h
  • R68 : stm3210b_lcd.h
  • R69 : stm3210b_lcd.h
  • R7 : stm3210b_lcd.h
  • R70 : stm3210b_lcd.h
  • R71 : stm3210b_lcd.h
  • R72 : stm3210b_lcd.h
  • R73 : stm3210b_lcd.h
  • R74 : stm3210b_lcd.h
  • R75 : stm3210b_lcd.h
  • R76 : stm3210b_lcd.h
  • R77 : stm3210b_lcd.h
  • R78 : stm3210b_lcd.h
  • R79 : stm3210b_lcd.h
  • R8 : stm3210b_lcd.h
  • R80 : stm3210b_lcd.h
  • R81 : stm3210b_lcd.h
  • R82 : stm3210b_lcd.h
  • R83 : stm3210b_lcd.h
  • R9 : stm3210b_lcd.h
  • R96 : stm3210b_lcd.h
  • R97 : stm3210b_lcd.h
  • READ_STATUS : stm3210b_lcd.c
  • Red : stm3210b_lcd.h


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • a
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- s -

  • SET_INDEX : stm3210b_lcd.c
  • START_BYTE : stm3210b_lcd.c
  • STM3210B_LCD_Init() : stm3210b_lcd.c , stm3210b_lcd.h
  • SVC_Handler() : stm32f10x_it.h , stm32f10x_it.c
  • SysTick_Handler() : stm32f10x_it.c , stm32f10x_it.h


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • a
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- t -

  • TableFFT : main.c , table_fft.h
  • TextColor : stm3210b_lcd.c
  • TimingDelay : main.c , stm32f10x_it.c


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • a
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- u -

  • UsageFault_Handler() : stm32f10x_it.h , stm32f10x_it.c


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • a
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- v -

  • Vertical : stm3210b_lcd.h


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • a
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- w -

  • White : stm3210b_lcd.h


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • a
  • b
  • c
  • d
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • y
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- y -

  • Yellow : stm3210b_lcd.h


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • a
  • b
  • c
  • d
  • g
  • h
  • l
  • m
  • n
  • p
  • r
  • s
  • v
  • w
  • y

- a -

  • assert_param : stm32f10x_conf.h

- b -

  • Black : stm3210b_lcd.h
  • Blue : stm3210b_lcd.h
  • Blue2 : stm3210b_lcd.h

- c -

  • CtrlPin_NCS : stm3210b_lcd.h
  • CtrlPin_NWR : stm3210b_lcd.h
  • CtrlPin_RS : stm3210b_lcd.h
  • Cyan : stm3210b_lcd.h

- d -

  • DISPLAY_LEFT : main.c
  • DISPLAY_RIGHT : main.c

- g -

  • Green : stm3210b_lcd.h
  • Grey : stm3210b_lcd.h

- h -

  • Horizontal : stm3210b_lcd.h

- l -

  • LCD_HX8312 : stm3210b_lcd.c
  • LCD_ILI9320 : stm3210b_lcd.c
  • LCD_READ_REG : stm3210b_lcd.c
  • LCD_SPFD5408 : stm3210b_lcd.c
  • LCD_WRITE_REG : stm3210b_lcd.c
  • Line0 : stm3210b_lcd.h
  • Line1 : stm3210b_lcd.h
  • Line2 : stm3210b_lcd.h
  • Line3 : stm3210b_lcd.h
  • Line4 : stm3210b_lcd.h
  • Line5 : stm3210b_lcd.h
  • Line6 : stm3210b_lcd.h
  • Line7 : stm3210b_lcd.h
  • Line8 : stm3210b_lcd.h
  • Line9 : stm3210b_lcd.h

- m -

  • Magenta : stm3210b_lcd.h

- n -

  • NPT : main.c

- p -

  • PI2 : main.c

- r -

  • R0 : stm3210b_lcd.h
  • R1 : stm3210b_lcd.h
  • R10 : stm3210b_lcd.h
  • R106 : stm3210b_lcd.h
  • R118 : stm3210b_lcd.h
  • R12 : stm3210b_lcd.h
  • R128 : stm3210b_lcd.h
  • R129 : stm3210b_lcd.h
  • R13 : stm3210b_lcd.h
  • R130 : stm3210b_lcd.h
  • R131 : stm3210b_lcd.h
  • R132 : stm3210b_lcd.h
  • R133 : stm3210b_lcd.h
  • R134 : stm3210b_lcd.h
  • R135 : stm3210b_lcd.h
  • R136 : stm3210b_lcd.h
  • R137 : stm3210b_lcd.h
  • R139 : stm3210b_lcd.h
  • R14 : stm3210b_lcd.h
  • R140 : stm3210b_lcd.h
  • R141 : stm3210b_lcd.h
  • R143 : stm3210b_lcd.h
  • R144 : stm3210b_lcd.h
  • R145 : stm3210b_lcd.h
  • R146 : stm3210b_lcd.h
  • R147 : stm3210b_lcd.h
  • R148 : stm3210b_lcd.h
  • R149 : stm3210b_lcd.h
  • R15 : stm3210b_lcd.h
  • R150 : stm3210b_lcd.h
  • R151 : stm3210b_lcd.h
  • R152 : stm3210b_lcd.h
  • R153 : stm3210b_lcd.h
  • R154 : stm3210b_lcd.h
  • R157 : stm3210b_lcd.h
  • R16 : stm3210b_lcd.h
  • R17 : stm3210b_lcd.h
  • R18 : stm3210b_lcd.h
  • R19 : stm3210b_lcd.h
  • R192 : stm3210b_lcd.h
  • R193 : stm3210b_lcd.h
  • R2 : stm3210b_lcd.h
  • R20 : stm3210b_lcd.h
  • R21 : stm3210b_lcd.h
  • R22 : stm3210b_lcd.h
  • R227 : stm3210b_lcd.h
  • R229 : stm3210b_lcd.h
  • R23 : stm3210b_lcd.h
  • R231 : stm3210b_lcd.h
  • R239 : stm3210b_lcd.h
  • R24 : stm3210b_lcd.h
  • R25 : stm3210b_lcd.h
  • R26 : stm3210b_lcd.h
  • R27 : stm3210b_lcd.h
  • R28 : stm3210b_lcd.h
  • R29 : stm3210b_lcd.h
  • R3 : stm3210b_lcd.h
  • R30 : stm3210b_lcd.h
  • R31 : stm3210b_lcd.h
  • R32 : stm3210b_lcd.h
  • R33 : stm3210b_lcd.h
  • R34 : stm3210b_lcd.h
  • R36 : stm3210b_lcd.h
  • R37 : stm3210b_lcd.h
  • R4 : stm3210b_lcd.h
  • R40 : stm3210b_lcd.h
  • R41 : stm3210b_lcd.h
  • R43 : stm3210b_lcd.h
  • R45 : stm3210b_lcd.h
  • R48 : stm3210b_lcd.h
  • R49 : stm3210b_lcd.h
  • R5 : stm3210b_lcd.h
  • R50 : stm3210b_lcd.h
  • R51 : stm3210b_lcd.h
  • R52 : stm3210b_lcd.h
  • R53 : stm3210b_lcd.h
  • R54 : stm3210b_lcd.h
  • R55 : stm3210b_lcd.h
  • R56 : stm3210b_lcd.h
  • R57 : stm3210b_lcd.h
  • R59 : stm3210b_lcd.h
  • R6 : stm3210b_lcd.h
  • R60 : stm3210b_lcd.h
  • R61 : stm3210b_lcd.h
  • R62 : stm3210b_lcd.h
  • R63 : stm3210b_lcd.h
  • R64 : stm3210b_lcd.h
  • R65 : stm3210b_lcd.h
  • R66 : stm3210b_lcd.h
  • R67 : stm3210b_lcd.h
  • R68 : stm3210b_lcd.h
  • R69 : stm3210b_lcd.h
  • R7 : stm3210b_lcd.h
  • R70 : stm3210b_lcd.h
  • R71 : stm3210b_lcd.h
  • R72 : stm3210b_lcd.h
  • R73 : stm3210b_lcd.h
  • R74 : stm3210b_lcd.h
  • R75 : stm3210b_lcd.h
  • R76 : stm3210b_lcd.h
  • R77 : stm3210b_lcd.h
  • R78 : stm3210b_lcd.h
  • R79 : stm3210b_lcd.h
  • R8 : stm3210b_lcd.h
  • R80 : stm3210b_lcd.h
  • R81 : stm3210b_lcd.h
  • R82 : stm3210b_lcd.h
  • R83 : stm3210b_lcd.h
  • R9 : stm3210b_lcd.h
  • R96 : stm3210b_lcd.h
  • R97 : stm3210b_lcd.h
  • READ_STATUS : stm3210b_lcd.c
  • Red : stm3210b_lcd.h

- s -

  • SET_INDEX : stm3210b_lcd.c
  • START_BYTE : stm3210b_lcd.c

- v -

  • Vertical : stm3210b_lcd.h

- w -

  • White : stm3210b_lcd.h

- y -

  • Yellow : stm3210b_lcd.h


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • b
  • c
  • d
  • f
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • s
  • u

- b -

  • BusFault_Handler() : stm32f10x_it.h , stm32f10x_it.c

- c -

  • cr4_fft_1024_stm32() : stm32_dsp.h
  • cr4_fft_256_stm32() : stm32_dsp.h
  • cr4_fft_64_stm32() : stm32_dsp.h

- d -

  • DebugMon_Handler() : stm32f10x_it.h , stm32f10x_it.c
  • Delay() : main.c , stm3210b_lcd.h
  • displayPowerMag() : main.c
  • DisplayTitle() : main.c
  • DoFullPID() : PID_C_stm32.c , stm32_dsp.h
  • DoPID() : stm32_dsp.h , PID_C_stm32.c
  • DSPDemoInit() : main.c

- f -

  • fir_16by16_stm32() : stm32_dsp.h

- h -

  • HardFault_Handler() : stm32f10x_it.h , stm32f10x_it.c

- i -

  • iir_biquad_stm32() : stm32_dsp.h , iir_stm32.c
  • iirarma_stm32() : stm32_dsp.h
  • In_displayWaveform() : main.c

- l -

  • LCD_Clear() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_ClearLine() : stm3210b_lcd.c , stm3210b_lcd.h
  • LCD_CtrlLinesConfig() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_CtrlLinesWrite() : stm3210b_lcd.c , stm3210b_lcd.h
  • LCD_DisplayChar() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_DisplayOff() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_DisplayOn() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_DisplayStringLine() : stm3210b_lcd.c , stm3210b_lcd.h
  • LCD_DrawChar() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_DrawCircle() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_DrawLine() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_DrawMonoPict() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_DrawRect() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_nCS_StartByte() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_PowerOn() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_ReadReg() : stm3210b_lcd.c , stm3210b_lcd.h
  • LCD_SetBackColor() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_SetCursor() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_SetDisplayWindow() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_SetTextColor() : stm3210b_lcd.c , stm3210b_lcd.h
  • LCD_Setup() : stm3210b_lcd.c , stm3210b_lcd.h
  • LCD_SPIConfig() : stm3210b_lcd.c , stm3210b_lcd.h
  • LCD_WindowModeDisable() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_WriteRAM() : stm3210b_lcd.c , stm3210b_lcd.h
  • LCD_WriteRAM_Prepare() : stm3210b_lcd.c , stm3210b_lcd.h
  • LCD_WriteRAMWord() : stm3210b_lcd.h , stm3210b_lcd.c
  • LCD_WriteReg() : stm3210b_lcd.c , stm3210b_lcd.h
  • LCD_WriteRegHX8312() : stm3210b_lcd.c
  • LCD_WriteRegILI9320() : stm3210b_lcd.c
  • LCD_WriteRegIndex() : stm3210b_lcd.c , stm3210b_lcd.h

- m -

  • main() : main.c
  • MemManage_Handler() : stm32f10x_it.h , stm32f10x_it.c
  • MyDualSweep() : main.c
  • MygSin() : main.c

- n -

  • NMI_Handler() : stm32f10x_it.h , stm32f10x_it.c

- o -

  • onesided() : main.c
  • Out_displayWaveform() : main.c

- p -

  • PendSV_Handler() : stm32f10x_it.h , stm32f10x_it.c
  • PID_stm32() : stm32_dsp.h
  • powerMag() : main.c

- s -

  • STM3210B_LCD_Init() : stm3210b_lcd.h , stm3210b_lcd.c
  • SVC_Handler() : stm32f10x_it.c , stm32f10x_it.h
  • SysTick_Handler() : stm32f10x_it.c , stm32f10x_it.h

- u -

  • UsageFault_Handler() : stm32f10x_it.h , stm32f10x_it.c


STM32F10xxx DSP library firmware & FFT_Demo: Data Fields

  • All
  • Functions
  • Variables
  • Defines

  • ASCII_Table : fonts.h
  • BackColor : stm3210b_lcd.c
  • IntTerm : PID_C_stm32.c
  • IntTerm_C : PID_C_stm32.c
  • lBUFIN : main.c
  • lBUFMAG : main.c
  • lBUFOUT : main.c
  • LCDType : stm3210b_lcd.c
  • PrevError : PID_C_stm32.c
  • PrevError_C : PID_C_stm32.c
  • TableFFT : main.c , table_fft.h
  • TextColor : stm3210b_lcd.c
  • TimingDelay : main.c , stm32f10x_it.c


STM32F10xxx DSP library firmware & FFT_Demo: iir_stm32.c Source File

STM32F10x_DSP_Lib_V2.0.0 » Libraries » STM32F10x_DSP_Lib » src

iir_stm32.c

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file STM32F10x_DSP_Lib/src/iir_stm32.c
00004   * @author  MCD Application Team
00005   * @version  V2.0.0
00006   * @date  04/27/2009
00007   * @brief  This source file contains IIR functions in C
00008   ******************************************************************************
00009   * @copy
00010   *
00011   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
00012   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
00013   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
00014   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
00015   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
00016   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
00017   *
00018   * <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2>
00019   */
00020
00021
00022 /* Includes ------------------------------------------------------------------*/
00023 #include "stm32_dsp.h"
00024 #include "stm32f10x.h"
00025
00026
00027 /** @addtogroup STM32F10x_DSP_Lib
00028   * @{
00029   */
00030
00031
00032 /* Private typedef -----------------------------------------------------------*/
00033 /* Private define ------------------------------------------------------------*/
00034 /* Private macro -------------------------------------------------------------*/
00035 /* Private variables ---------------------------------------------------------*/
00036 /* Private function prototypes -----------------------------------------------*/
00037 /* Private functions ---------------------------------------------------------*/
00038
00039
00040 /**
00041   * @brief  Canonique Form of 8th order IIR filter, factorized in
00042   *   4 biquads sections in series.
00043   * @param y: Output array .
00044   * @param x: Input array
00045   * @param IIRCoeff: IIR Filter Coefficients, an array of 20 shorts
00046   * @param ny: the number of output samples
00047   * @retval : None
00048   */
00049 void iir_biquad_stm32(uint16_t *y, uint16_t *x, int16_t *IIRCoeff, uint16_t ny)
00050 {
00051   uint32_t i;
00052   uint32_t w1_2 = 0, w1_1 = 0, w1;
00053   uint32_t w2_2 = 0, w2_1 = 0, w2;
00054   uint32_t w3_2 = 0, w3_1 = 0, w3;
00055   uint32_t w4_2 = 0, w4_1 = 0, w4;
00056
00057   /** Canonic form **/
00058   /* 1st section */
00059   for (i=0; i<ny-2; i++)
00060   {
00061     w1 = x[2+i] - IIRCoeff[0]*w1_1 - IIRCoeff[1]*w1_2;
00062     y[2+i] = (IIRCoeff[2]*w1 + IIRCoeff[3]*w1_1 + IIRCoeff[4]*w1_2);
00063     w1_2 = w1_1;
00064     w1_1 = w1;
00065   }
00066
00067   /* 2nd section */
00068   for (i=0; i<ny-2; i++)
00069   {
00070     w2 = y[2+i] - IIRCoeff[5]*w2_1 - IIRCoeff[6]*w2_2;
00071     y[2+i] = (IIRCoeff[7]*w2 + IIRCoeff[8]*w2_1 + IIRCoeff[9]*w2_2);
00072     w2_2 = w2_1;
00073     w2_1 = w2;
00074   }
00075
00076   /* 3rd section */
00077   for (i=0; i<ny-2; i++)
00078   {
00079     w3 = y[2+i] - IIRCoeff[10]*w3_1 - IIRCoeff[11]*w3_2;
00080     y[2+i] = (IIRCoeff[12]*w3 + IIRCoeff[13]*w3_1 + IIRCoeff[14]*w3_2);
00081     w3_2 = w3_1;
00082     w3_1 = w3;
00083   }
00084
00085   /* 4th section */
00086   for (i=0; i<ny-2; i++)
00087   {
00088     w4 = y[2+i] - IIRCoeff[15]*w4_1 - IIRCoeff[16]*w4_2;
00089     y[2+i] = (IIRCoeff[17]*w4 + IIRCoeff[18]*w4_1 + IIRCoeff[19]*w4_2);
00090     w4_2 = w4_1;
00091     w4_1 = w4;
00092   }
00093
00094 }
00095
00096 /**
00097   * @}
00098   */
00099
00100
00101 /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/


STM32F10xxx DSP library firmware & FFT_Demo: main.c Source File

STM32F10x_DSP_Lib_V2.0.0 » Project » FFT_Demo » src

main.c

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file FFT_Demo/src/main.c
00004   * @author  MCD Application Team
00005   * @version  V2.0.0
00006   * @date  04/27/2009
00007   * @brief  Main program body
00008   ******************************************************************************
00009   * @copy
00010   *
00011   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
00012   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
00013   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
00014   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
00015   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
00016   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
00017   *
00018   * <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2>
00019   */
00020
00021
00022 /* Includes ------------------------------------------------------------------*/
00023 #include "stm32f10x.h"
00024 #include <math.h>
00025 #include "stm3210b_lcd.h"
00026 #include "stm32_dsp.h"
00027 #include "table_fft.h"
00028
00029
00030 /** @addtogroup FFT_Demo
00031   * @{
00032   */
00033
00034
00035 /* Private typedef -----------------------------------------------------------*/
00036 /* Private define ------------------------------------------------------------*/
00037 #define PI2  6.28318530717959
00038
00039 #define NPT 64            /* NPT = No of FFT point*/
00040 #define DISPLAY_RIGHT 310 /* 224 for centered, 319 for right-aligned */
00041 #define DISPLAY_LEFT 150  /* 224 for centered, 319 for right-aligned */
00042
00043 /* Private macro -------------------------------------------------------------*/
00044 /* Private variables ---------------------------------------------------------*/
00045 extern uint16_t TableFFT[];
00046 extern volatile uint32_t TimingDelay ;
00047 long lBUFIN[NPT];         /* Complex input vector */
00048 long lBUFOUT[NPT];        /* Complex output vector */
00049 long lBUFMAG[NPT + NPT/2];/* Magnitude vector */
00050
00051 /* Private function prototypes -----------------------------------------------*/
00052 void MyDualSweep(uint32_t freqinc1,uint32_t freqinc2);
00053 void MygSin(long nfill, long Fs, long Freq1, long Freq2, long Ampli);
00054 void powerMag(long nfill, char* strPara);
00055 void In_displayWaveform(uint32_t DisplayPos);
00056 void Out_displayWaveform(uint32_t DisplayPos);
00057 void displayPowerMag(uint32_t DisplayPos, uint32_t scale);
00058 void DisplayTitle(void);
00059 void DSPDemoInit(void);
00060
00061 /* Private functions ---------------------------------------------------------*/
00062
00063
00064 /**
00065   * @brief  Main program.
00066   * @param  None
00067   * @retval : None
00068   */
00069 int main(void)
00070 {
00071
00072   DSPDemoInit();
00073   DisplayTitle();
00074
00075   while (1)
00076   {
00077     MyDualSweep(30,30);
00078   }
00079 }
00080
00081
00082
00083 /**
00084   * @brief  Produces a combination of two sinewaves as input signal
00085   * @param eq1: frequency increment for 1st sweep
00086   *   Freq2: frequency increment for 2nd sweep
00087   * @retval : None
00088   */
00089 void MyDualSweep(uint32_t freqinc1,uint32_t freqinc2)
00090 {
00091   uint32_t freq;
00092
00093   for (freq=40; freq <4000; freq+=freqinc1)
00094   {
00095     MygSin(NPT, 8000, freq, 0, 32767);
00096     GPIOC->BSRR = GPIO_Pin_7;
00097
00098     cr4_fft_64_stm32(lBUFOUT, lBUFIN, NPT);
00099
00100     GPIOC->BRR = GPIO_Pin_7;
00101     powerMag(NPT,"2SIDED");
00102     In_displayWaveform(DISPLAY_RIGHT);
00103
00104     displayPowerMag(DISPLAY_RIGHT, 9);
00105
00106     while (GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_9) == 0x00);
00107   }
00108
00109   for (freq=40; freq <4000; freq+=freqinc2)
00110   {
00111     MygSin(NPT, 8000, freq, 160, 32767/2);
00112     GPIOC->BSRR = GPIO_Pin_7;
00113
00114     cr4_fft_64_stm32(lBUFOUT, lBUFIN, NPT);
00115
00116     GPIOC->BRR = GPIO_Pin_7;
00117     powerMag(NPT,"2SIDED");
00118     In_displayWaveform(DISPLAY_LEFT);
00119     displayPowerMag(DISPLAY_LEFT, 8);
00120
00121     while (GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_9) == 0x00);
00122   }
00123
00124 }
00125
00126
00127
00128 /**
00129   * @brief  Produces a combination of two sinewaves as input signal
00130   * @param ill: length of the array holding input signal
00131   *   Fs: sampling frequency
00132   *   Freq1: frequency of the 1st sinewave
00133   *   Freq2: frequency of the 2nd sinewave
00134   *   Ampli: scaling factor
00135   * @retval : None
00136   */
00137 void MygSin(long nfill, long Fs, long Freq1, long Freq2, long Ampli)
00138 {
00139
00140   uint32_t i;
00141   float fFs, fFreq1, fFreq2, fAmpli;
00142   float fZ,fY;
00143
00144   fFs = (float) Fs;
00145   fFreq1 = (float) Freq1;
00146   fFreq2 = (float) Freq2;
00147   fAmpli = (float) Ampli;
00148
00149   for (i=0; i < nfill; i++)
00150   {
00151     fY = sin(PI2 * i * (fFreq1/fFs)) + sin(PI2 * i * (fFreq2/fFs));
00152     fZ = fAmpli * fY;
00153     lBUFIN[i]= ((short)fZ) << 16 ;  /* sine_cosine  (cos=0x0) */
00154   }
00155 }
00156
00157
00158
00159
00160 /**
00161   * @brief  Removes the aliased part of the spectrum (not tested)
00162   * @param ill: length of the array holding power mag
00163   * @retval : None
00164   */
00165 void onesided(long nfill)
00166 {
00167   uint32_t i;
00168
00169   lBUFMAG[0] = lBUFMAG[0];
00170   lBUFMAG[nfill/2] = lBUFMAG[nfill/2];
00171   for (i=1; i < nfill/2; i++)
00172   {
00173     lBUFMAG[i] = lBUFMAG[i] + lBUFMAG[nfill-i];
00174     lBUFMAG[nfill-i] = 0x0;
00175   }
00176 }
00177
00178
00179
00180
00181 /**
00182   * @brief  Compute power magnitude of the FFT transform
00183   * @param ill: length of the array holding power mag
00184   *   : strPara: if set to "1SIDED", removes aliases part of spectrum (not tested)
00185   * @retval : None
00186   */
00187 void powerMag(long nfill, char* strPara)
00188 {
00189   int32_t lX,lY;
00190   uint32_t i;
00191
00192   for (i=0; i < nfill; i++)
00193   {
00194     lX= (lBUFOUT[i]<<16)>>16; /* sine_cosine --> cos */
00195     lY= (lBUFOUT[i] >> 16);   /* sine_cosine --> sin */
00196     {
00197       float X=  64*((float)lX)/32768;
00198       float Y = 64*((float)lY)/32768;
00199       float Mag = sqrt(X*X+ Y*Y)/nfill;
00200       lBUFMAG[i] = (uint32_t)(Mag*65536);
00201     }
00202   }
00203   if (strPara == "1SIDED") onesided(nfill);
00204 }
00205
00206
00207
00208 /**
00209   * @brief  Displays the input array before filtering
00210   * @param splayPos indicates the beginning Y address on LCD
00211   * @retval : None
00212   */
00213 void In_displayWaveform(uint32_t DisplayPos)
00214 {
00215   uint8_t aScale;
00216   uint16_t cln;
00217
00218   for (cln=0; cln < 64; cln++)       /* original upper limit was 60 */
00219   {
00220     /* Clear previous line */
00221     LCD_SetTextColor(White);
00222     LCD_DrawLine(48,DisplayPos-(2*cln),72,Vertical);
00223     /* and go back to normal display mode */
00224     LCD_SetTextColor(Black);
00225     aScale = lBUFIN[cln]>>(10 + 16);  /* SINE IS LEFT ALIGNED */
00226     if (aScale > 127)         /* Negative values */
00227     {
00228       aScale = (0xFF-aScale) + 1; /* Calc absolute value */
00229       LCD_DrawLine(84-aScale,DisplayPos-(2*cln),aScale,Vertical);
00230     }
00231     else  /* Display positive values */
00232     {
00233       LCD_DrawLine(84,DisplayPos-(2*cln),aScale,Vertical);
00234     }
00235   }/* for */
00236 }
00237
00238
00239
00240
00241 /**
00242   * @brief  Displays the output array after filtering
00243   * @param splayPos indicates the beginning Y address on LCD
00244   * @retval : None
00245   */
00246 void Out_displayWaveform(uint32_t DisplayPos)
00247 {
00248   uint8_t aScale;
00249   uint16_t cln;
00250
00251   for (cln=0; cln < 64; cln++)    /* original upper limit was 60 */
00252   {
00253     aScale = lBUFOUT[cln]>>(10 + 16);  /* SINE IS LEFT ALIGNED */
00254     if (aScale > 127)         /* Negative values */
00255     {
00256       aScale = (0xFF-aScale) + 1; /* Calc absolute value */
00257       LCD_DrawLine(156-aScale,DisplayPos-(2*cln),aScale,Vertical);
00258     }
00259     else  /* Display positive values */
00260     {
00261       LCD_DrawLine(156,DisplayPos-(2*cln),aScale,Vertical);
00262     }
00263   }/* for */
00264 }
00265
00266
00267
00268 /**
00269   * @brief  Displays the power magnitude array following a FFT
00270   * @param splayPos indicates the beginning Y address on LCD
00271   *   : scale allows to normalize the result for optimal display
00272   * @retval : None
00273   */
00274 void displayPowerMag(uint32_t DisplayPos, uint32_t scale)
00275 {
00276   uint16_t aScale;
00277   uint16_t cln;
00278
00279   for (cln=0; cln < 64; cln++)
00280   {
00281     /* Clear previous line */
00282     LCD_SetTextColor(White);
00283     LCD_DrawLine(120,DisplayPos-(2*cln),72,Vertical);
00284     /* and go back to normal display mode */
00285     LCD_SetTextColor(Red);
00286
00287     aScale =lBUFMAG[cln]>>scale ; /* spectrum is always divided by two */
00288     /* Power Mag contains only positive values */
00289     LCD_DrawLine(192-aScale,DisplayPos-(2*cln),aScale,Vertical);
00290   }/* for */
00291 }
00292
00293
00294
00295 /**
00296   * @brief  Displays the initial menu and then background frame
00297   * @param  None
00298   * @retval : None
00299   */
00300 void DisplayTitle(void)
00301 {
00302   uint8_t *ptr = "   STM32 DSP Demo   ";
00303
00304   LCD_DisplayStringLine(Line0, ptr);
00305
00306   ptr = " 64-pts Radix-4 FFT ";
00307   LCD_DisplayStringLine(Line1, ptr);
00308
00309   ptr = "Press Key to freeze ";
00310   LCD_DisplayStringLine(Line9, ptr);
00311
00312   {
00313     unsigned long long Delay = 0x600000;
00314     while (Delay--);
00315     while (GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_9) == 0x00);
00316   }
00317
00318   ptr = "   Sine   Dual sine ";
00319   LCD_DisplayStringLine(Line9, ptr);
00320 }
00321
00322
00323
00324
00325
00326
00327 /**
00328   * @brief  Inserts a delay time.
00329   * @param ount: specifies the delay time length (time base 10 ms).
00330   * @retval : None
00331   */
00332 void Delay(uint32_t nCount)
00333 {
00334   /* Configure the systick */
00335   __enable_irq();
00336
00337      /* Setup SysTick Timer for 10 msec interrupts */
00338   if (SysTick_Config(SystemFrequency /100)) /* SystemFrequency is defined in
00339    “system_stm32f10x.h” and equal to HCLK frequency */
00340    {
00341     /* Capture error */
00342      while (1);
00343     }
00344   /* Enable the SysTick Counter */
00345   TimingDelay = nCount;
00346    while (TimingDelay )  {}
00347    TimingDelay=0;
00348    __disable_irq();
00349
00350 }
00351
00352
00353
00354
00355 /**
00356   * @brief  Initializes the DSP lib demo (clock, peripherals and LCD).
00357   * @param  None
00358   * @retval : None
00359   */
00360 void DSPDemoInit(void)
00361 {
00362   GPIO_InitTypeDef GPIO_InitStructure;
00363   ErrorStatus HSEStartUpStatus = ERROR;
00364
00365   /* SYSCLK, HCLK, PCLK2 and PCLK1 configuration -----------------------------*/
00366   /* RCC system reset(for debug purpose) */
00367   RCC_DeInit();
00368
00369   /* Enable HSE */
00370   RCC_HSEConfig(RCC_HSE_ON);
00371
00372   /* Wait till HSE is ready */
00373   HSEStartUpStatus = RCC_WaitForHSEStartUp();
00374
00375   if(HSEStartUpStatus == SUCCESS)
00376   {
00377     /* Enable Prefetch Buffer */
00378     FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable);
00379
00380     /* Flash 2 wait state */
00381     FLASH_SetLatency(FLASH_Latency_2);
00382
00383     /* HCLK = SYSCLK */
00384     RCC_HCLKConfig(RCC_SYSCLK_Div1);
00385
00386     /* PCLK2 = HCLK */
00387     RCC_PCLK2Config(RCC_HCLK_Div1);
00388
00389     /* PCLK1 = HCLK/2 */
00390     RCC_PCLK1Config(RCC_HCLK_Div2);
00391
00392     /* PLLCLK = 8MHz * 9 = 72 MHz */
00393     RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_9);
00394
00395     /* Enable PLL */
00396     RCC_PLLCmd(ENABLE);
00397
00398     /* Wait till PLL is ready */
00399     while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET)
00400     {
00401     }
00402
00403     /* Select PLL as system clock source */
00404     RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);
00405
00406     /* Wait till PLL is used as system clock source */
00407     while(RCC_GetSYSCLKSource() != 0x08)
00408     {
00409     }
00410   }
00411
00412   /* Enable GPIOA, GPIOB, GPIOC, GPIOD, GPIOE and AFIO clocks */
00413   RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB |RCC_APB2Periph_GPIOC
00414          | RCC_APB2Periph_GPIOD | RCC_APB2Periph_GPIOE | RCC_APB2Periph_AFIO, ENABLE);
00415
00416   /* TIM1 Periph clock enable */
00417   RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM1, ENABLE);
00418   RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE);
00419
00420
00421   /* SPI2 Periph clock enable */
00422   RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2, ENABLE);
00423
00424   /* TIM2  and TIM4 clocks enable */
00425   RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2 | RCC_APB1Periph_TIM4, ENABLE);
00426
00427   /*------------------- Resources Initialization -----------------------------*/
00428   /* GPIO Configuration */
00429   /* Configure PC.06 and PC.07 as Output push-pull */
00430   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6 | GPIO_Pin_7;
00431   GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
00432   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
00433   GPIO_Init(GPIOC, &GPIO_InitStructure);
00434
00435
00436
00437   /*------------------- Drivers Initialization -------------------------------*/
00438   /* Initialize the LCD */
00439   STM3210B_LCD_Init();
00440
00441   /* Clear the LCD */
00442   LCD_Clear(White);
00443
00444   LCD_SetTextColor(White);
00445   LCD_SetBackColor(Black);
00446
00447 }
00448
00449 #ifdef  USE_FULL_ASSERT
00450
00451
00452 /**
00453   * @brief  Reports the name of the source file and the source line number
00454   *   where the assert_param error has occurred.
00455   * @param file: pointer to the source file name
00456   * @param line: assert_param error line source number
00457   * @retval : None
00458   */
00459 void assert_failed(uint8_t* file, uint32_t line)
00460 {
00461   /* User can add his own implementation to report the file name and line number,
00462      ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
00463
00464   /* Infinite loop */
00465   while (1)
00466   {
00467   }
00468 }
00469 #endif
00470
00471 /**
00472   * @}
00473   */
00474
00475
00476
00477 /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/


STM32F10xxx DSP library firmware & FFT_Demo: main_page.txt File Reference

main_page.txt File Reference

STM32F10x Standard Peripherals Library: Footer

For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit www.st.com/STM32


STM32F10xxx DSP library firmware & FFT_Demo: Module Index

Modules

Here is a list of all modules:
  • FFT_Demo
  • STM32F10x_DSP_Lib


STM32F10xxx DSP library firmware & FFT_Demo: Page Index

Related Pages

Here is a list of all related documentation pages:
  • FFT_Demo Directory Content
  • DSP_Lib Directory Content
  • FFT_Demo Readme File


STM32F10xxx DSP library firmware & FFT_Demo: PID_C_stm32.c Source File

STM32F10x_DSP_Lib_V2.0.0 » Libraries » STM32F10x_DSP_Lib » src

PID_C_stm32.c

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file STM32F10x_DSP_Lib/src/PID_C_stm32.c
00004   * @author  MCD Application Team
00005   * @version  V2.0.0
00006   * @date  04/27/2009
00007   * @brief  This source file contains code PID controller
00008   ******************************************************************************
00009   * @copy
00010   *
00011   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
00012   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
00013   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
00014   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
00015   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
00016   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
00017   *
00018   * <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2>
00019   */
00020
00021
00022 /* Includes ------------------------------------------------------------------*/
00023 #include "stm32f10x.h"
00024 #include "stm32_dsp.h"
00025
00026
00027 /** @addtogroup STM32F10x_DSP_Lib
00028   * @{
00029   */
00030
00031
00032 /* Private typedef -----------------------------------------------------------*/
00033 /* Private define ------------------------------------------------------------*/
00034 /* Private macro -------------------------------------------------------------*/
00035 /* Private variables ---------------------------------------------------------*/
00036 uint16_t PrevError = 0, IntTerm = 0;
00037 uint16_t PrevError_C = 0, IntTerm_C = 0;
00038
00039 /* Private function prototypes -----------------------------------------------*/
00040 /* Private functions ---------------------------------------------------------*/
00041
00042
00043
00044 /**
00045   * @brief  PID in C, Error computed outside the routine
00046   * @param ror: difference between reference and measured value
00047   *   Coeff: pointer to the coefficient table
00048   * @retval : PID output (command)
00049   */
00050 uint16_t DoPID(uint16_t Error, uint16_t *Coeff)
00051 {
00052   uint16_t Kp, Ki, Kd, Output;
00053
00054   Kp = Coeff[0];
00055   Ki = Coeff[1];
00056   Kd = Coeff[2];
00057
00058   IntTerm_C += Ki*Error;
00059   Output = Kp * Error;
00060   Output += IntTerm_C;
00061   Output += Kd * (Error - PrevError_C);
00062
00063   PrevError_C = Error;
00064
00065   return (Output);
00066 }
00067
00068
00069
00070 /**
00071   * @brief  PID in C, Error computed inside the routine
00072   * @param : Input (measured value)
00073   *   Ref: reference (target value)
00074   *   Coeff: pointer to the coefficient table
00075   * @retval : PID output (command)
00076   */
00077 uint16_t DoFullPID(uint16_t In, uint16_t Ref, uint16_t *Coeff)
00078 {
00079   uint16_t Kp, Ki, Kd, Output, Error;
00080
00081   Error = Ref - In;
00082   Kp = Coeff[0];
00083   Ki = Coeff[1];
00084   Kd = Coeff[2];
00085
00086   IntTerm_C += Ki*Error;
00087   Output = Kp * Error;
00088   Output += IntTerm_C;
00089   Output += Kd * (Error - PrevError_C);
00090
00091   PrevError_C = Error;
00092
00093   return (Output);
00094 }
00095
00096 /**
00097   * @}
00098   */
00099
00100
00101
00102
00103 /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/


STM32F10xxx DSP library firmware & FFT_Demo: readme.txt File Reference

readme.txt File Reference

STM32F10x Standard Peripherals Library: Footer

For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit www.st.com/STM32


Release Notes for UM0585 "STM32F10xxx DSP firmware Library" firmware

Release Notes for UM0585 STM32F10xxx
DSP library & FFT Demo

Copyright © 2009 STMicroelectronics

Contents

  1. What's New in STM32F10xxx DSP firmware Library & FFT Demo. V2.0.0?
  2. What is STM32F10xxx DSP firmware Library & FFT Demo. V2.0.0?
  3. STM32F10xxx DSP firmware Library & FFT Demo. V2.0.0 update History
  4. License

What's New in STM32F10xxx DSP Library firmware and Demo V2.0.0?

The STM32F10xxx DSP firmware Library & FFT Demo V2.0.0 is an update of V1.0.1 that makes the FFT demo and library compliant with the Cortex™ microcontroller software interface standard (CMSIS).

What is STM32F10xxx DSP Library firmware and Demo ?

The STM32F10xxx DSP (digital signal processing) library,is a suite of common digital signal processing functions:

  • PID controller
  • Fast Fourier transform
  • FIR and IIR filters

The library contains C and assembly functions that have been ported and tested on the IAR
EWARM 5.20, Keil RVMDK 3.23 and Raisonance RIDE7 (GNU compiler) toolchains.).

The package is coming with a demonstration example for FFT"Fast Fourier Transform".

STM32F10xxx DSP Library firmware and Demo V2.0.0 update History

V2.0.0 - 04/27/2009

  • "STM32F10xxx DSP library and FFT Demo " are updated with STM32F10x Standard Peripherals Library (StdPeriph_Lib) V3.0.0.
  • "STM32F10xxx DSP library and FFT Demo" is a package full CMSIS compliant
  • STM32F10x Standard Peripherals Library Structure is updated.
For more details, please refer to AN2953 "How to migrate from the STM32F10xxx firmware library V2.0.3 to the STM32F10xxx standard peripheral library V3.0.0".

V1.0.1 - 10/20/2008

  • The DSP library files's header updated.

V1.0.0 - 10/6/2008

  • Created.

License

The enclosed firmware and all the related documentation are not covered by a License Agreement, if you need such License you can contact your local STMicroelectronics office.

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

For Complete on STM32(CORTEX M3) 32-Bit Microcontrollers visit www.st.com/STM32


STM32F10xxx DSP library firmware & FFT_Demo: stm32_dsp.h Source File

STM32F10x_DSP_Lib_V2.0.0 » Libraries » STM32F10x_DSP_Lib » inc

stm32_dsp.h

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file STM32F10x_DSP_Lib/inc/stm32_dsp.h
00004   * @author  MCD Application Team
00005   * @version  V2.0.0
00006   * @date  04/27/2009
00007   * @brief  This source file contains prototypes of DSP functions
00008   ******************************************************************************
00009   * @copy
00010   *
00011   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
00012   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
00013   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
00014   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
00015   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
00016   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
00017   *
00018   * <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2>
00019   */
00020
00021
00022 /* Define to prevent recursive inclusion -------------------------------------*/
00023 #ifndef __STM32F10x_DSP_H
00024 #define __STM32F10x_DSP_H
00025
00026 /* Includes ------------------------------------------------------------------*/
00027 #include "stm32f10x.h"
00028
00029
00030 /* Exported types ------------------------------------------------------------*/
00031 /* for block FIR module */
00032 typedef struct {
00033   uint16_t *h;
00034   uint32_t nh;
00035 } COEFS;
00036
00037 /* Exported constants --------------------------------------------------------*/
00038 /* Exported macro ------------------------------------------------------------*/
00039 /* Exported functions ------------------------------------------------------- */
00040
00041 /* FIR 16-bit filter in assembly */
00042 void fir_16by16_stm32(void *y, void *x, COEFS *c, uint32_t N);
00043
00044 /* PID controller in C, error computed outside the function */
00045 uint16_t DoPID(uint16_t Error, uint16_t *Coeff);
00046
00047 /* Full PID in C, error computed inside the function */
00048 uint16_t DoFullPID(uint16_t In, uint16_t Ref, uint16_t *Coeff);
00049
00050 /* PID controller in assembly, error computed outside the function */
00051 uint16_t PID_stm32(uint16_t Error, uint16_t *Coeff);
00052
00053 /* Radix-4 complex FFT for STM32, in assembly  */
00054 /* 64 points*/
00055 void cr4_fft_64_stm32(void *pssOUT, void *pssIN, uint16_t Nbin);
00056 /* 256 points */
00057 void cr4_fft_256_stm32(void *pssOUT, void *pssIN, uint16_t Nbin);
00058 /* 1024 points */
00059 void cr4_fft_1024_stm32(void *pssOUT, void *pssIN, uint16_t Nbin);
00060
00061 /* IIR filter in assembly */
00062 void iirarma_stm32(void *y, void *x, uint16_t *h2, uint16_t *h1, uint32_t ny );
00063
00064 /* IIR filter in C */
00065 void iir_biquad_stm32(uint16_t *y, uint16_t *x, int16_t *IIRCoeff, uint16_t ny);
00066
00067 #endif /* __STM32F10x_DSP_H */
00068
00069 /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/


STM32F10xxx DSP library firmware & FFT_Demo: stm32f10x_conf.h Source File

STM32F10x_DSP_Lib_V2.0.0 » Project » FFT_Demo » inc

stm32f10x_conf.h

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   ******************************************************************************
00004   * @file FFT_Demo/inc/stm32f10x_conf.h
00005   * @author  MCD Application Team
00006   * @version  V2.0.0
00007   * @date  04/27/2009
00008   * @brief  Library configuration file.
00009   ******************************************************************************
00010   * @copy
00011   *
00012   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
00013   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
00014   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
00015   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
00016   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
00017   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
00018   *
00019   * <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2>
00020   */
00021
00022 /* Define to prevent recursive inclusion -------------------------------------*/
00023 #ifndef __STM32F10x_CONF_H
00024 #define __STM32F10x_CONF_H
00025
00026 /* Includes ------------------------------------------------------------------*/
00027 /* Uncomment the line below to enable peripheral header file inclusion */
00028 /*#include "stm32f10x_adc.h" */
00029 /* #include "stm32f10x_bkp.h" */
00030 /* #include "stm32f10x_can.h" */
00031 /* #include "stm32f10x_crc.h" */
00032 /* #include "stm32f10x_dac.h" */
00033 /* #include "stm32f10x_dbgmcu.h" */
00034 /* #include "stm32f10x_dma.h" */
00035 /* #include "stm32f10x_exti.h" */
00036  #include "stm32f10x_flash.h"
00037 /* #include "stm32f10x_fsmc.h" */
00038 #include "stm32f10x_gpio.h"
00039 /*#include "stm32f10x_i2c.h" */
00040 /* #include "stm32f10x_iwdg.h" */
00041 /* #include "stm32f10x_pwr.h" */
00042 #include "stm32f10x_rcc.h"
00043 /* #include "stm32f10x_rtc.h" */
00044 /* #include "stm32f10x_sdio.h" */
00045  #include "stm32f10x_spi.h"
00046 /*#include "stm32f10x_tim.h" */
00047 /*#include "stm32f10x_usart.h"*/
00048 /* #include "stm32f10x_wwdg.h" */
00049  #include "misc.h"   /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */
00050
00051
00052 /* Exported types ------------------------------------------------------------*/
00053 /* Exported constants --------------------------------------------------------*/
00054 /* Uncomment the line below to expanse the "assert_param" macro in the
00055    Standard Peripheral Library drivers code */
00056 /*#define USE_FULL_ASSERT    1 */
00057
00058 /* Exported macro ------------------------------------------------------------*/
00059 #ifdef  USE_FULL_ASSERT
00060
00061 /**
00062   * @brief  The assert_param macro is used for function's parameters check.
00063   * @param expr: If expr is false, it calls assert_failed function
00064   *   which reports the name of the source file and the source
00065   *   line number of the call that failed.
00066   *   If expr is true, it returns no value.
00067   * @retval : None
00068   */
00069   #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
00070 /* Exported functions ------------------------------------------------------- */
00071   void assert_failed(uint8_t* file, uint32_t line);
00072 #else
00073   #define assert_param(expr) ((void)0)
00074 #endif /* USE_FULL_ASSERT */
00075
00076 #endif /* __STM32F10x_CONF_H */
00077
00078 /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/


STM32F10xxx DSP library firmware & FFT_Demo: STM32F10x_DSP_Lib.txt File Reference

STM32F10x_DSP_Lib.txt File Reference

STM32F10x Standard Peripherals Library: Footer

For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit www.st.com/STM32


STM32F10xxx DSP library firmware & FFT_Demo: stm32f10x_it.c Source File

STM32F10x_DSP_Lib_V2.0.0 » Project » FFT_Demo » src

stm32f10x_it.c

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   ******************************************************************************
00004   * @file FFT_Demo/src/stm32f10x_it.c
00005   * @author  MCD Application Team
00006   * @version  V2.0.0
00007   * @date  04/27/2009
00008   * @brief  Main Interrupt Service Routines.
00009   *         This file provides template for all exceptions handler and
00010   *         peripherals interrupt service routine.
00011   ******************************************************************************
00012   * @copy
00013   *
00014   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
00015   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
00016   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
00017   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
00018   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
00019   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
00020   *
00021   * <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2>
00022   */
00023
00024 /* Includes ------------------------------------------------------------------*/
00025 #include "stm32f10x_it.h"
00026
00027
00028 /** @addtogroup FFT_Demo
00029   * @{
00030   */
00031
00032
00033 /* Private typedef -----------------------------------------------------------*/
00034 /* Private define ------------------------------------------------------------*/
00035 /* Private macro -------------------------------------------------------------*/
00036 /* Private variables ---------------------------------------------------------*/
00037  volatile uint32_t TimingDelay = 0 ;
00038 /* Private function prototypes -----------------------------------------------*/
00039 /* Private functions ---------------------------------------------------------*/
00040
00041 /******************************************************************************/
00042 /*            Cortex-M3 Processor Exceptions Handlers                         */
00043 /******************************************************************************/
00044
00045 /**
00046   * @brief  This function handles NMI exception.
00047   * @param  None
00048   * @retval : None
00049   */
00050 void NMI_Handler(void)
00051 {
00052 }
00053
00054 /**
00055   * @brief  This function handles Hard Fault exception.
00056   * @param  None
00057   * @retval : None
00058   */
00059 void HardFault_Handler(void)
00060 {
00061   /* Go to infinite loop when Hard Fault exception occurs */
00062   while (1)
00063   {
00064   }
00065 }
00066
00067 /**
00068   * @brief  This function handles Memory Manage exception.
00069   * @param  None
00070   * @retval : None
00071   */
00072 void MemManage_Handler(void)
00073 {
00074   /* Go to infinite loop when Memory Manage exception occurs */
00075   while (1)
00076   {
00077   }
00078 }
00079
00080 /**
00081   * @brief  This function handles Bus Fault exception.
00082   * @param  None
00083   * @retval : None
00084   */
00085 void BusFault_Handler(void)
00086 {
00087   /* Go to infinite loop when Bus Fault exception occurs */
00088   while (1)
00089   {
00090   }
00091 }
00092
00093 /**
00094   * @brief  This function handles Usage Fault exception.
00095   * @param  None
00096   * @retval : None
00097   */
00098 void UsageFault_Handler(void)
00099 {
00100   /* Go to infinite loop when Usage Fault exception occurs */
00101   while (1)
00102   {
00103   }
00104 }
00105
00106 /**
00107   * @brief  This function handles SVCall exception.
00108   * @param  None
00109   * @retval : None
00110   */
00111 void SVC_Handler(void)
00112 {
00113 }
00114
00115 /**
00116   * @brief  This function handles Debug Monitor exception.
00117   * @param  None
00118   * @retval : None
00119   */
00120 void DebugMon_Handler(void)
00121 {
00122 }
00123
00124 /**
00125   * @brief  This function handles PendSVC exception.
00126   * @param  None
00127   * @retval : None
00128   */
00129 void PendSV_Handler(void)
00130 {
00131 }
00132
00133 /**
00134   * @brief  This function handles SysTick Handler.
00135   * @param  None
00136   * @retval : None
00137   */
00138 void SysTick_Handler(void)
00139 {
00140    TimingDelay--;
00141 }
00142
00143 /******************************************************************************/
00144 /*                 STM32F10x Peripherals Interrupt Handlers                   */
00145 /*  Add here the Interrupt Handler for the used peripheral(s) (FFT_Demo_src), for the  */
00146 /*  available peripheral interrupt handler's name please refer to the startup */
00147 /*  file (startup_stm32f10x_xx.s).                                            */
00148 /******************************************************************************/
00149
00150 /**
00151   * @brief  This function handles FFT_Demo_src interrupt request.
00152   * @param  None
00153   * @retval : None
00154   */
00155 /*void FFT_Demo_src_IRQHandler(void)
00156 {
00157 }*/
00158
00159 /**
00160   * @}
00161   */
00162
00163
00164
00165
00166 /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/


STM32F10xxx DSP library firmware & FFT_Demo: stm32f10x_it.h Source File

STM32F10x_DSP_Lib_V2.0.0 » Project » FFT_Demo » inc

stm32f10x_it.h

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   ******************************************************************************
00004   * @file FFT_Demo/inc/stm32f10x_it.h
00005   * @author  MCD Application Team
00006   * @version  V2.0.0
00007   * @date  04/27/2009
00008   * @brief  This file contains the headers of the interrupt handlers.
00009   ******************************************************************************
00010   * @copy
00011   *
00012   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
00013   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
00014   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
00015   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
00016   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
00017   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
00018   *
00019   * <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2>
00020   */
00021
00022 /* Define to prevent recursive inclusion -------------------------------------*/
00023 #ifndef __STM32F10x_IT_H
00024 #define __STM32F10x_IT_H
00025
00026 /* Includes ------------------------------------------------------------------*/
00027 #include "stm32f10x.h"
00028
00029
00030 /* Exported types ------------------------------------------------------------*/
00031 /* Exported constants --------------------------------------------------------*/
00032 /* Exported macro ------------------------------------------------------------*/
00033 /* Exported functions ------------------------------------------------------- */
00034
00035 void NMI_Handler(void);
00036 void HardFault_Handler(void);
00037 void MemManage_Handler(void);
00038 void BusFault_Handler(void);
00039 void UsageFault_Handler(void);
00040 void SVC_Handler(void);
00041 void DebugMon_Handler(void);
00042 void PendSV_Handler(void);
00043 void SysTick_Handler(void);
00044
00045 #endif /* __STM32F10x_IT_H */
00046
00047 /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/


STM32F10xxx DSP library firmware & FFT_Demo: stm3210b_lcd.c Source File

STM32F10x_DSP_Lib_V2.0.0 » Project » FFT_Demo » src

stm3210b_lcd.c

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file FFT_Demo/src/stm3210b_lcd.c
00004   * @author  MCD Application Team
00005   * @version  V2.0.0
00006   * @date  04/27/2009
00007   * @brief  This file includes the LCD driver for AM-240320LTNQW00H
00008 *                      (LCD_HX8312), AM-240320L8TNQW00H (LCD_ILI9320),
00009 *                      AM-240320LDTNQW00H (LCD_SPFD5408B) Liquid Crystal Display
00010 *                      Module of STM3210B-EVAL board.
00011   ******************************************************************************
00012   * @copy
00013   *
00014   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
00015   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
00016   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
00017   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
00018   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
00019   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
00020   *
00021   * <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2>
00022   */
00023
00024
00025 /* Includes ------------------------------------------------------------------*/
00026 #include "stm3210b_lcd.h"
00027 #include "fonts.h"
00028
00029 /** @addtogroup FFT_Demo
00030   * @{
00031   */
00032
00033
00034 /* Private typedef -----------------------------------------------------------*/
00035 /* Private define ------------------------------------------------------------*/
00036 #define LCD_ILI9320     0x9320
00037 #define LCD_HX8312      0x8312
00038 #define LCD_SPFD5408    0x5408
00039
00040 #define START_BYTE      0x70
00041 #define SET_INDEX       0x00
00042 #define READ_STATUS     0x01
00043 #define LCD_WRITE_REG   0x02
00044 #define LCD_READ_REG    0x03
00045
00046 /* Private macro -------------------------------------------------------------*/
00047 /* Private variables ---------------------------------------------------------*/
00048   /* Global variables to set the written text color */
00049 static __IO uint16_t TextColor = 0x0000, BackColor = 0xFFFF;
00050 static __IO uint32_t LCDType = LCD_ILI9320;
00051
00052 /* Private function prototypes -----------------------------------------------*/
00053 static void LCD_WriteRegHX8312(uint8_t LCD_Reg, uint8_t LCD_RegValue);
00054 static void LCD_WriteRegILI9320(uint8_t LCD_Reg, uint16_t LCD_RegValue);
00055
00056 /* Private functions ---------------------------------------------------------*/
00057
00058
00059
00060 /**
00061   * @brief  Setups the LCD.
00062   * @param  None
00063   * @retval : None
00064   */
00065 void LCD_Setup(void)
00066 {
00067 /* Configure the LCD Control pins --------------------------------------------*/
00068   LCD_CtrlLinesConfig();
00069
00070 /* Configure the SPI2 interface ----------------------------------------------*/
00071   LCD_SPIConfig();
00072
00073   if(LCDType == LCD_ILI9320)
00074   {
00075     Delay(5); /* Delay 50 ms */
00076
00077     /* Start Initial Sequence ------------------------------------------------*/
00078     LCD_WriteReg(R229, 0x8000); /* Set the internal vcore voltage */
00079     LCD_WriteReg(R0,  0x0001); /* Start internal OSC. */
00080     LCD_WriteReg(R1,  0x0100); /* set SS and SM bit */
00081     LCD_WriteReg(R2,  0x0700); /* set 1 line inversion */
00082     LCD_WriteReg(R3,  0x1030); /* set GRAM write direction and BGR=1. */
00083     LCD_WriteReg(R4,  0x0000); /* Resize register */
00084     LCD_WriteReg(R8,  0x0202); /* set the back porch and front porch */
00085     LCD_WriteReg(R9,  0x0000); /* set non-display area refresh cycle ISC[3:0] */
00086     LCD_WriteReg(R10, 0x0000); /* FMARK function */
00087     LCD_WriteReg(R12, 0x0000); /* RGB interface setting */
00088     LCD_WriteReg(R13, 0x0000); /* Frame marker Position */
00089     LCD_WriteReg(R15, 0x0000); /* RGB interface polarity */
00090
00091     /* Power On sequence -----------------------------------------------------*/
00092     LCD_WriteReg(R16, 0x0000); /* SAP, BT[3:0], AP, DSTB, SLP, STB */
00093     LCD_WriteReg(R17, 0x0000); /* DC1[2:0], DC0[2:0], VC[2:0] */
00094     LCD_WriteReg(R18, 0x0000); /* VREG1OUT voltage */
00095     LCD_WriteReg(R19, 0x0000); /* VDV[4:0] for VCOM amplitude */
00096     Delay(20);                 /* Dis-charge capacitor power voltage (200ms) */
00097     LCD_WriteReg(R16, 0x17B0); /* SAP, BT[3:0], AP, DSTB, SLP, STB */
00098     LCD_WriteReg(R17, 0x0137); /* DC1[2:0], DC0[2:0], VC[2:0] */
00099     Delay(5);                  /* Delay 50 ms */
00100     LCD_WriteReg(R18, 0x0139); /* VREG1OUT voltage */
00101     Delay(5);                  /* Delay 50 ms */
00102     LCD_WriteReg(R19, 0x1d00); /* VDV[4:0] for VCOM amplitude */
00103     LCD_WriteReg(R41, 0x0013); /* VCM[4:0] for VCOMH */
00104     Delay(5);                  /* Delay 50 ms */
00105     LCD_WriteReg(R32, 0x0000); /* GRAM horizontal Address */
00106     LCD_WriteReg(R33, 0x0000); /* GRAM Vertical Address */
00107
00108     /* Adjust the Gamma Curve ------------------------------------------------*/
00109     LCD_WriteReg(R48, 0x0006);
00110     LCD_WriteReg(R49, 0x0101);
00111     LCD_WriteReg(R50, 0x0003);
00112     LCD_WriteReg(R53, 0x0106);
00113     LCD_WriteReg(R54, 0x0b02);
00114     LCD_WriteReg(R55, 0x0302);
00115     LCD_WriteReg(R56, 0x0707);
00116     LCD_WriteReg(R57, 0x0007);
00117     LCD_WriteReg(R60, 0x0600);
00118     LCD_WriteReg(R61, 0x020b);
00119
00120     /* Set GRAM area ---------------------------------------------------------*/
00121     LCD_WriteReg(R80, 0x0000); /* Horizontal GRAM Start Address */
00122     LCD_WriteReg(R81, 0x00EF); /* Horizontal GRAM End Address */
00123     LCD_WriteReg(R82, 0x0000); /* Vertical GRAM Start Address */
00124     LCD_WriteReg(R83, 0x013F); /* Vertical GRAM End Address */
00125
00126     LCD_WriteReg(R96,  0x2700); /* Gate Scan Line */
00127     LCD_WriteReg(R97,  0x0001); /* NDL,VLE, REV */
00128     LCD_WriteReg(R106, 0x0000); /* set scrolling line */
00129
00130     /* Partial Display Control -----------------------------------------------*/
00131     LCD_WriteReg(R128, 0x0000);
00132     LCD_WriteReg(R129, 0x0000);
00133     LCD_WriteReg(R130, 0x0000);
00134     LCD_WriteReg(R131, 0x0000);
00135     LCD_WriteReg(R132, 0x0000);
00136     LCD_WriteReg(R133, 0x0000);
00137
00138     /* Panel Control ---------------------------------------------------------*/
00139     LCD_WriteReg(R144, 0x0010);
00140     LCD_WriteReg(R146, 0x0000);
00141     LCD_WriteReg(R147, 0x0003);
00142     LCD_WriteReg(R149, 0x0110);
00143     LCD_WriteReg(R151, 0x0000);
00144     LCD_WriteReg(R152, 0x0000);
00145
00146     /* Set GRAM write direction and BGR = 1 */
00147     /* I/D=01 (Horizontal : increment, Vertical : decrement) */
00148     /* AM=1 (address is updated in vertical writing direction) */
00149     LCD_WriteReg(R3, 0x1018);
00150
00151     LCD_WriteReg(R7, 0x0173); /* 262K color and display ON */
00152   }
00153   else if(LCDType == LCD_SPFD5408)
00154   {
00155     /* Start Initial Sequence --------------------------------------------------*/
00156     LCD_WriteReg(R227, 0x3008); /* Set internal timing */
00157     LCD_WriteReg(R231, 0x0012); /* Set internal timing */
00158     LCD_WriteReg(R239, 0x1231); /* Set internal timing */
00159     LCD_WriteReg(R1, 0x0100);   /* Set SS and SM bit */
00160     LCD_WriteReg(R2, 0x0700);   /* Set 1 line inversion */
00161     LCD_WriteReg(R3, 0x1030);   /* Set GRAM write direction and BGR=1. */
00162     LCD_WriteReg(R4, 0x0000);   /* Resize register */
00163
00164     LCD_WriteReg(R8, 0x0202);   /* Set the back porch and front porch */
00165     LCD_WriteReg(R9, 0x0000);   /* Set non-display area refresh cycle ISC[3:0] */
00166     LCD_WriteReg(R10, 0x0000);  /* FMARK function */
00167     LCD_WriteReg(R12, 0x0000);  /* RGB interface setting */
00168     LCD_WriteReg(R13, 0x0000);  /* Frame marker Position */
00169     LCD_WriteReg(R15, 0x0000);  /* RGB interface polarity */
00170
00171     /* Power On sequence -------------------------------------------------------*/
00172     LCD_WriteReg(R16, 0x0000);  /* SAP, BT[3:0], AP, DSTB, SLP, STB */
00173     LCD_WriteReg(R17, 0x0000);  /* DC1[2:0], DC0[2:0], VC[2:0] */
00174     LCD_WriteReg(R18, 0x0000);  /* VREG1OUT voltage */
00175     LCD_WriteReg(R19, 0x0000);  /* VDV[4:0] for VCOM amplitude */
00176     Delay(20);                  /* Dis-charge capacitor power voltage (200ms) */
00177     LCD_WriteReg(R17, 0x0007);  /* DC1[2:0], DC0[2:0], VC[2:0] */
00178     Delay(5);                   /* Delay 50 ms */
00179     LCD_WriteReg(R16, 0x12B0);  /* SAP, BT[3:0], AP, DSTB, SLP, STB */
00180     Delay(5);                   /* Delay 50 ms */
00181     LCD_WriteReg(R18, 0x01BD);  /* External reference voltage= Vci */
00182     Delay(5);                   /* Delay 50 ms */
00183     LCD_WriteReg(R19, 0x1400);  /* VDV[4:0] for VCOM amplitude */
00184     LCD_WriteReg(R41, 0x000E);  /* VCM[4:0] for VCOMH */
00185     Delay(5);                   /* Delay 50 ms */
00186     LCD_WriteReg(R32, 0x0000);  /* GRAM horizontal Address */
00187     LCD_WriteReg(R33, 0x013F);  /* GRAM Vertical Address */
00188
00189     /* Adjust the Gamma Curve --------------------------------------------------*/
00190     LCD_WriteReg(R48, 0x0007);
00191     LCD_WriteReg(R49, 0x0302);
00192     LCD_WriteReg(R50, 0x0105);
00193     LCD_WriteReg(R53, 0x0206);
00194     LCD_WriteReg(R54, 0x0808);
00195     LCD_WriteReg(R55, 0x0206);
00196     LCD_WriteReg(R56, 0x0504);
00197     LCD_WriteReg(R57, 0x0007);
00198     LCD_WriteReg(R60, 0x0105);
00199     LCD_WriteReg(R61, 0x0808);
00200
00201     /* Set GRAM area -----------------------------------------------------------*/
00202     LCD_WriteReg(R80, 0x0000);  /* Horizontal GRAM Start Address */
00203     LCD_WriteReg(R81, 0x00EF);  /* Horizontal GRAM End Address */
00204     LCD_WriteReg(R82, 0x0000);  /* Vertical GRAM Start Address */
00205     LCD_WriteReg(R83, 0x013F);  /* Vertical GRAM End Address */
00206
00207     LCD_WriteReg(R96,  0xA700); /* Gate Scan Line */
00208     LCD_WriteReg(R97,  0x0001); /* NDL,VLE, REV */
00209     LCD_WriteReg(R106, 0x0000); /* Set scrolling line */
00210
00211     /* Partial Display Control -------------------------------------------------*/
00212     LCD_WriteReg(R128, 0x0000);
00213     LCD_WriteReg(R129, 0x0000);
00214     LCD_WriteReg(R130, 0x0000);
00215     LCD_WriteReg(R131, 0x0000);
00216     LCD_WriteReg(R132, 0x0000);
00217     LCD_WriteReg(R133, 0x0000);
00218
00219     /* Panel Control -----------------------------------------------------------*/
00220     LCD_WriteReg(R144, 0x0010);
00221     LCD_WriteReg(R146, 0x0000);
00222     LCD_WriteReg(R147, 0x0003);
00223     LCD_WriteReg(R149, 0x0110);
00224     LCD_WriteReg(R151, 0x0000);
00225     LCD_WriteReg(R152, 0x0000);
00226
00227     /* Set GRAM write direction and BGR = 1
00228        I/D=01 (Horizontal : increment, Vertical : decrement)
00229        AM=1 (address is updated in vertical writing direction) */
00230     LCD_WriteReg(R3, 0x1018);
00231
00232     LCD_WriteReg(R7, 0x0112);   /* 262K color and display ON */
00233   }
00234   else if(LCDType == LCD_HX8312)
00235   {
00236     /* Enable the LCD Oscillator ---------------------------------------------*/
00237     LCD_WriteReg(R1, 0x10);
00238     LCD_WriteReg(R0, 0xA0);
00239     LCD_WriteReg(R3, 0x01);
00240     Delay(1); /* Delay 10 ms */
00241     LCD_WriteReg(R3, 0x00);
00242     LCD_WriteReg(R43, 0x04);
00243
00244     LCD_WriteReg(R40, 0x18);
00245     LCD_WriteReg(R26, 0x05);
00246     LCD_WriteReg(R37, 0x05);
00247     LCD_WriteReg(R25, 0x00);
00248
00249     /* LCD Power On ----------------------------------------------------------*/
00250     LCD_WriteReg(R28, 0x73);
00251     LCD_WriteReg(R36, 0x74);
00252     LCD_WriteReg(R30, 0x01);
00253     LCD_WriteReg(R24, 0xC1);
00254     Delay(1); /* Delay 10 ms */
00255     LCD_WriteReg(R24, 0xE1);
00256     LCD_WriteReg(R24, 0xF1);
00257     Delay(6); /* Delay 60 ms */
00258     LCD_WriteReg(R24, 0xF5);
00259     Delay(6); /* Delay 60 ms */
00260     LCD_WriteReg(R27, 0x09);
00261     Delay(1); /* Delay 10 ms */
00262     LCD_WriteReg(R31, 0x11);
00263     LCD_WriteReg(R32, 0x0E);
00264     LCD_WriteReg(R30, 0x81);
00265     Delay(1); /* Delay 10 ms */
00266
00267     /* Chip Set --------------------------------------------------------------*/
00268     LCD_WriteReg(R157, 0x00);
00269     LCD_WriteReg(R192, 0x00);
00270
00271     LCD_WriteReg(R14, 0x00);
00272     LCD_WriteReg(R15, 0x00);
00273     LCD_WriteReg(R16, 0x00);
00274     LCD_WriteReg(R17, 0x00);
00275     LCD_WriteReg(R18, 0x00);
00276     LCD_WriteReg(R19, 0x00);
00277     LCD_WriteReg(R20, 0x00);
00278     LCD_WriteReg(R21, 0x00);
00279     LCD_WriteReg(R22, 0x00);
00280     LCD_WriteReg(R23, 0x00);
00281
00282     LCD_WriteReg(R52, 0x01);
00283     LCD_WriteReg(R53, 0x00);
00284
00285     LCD_WriteReg(R75, 0x00);
00286     LCD_WriteReg(R76, 0x00);
00287     LCD_WriteReg(R78, 0x00);
00288     LCD_WriteReg(R79, 0x00);
00289     LCD_WriteReg(R80, 0x00);
00290
00291     LCD_WriteReg(R60, 0x00);
00292     LCD_WriteReg(R61, 0x00);
00293     LCD_WriteReg(R62, 0x01);
00294     LCD_WriteReg(R63, 0x3F);
00295     LCD_WriteReg(R64, 0x02);
00296     LCD_WriteReg(R65, 0x02);
00297     LCD_WriteReg(R66, 0x00);
00298     LCD_WriteReg(R67, 0x00);
00299     LCD_WriteReg(R68, 0x00);
00300     LCD_WriteReg(R69, 0x00);
00301     LCD_WriteReg(R70, 0xEF);
00302     LCD_WriteReg(R71, 0x00);
00303     LCD_WriteReg(R72, 0x00);
00304     LCD_WriteReg(R73, 0x01);
00305     LCD_WriteReg(R74, 0x3F);
00306
00307     LCD_WriteReg(R29, 0x08);  /* R29:Gate scan direction setting */
00308
00309     LCD_WriteReg(R134, 0x00);
00310     LCD_WriteReg(R135, 0x30);
00311     LCD_WriteReg(R136, 0x02);
00312     LCD_WriteReg(R137, 0x05);
00313
00314     LCD_WriteReg(R141, 0x01);  /* R141:Register set-up mode for one line clock */
00315     LCD_WriteReg(R139, 0x20);  /* R139:One line SYSCLK number in one-line */
00316     LCD_WriteReg(R51, 0x01);  /* R51:N line inversion setting */
00317     LCD_WriteReg(R55, 0x01);  /* R55:Scanning method setting */
00318     LCD_WriteReg(R118, 0x00);
00319
00320     /* Gamma Set -------------------------------------------------------------*/
00321     LCD_WriteReg(R143, 0x10);
00322     LCD_WriteReg(R144, 0x67);
00323     LCD_WriteReg(R145, 0x07);
00324     LCD_WriteReg(R146, 0x65);
00325     LCD_WriteReg(R147, 0x07);
00326     LCD_WriteReg(R148, 0x01);
00327     LCD_WriteReg(R149, 0x76);
00328     LCD_WriteReg(R150, 0x56);
00329     LCD_WriteReg(R151, 0x00);
00330     LCD_WriteReg(R152, 0x06);
00331     LCD_WriteReg(R153, 0x03);
00332     LCD_WriteReg(R154, 0x00);
00333
00334     /* Display On ------------------------------------------------------------*/
00335     LCD_WriteReg(R1, 0x50);
00336     LCD_WriteReg(R5, 0x04);
00337
00338     LCD_WriteReg(R0, 0x80);
00339     LCD_WriteReg(R59, 0x01);
00340     Delay(4);  /* Delay 40 ms */
00341     LCD_WriteReg(R0, 0x20);
00342   }
00343 }
00344
00345
00346
00347 /**
00348   * @brief  Initializes the LCD.
00349   * @param  None
00350   * @retval : None
00351   */
00352 void STM3210B_LCD_Init(void)
00353 {
00354   /* Setups the LCD */
00355   LCD_Setup();
00356
00357   /* Try to read new LCD controller ID 0x9320 */
00358   if (LCD_ReadReg(R0) == LCD_ILI9320)
00359   {
00360     LCDType = LCD_ILI9320;
00361   }
00362   else
00363   {
00364     LCDType = LCD_SPFD5408;
00365
00366     /* Setups the LCD */
00367     LCD_Setup();
00368
00369     /* Try to read new LCD controller ID 0x5408 */
00370     if (LCD_ReadReg(R0) != LCD_SPFD5408)
00371     {
00372       LCDType = LCD_HX8312;
00373       /* Setups the LCD */
00374       LCD_Setup();
00375     }
00376   }
00377 }
00378
00379
00380
00381 /**
00382   * @brief  Sets the Text color.
00383   * @param Color: specifies the Text color code RGB(5-6-5).
00384   *   and LCD_DrawPicture functions.
00385   * @retval : None
00386   */
00387 void LCD_SetTextColor(__IO uint16_t Color)
00388 {
00389   TextColor = Color;
00390 }
00391
00392
00393
00394 /**
00395   * @brief  Sets the Background color.
00396   * @param Color: specifies the Background color code RGB(5-6-5).
00397   *   LCD_DrawChar and LCD_DrawPicture functions.
00398   * @retval : None
00399   */
00400 void LCD_SetBackColor(__IO uint16_t Color)
00401 {
00402   BackColor = Color;
00403 }
00404
00405
00406
00407 /**
00408   * @brief  Clears the selected line.
00409   * @param Line: the Line to be cleared.
00410   *   This parameter can be one of the following values:
00411   * @arg Linex: where x can be 0..9
00412   * @retval : None
00413   */
00414 void LCD_ClearLine(uint8_t Line)
00415 {
00416   LCD_DisplayStringLine(Line, "                    ");
00417 }
00418
00419
00420
00421 /**
00422   * @brief  Clears the hole LCD.
00423   * @param lor: the color of the background.
00424   * @retval : None
00425   */
00426 void LCD_Clear(uint16_t Color)
00427 {
00428   uint32_t index = 0;
00429
00430   LCD_SetCursor(0x00, 0x013F);
00431
00432   if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
00433   {
00434     LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
00435   }
00436
00437   for(index = 0; index < 76800; index++)
00438   {
00439     LCD_WriteRAM(Color);
00440   }
00441
00442   if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
00443   {
00444     LCD_CtrlLinesWrite(GPIOB, CtrlPin_NCS, Bit_SET);
00445   }
00446 }
00447
00448
00449
00450 /**
00451   * @brief  Sets the cursor position.
00452   * @param Xpos: specifies the X position.
00453   * @param Ypos: specifies the Y position.
00454   * @retval : None
00455   */
00456 void LCD_SetCursor(uint8_t Xpos, uint16_t Ypos)
00457 {
00458   if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
00459   {
00460     LCD_WriteReg(R32, Xpos);
00461     LCD_WriteReg(R33, Ypos);
00462   }
00463   else if(LCDType == LCD_HX8312)
00464   {
00465     LCD_WriteReg(R66, Xpos);
00466     LCD_WriteReg(R67, ((Ypos & 0x100)>> 8));
00467     LCD_WriteReg(R68, (Ypos & 0xFF));
00468   }
00469 }
00470
00471
00472
00473 /**
00474   * @brief  Draws a character on LCD.
00475   * @param Xpos: the Line where to display the character shape.
00476   *   This parameter can be one of the following values:
00477   * @param Linex: where x can be 0..9
00478   * @param Ypos: start column address.
00479   * @param c: pointer to the character data.
00480   * @retval : None
00481   */
00482 void LCD_DrawChar(uint8_t Xpos, uint16_t Ypos, const uint16_t *c)
00483 {
00484   uint32_t index = 0, i = 0;
00485   uint8_t Xaddress = 0;
00486
00487   Xaddress = Xpos;
00488
00489   LCD_SetCursor(Xaddress, Ypos);
00490
00491   for(index = 0; index < 24; index++)
00492   {
00493     if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
00494     {
00495       LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
00496     }
00497     for(i = 0; i < 16; i++)
00498     {
00499       if((c[index] & (1 << i)) == 0x00)
00500       {
00501         LCD_WriteRAM(BackColor);
00502       }
00503       else
00504       {
00505         LCD_WriteRAM(TextColor);
00506       }
00507     }
00508     if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
00509     {
00510       LCD_CtrlLinesWrite(GPIOB, CtrlPin_NCS, Bit_SET);
00511     }
00512     Xaddress++;
00513     LCD_SetCursor(Xaddress, Ypos);
00514   }
00515 }
00516
00517
00518
00519 /**
00520   * @brief  Displays one character (16dots width, 24dots height).
00521   * @param Line: the Line where to display the character shape .
00522   *   This parameter can be one of the following values:
00523   * @arg Linex: where x can be 0..9
00524   * @param Column: start column address.
00525   * @param Ascii: character ascii code, must be between 0x20 and 0x7E.
00526   * @retval : None
00527   */
00528 void LCD_DisplayChar(uint8_t Line, uint16_t Column, uint8_t Ascii)
00529 {
00530   Ascii -= 32;
00531   LCD_DrawChar(Line, Column, &ASCII_Table[Ascii * 24]);
00532 }
00533
00534
00535
00536 /**
00537   * @brief  Displays a maximum of 20 char on the LCD.
00538   * @param Line: the Line where to display the character shape .
00539   *   This parameter can be one of the following values:
00540   * @arg Linex: where x can be 0..9
00541   * @param *ptr: pointer to string to display on LCD.
00542   * @retval : None
00543   */
00544 void LCD_DisplayStringLine(uint8_t Line, uint8_t *ptr)
00545 {
00546   uint32_t i = 0;
00547   uint16_t refcolumn = 319;
00548
00549   /* Send the string character by character on lCD */
00550   while ((*ptr != 0) & (i < 20))
00551   {
00552     /* Display one character on LCD */
00553     LCD_DisplayChar(Line, refcolumn, *ptr);
00554     /* Decrement the column position by 16 */
00555     refcolumn -= 16;
00556     /* Point on the next character */
00557     ptr++;
00558     /* Increment the character counter */
00559     i++;
00560   }
00561 }
00562
00563
00564
00565 /**
00566   * @brief  Sets a display window
00567   * @param Xpos: specifies the X buttom left position.
00568   * @param Ypos: specifies the Y buttom left position.
00569   * @param Height: display window height.
00570   * @param Width: display window width.
00571   * @retval : None
00572   */
00573 void LCD_SetDisplayWindow(uint8_t Xpos, uint16_t Ypos, uint8_t Height, uint16_t Width)
00574 {
00575   if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
00576   {
00577     /* Horizontal GRAM Start Address */
00578     if(Xpos >= Height)
00579     {
00580       LCD_WriteReg(R80, (Xpos - Height + 1));
00581     }
00582     else
00583     {
00584       LCD_WriteReg(R80, 0);
00585     }
00586     /* Horizontal GRAM End Address */
00587     LCD_WriteReg(R81, Xpos);
00588     /* Vertical GRAM Start Address */
00589     if(Ypos >= Width)
00590     {
00591       LCD_WriteReg(R82, (Ypos - Width + 1));
00592     }
00593     else
00594     {
00595       LCD_WriteReg(R82, 0);
00596     }
00597     /* Vertical GRAM End Address */
00598     LCD_WriteReg(R83, Ypos);
00599   }
00600   else if(LCDType == LCD_HX8312)
00601   {
00602     LCD_WriteReg(R1, 0xD0);
00603     LCD_WriteReg(R5, 0x14);
00604
00605     LCD_WriteReg(R69, (Xpos - Height + 1));
00606     LCD_WriteReg(R70, Xpos);
00607
00608     LCD_WriteReg(R71, (((Ypos - Width + 1) & 0x100)>> 8));
00609     LCD_WriteReg(R72, ((Ypos - Width + 1) & 0xFF));
00610
00611     LCD_WriteReg(R73, ((Ypos & 0x100)>> 8));
00612     LCD_WriteReg(R74, (Ypos & 0xFF));
00613   }
00614
00615   LCD_SetCursor(Xpos, Ypos);
00616 }
00617
00618
00619
00620 /**
00621   * @brief  Disables LCD Window mode.
00622   * @param  None
00623   * @retval : None
00624   */
00625 void LCD_WindowModeDisable(void)
00626 {
00627   if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
00628   {
00629     LCD_SetDisplayWindow(239, 0x13F, 240, 320);
00630     LCD_WriteReg(R3, 0x1018);
00631   }
00632   else if(LCDType == LCD_HX8312)
00633   {
00634     LCD_WriteReg(R1, 0x50);
00635     LCD_WriteReg(R5, 0x04);
00636   }
00637
00638 }
00639
00640
00641 /**
00642   * @brief  Displays a line.
00643   * @param Xpos: specifies the X position.
00644   * @param Ypos: specifies the Y position.
00645   * @param Length: line length.
00646   * @param Direction: line direction.
00647   *   This parameter can be one of the following values: Vertical
00648   *   or Horizontal.
00649   * @retval : None
00650   */
00651 void LCD_DrawLine(uint8_t Xpos, uint16_t Ypos, uint16_t Length, uint8_t Direction)
00652 {
00653   uint32_t i = 0;
00654
00655   LCD_SetCursor(Xpos, Ypos);
00656
00657   if(Direction == Horizontal)
00658   {
00659     if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
00660     {
00661       LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
00662     }
00663     for(i = 0; i < Length; i++)
00664     {
00665       LCD_WriteRAM(TextColor);
00666     }
00667     if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
00668     {
00669       LCD_CtrlLinesWrite(GPIOB, CtrlPin_NCS, Bit_SET);
00670     }
00671   }
00672   else
00673   {
00674    for(i = 0; i < Length; i++)
00675     {
00676       if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
00677       {
00678         LCD_WriteRAMWord(TextColor);
00679       }
00680       else  if(LCDType == LCD_HX8312)
00681       {
00682         LCD_WriteRAM(TextColor);
00683       }
00684       Xpos++;
00685       LCD_SetCursor(Xpos, Ypos);
00686     }
00687   }
00688 }
00689
00690
00691
00692 /**
00693   * @brief  Displays a rectangle.
00694   * @param Xpos: specifies the X position.
00695   * @param Ypos: specifies the Y position.
00696   * @param Height: display rectangle height.
00697   * @param Width: display rectangle width.
00698   * @retval : None
00699   */
00700 void LCD_DrawRect(uint8_t Xpos, uint16_t Ypos, uint8_t Height, uint16_t Width)
00701 {
00702   LCD_DrawLine(Xpos, Ypos, Width, Horizontal);
00703   LCD_DrawLine((Xpos + Height), Ypos, Width, Horizontal);
00704
00705   LCD_DrawLine(Xpos, Ypos, Height, Vertical);
00706   LCD_DrawLine(Xpos, (Ypos - Width + 1), Height, Vertical);
00707 }
00708
00709
00710
00711 /**
00712   * @brief  Displays a circle.
00713   * @param Xpos: specifies the X position.
00714   * @param Ypos: specifies the Y position.
00715   * @param Height: display rectangle height.
00716   * @param Width: display rectangle width.
00717   * @retval : None
00718   */
00719 void LCD_DrawCircle(uint8_t Xpos, uint16_t Ypos, uint16_t Radius)
00720 {
00721   int32_t  D;/* Decision Variable */
00722   uint32_t  CurX;/* Current X Value */
00723   uint32_t  CurY;/* Current Y Value */
00724
00725   D = 3 - (Radius << 1);
00726   CurX = 0;
00727   CurY = Radius;
00728
00729   while (CurX <= CurY)
00730   {
00731     LCD_SetCursor(Xpos + CurX, Ypos + CurY);
00732     if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
00733     {
00734       LCD_WriteRAMWord(TextColor);
00735     }
00736     else if(LCDType == LCD_HX8312)
00737     {
00738       LCD_WriteRAM(TextColor);
00739     }
00740     LCD_SetCursor(Xpos + CurX, Ypos - CurY);
00741     if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
00742     {
00743       LCD_WriteRAMWord(TextColor);
00744     }
00745     else if(LCDType == LCD_HX8312)
00746     {
00747       LCD_WriteRAM(TextColor);
00748     }
00749     LCD_SetCursor(Xpos - CurX, Ypos + CurY);
00750     if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
00751     {
00752       LCD_WriteRAMWord(TextColor);
00753     }
00754     else if(LCDType == LCD_HX8312)
00755     {
00756       LCD_WriteRAM(TextColor);
00757     }
00758     LCD_SetCursor(Xpos - CurX, Ypos - CurY);
00759     if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
00760     {
00761       LCD_WriteRAMWord(TextColor);
00762     }
00763     else if(LCDType == LCD_HX8312)
00764     {
00765       LCD_WriteRAM(TextColor);
00766     }
00767     LCD_SetCursor(Xpos + CurY, Ypos + CurX);
00768     if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
00769     {
00770       LCD_WriteRAMWord(TextColor);
00771     }
00772     else if(LCDType == LCD_HX8312)
00773     {
00774       LCD_WriteRAM(TextColor);
00775     }
00776     LCD_SetCursor(Xpos + CurY, Ypos - CurX);
00777     if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
00778     {
00779       LCD_WriteRAMWord(TextColor);
00780     }
00781     else if(LCDType == LCD_HX8312)
00782     {
00783       LCD_WriteRAM(TextColor);
00784     }
00785     LCD_SetCursor(Xpos - CurY, Ypos + CurX);
00786     if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
00787     {
00788       LCD_WriteRAMWord(TextColor);
00789     }
00790     else if(LCDType == LCD_HX8312)
00791     {
00792       LCD_WriteRAM(TextColor);
00793     }
00794     LCD_SetCursor(Xpos - CurY, Ypos - CurX);
00795     if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
00796     {
00797       LCD_WriteRAMWord(TextColor);
00798     }
00799     else if(LCDType == LCD_HX8312)
00800     {
00801       LCD_WriteRAM(TextColor);
00802     }
00803
00804     if (D < 0)
00805     {
00806       D += (CurX << 2) + 6;
00807     }
00808     else
00809     {
00810       D += ((CurX - CurY) << 2) + 10;
00811       CurY--;
00812     }
00813     CurX++;
00814   }
00815 }
00816
00817
00818
00819 /**
00820   * @brief  Displays a monocolor picture.
00821   * @param Pict: pointer to the picture array.
00822   * @retval : None
00823   */
00824 void LCD_DrawMonoPict(const uint32_t *Pict)
00825 {
00826   uint32_t index = 0, i = 0;
00827
00828   LCD_SetCursor(0, 319);
00829   if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
00830   {
00831     LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
00832   }
00833   for(index = 0; index < 2400; index++)
00834   {
00835     for(i = 0; i < 32; i++)
00836     {
00837       if((Pict[index] & (1 << i)) == 0x00)
00838       {
00839         LCD_WriteRAM(BackColor);
00840       }
00841       else
00842       {
00843         LCD_WriteRAM(TextColor);
00844       }
00845     }
00846   }
00847   if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
00848   {
00849     LCD_CtrlLinesWrite(GPIOB, CtrlPin_NCS, Bit_SET);
00850   }
00851 }
00852
00853
00854
00855 /**
00856   * @brief  Reset LCD control line(/CS) and Send Start-Byte
00857   * @param Start_Byte: the Start-Byte to be sent
00858   * @retval : None
00859   */
00860 void LCD_nCS_StartByte(uint8_t Start_Byte)
00861 {
00862   LCD_CtrlLinesWrite(GPIOB, CtrlPin_NCS, Bit_RESET);
00863
00864   SPI_I2S_SendData(SPI2, Start_Byte);
00865
00866   while(SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_BSY) != RESET)
00867   {
00868   }
00869 }
00870
00871
00872
00873 /**
00874   * @brief  Writes index to select the LCD register.
00875   * @param LCD_Reg: address of the selected register.
00876   * @retval : None
00877   */
00878 void LCD_WriteRegIndex(uint8_t LCD_Reg)
00879 {
00880   /* Reset LCD control line(/CS) and Send Start-Byte */
00881   LCD_nCS_StartByte(START_BYTE | SET_INDEX);
00882
00883   /* Write 16-bit Reg Index (High Byte is 0) */
00884   SPI_I2S_SendData(SPI2, 0x00);
00885
00886   while(SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_BSY) != RESET)
00887   {
00888   }
00889
00890   SPI_I2S_SendData(SPI2, LCD_Reg);
00891
00892   while(SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_BSY) != RESET)
00893   {
00894   }
00895
00896   LCD_CtrlLinesWrite(GPIOB, CtrlPin_NCS, Bit_SET);
00897 }
00898
00899
00900
00901 /**
00902   * @brief  Writes to the selected LCD ILI9320 register.
00903   * @param LCD_Reg: address of the selected register.
00904   * @arg LCD_RegValue: value to write to the selected register.
00905   * @retval : None
00906   */
00907 static void LCD_WriteRegILI9320(uint8_t LCD_Reg, uint16_t LCD_RegValue)
00908 {
00909   /* Write 16-bit Index (then Write Reg) */
00910   LCD_WriteRegIndex(LCD_Reg);
00911
00912   /* Write 16-bit Reg */
00913   /* Reset LCD control line(/CS) and Send Start-Byte */
00914   LCD_nCS_StartByte(START_BYTE | LCD_WRITE_REG);
00915
00916   SPI_I2S_SendData(SPI2, LCD_RegValue>>8);
00917   while(SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_BSY) != RESET)
00918   {
00919   }
00920   SPI_I2S_SendData(SPI2, (LCD_RegValue & 0xFF));
00921   while(SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_BSY) != RESET)
00922   {
00923   }
00924
00925   LCD_CtrlLinesWrite(GPIOB, CtrlPin_NCS, Bit_SET);
00926 }
00927
00928
00929
00930 /**
00931   * @brief  Reads the selected LCD Register.
00932   * @param  None
00933   * @retval : LCD Register Value.
00934   */
00935 uint16_t LCD_ReadReg(uint8_t LCD_Reg)
00936 {
00937   uint16_t tmp = 0;
00938   uint8_t i = 0;
00939
00940   /* SPI2 prescaler: 4 */
00941   SPI2->CR1 &= 0xFFC7;
00942   SPI2->CR1 |= 0x0008;
00943
00944   /* Write 16-bit Index (then Read Reg) */
00945   LCD_WriteRegIndex(LCD_Reg);
00946
00947   /* Read 16-bit Reg */
00948   /* Reset LCD control line(/CS) and Send Start-Byte */
00949   LCD_nCS_StartByte(START_BYTE | LCD_READ_REG);
00950
00951   for(i = 0; i < 5; i++)
00952   {
00953     SPI_I2S_SendData(SPI2, 0xFF);
00954     while(SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_BSY) != RESET)
00955     {
00956     }
00957     /* One byte of invalid dummy data read after the start byte */
00958     while(SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_RXNE) == RESET)
00959     {
00960     }
00961     SPI_I2S_ReceiveData(SPI2);
00962   }
00963
00964   SPI_I2S_SendData(SPI2, 0xFF);
00965   /* Read upper byte */
00966   while(SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_BSY) != RESET)
00967   {
00968   }
00969   /* Read lower byte */
00970   while(SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_RXNE) == RESET)
00971   {
00972   }
00973   tmp = SPI_I2S_ReceiveData(SPI2);
00974
00975
00976   SPI_I2S_SendData(SPI2, 0xFF);
00977   while(SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_BSY) != RESET)
00978   {
00979   }
00980   /* Read lower byte */
00981   while(SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_RXNE) == RESET)
00982   {
00983   }
00984   tmp = ((tmp & 0xFF) << 8) | SPI_I2S_ReceiveData(SPI2);
00985
00986   LCD_CtrlLinesWrite(GPIOB, CtrlPin_NCS, Bit_SET);
00987
00988   /* SPI2 prescaler: 2 */
00989   SPI2->CR1 &= 0xFFC7;
00990
00991   return tmp;
00992 }
00993
00994
00995
00996 /**
00997   * @brief  Prepare to write to the LCD RAM.
00998   * @param  None
00999   * @retval : None
01000   */
01001 void LCD_WriteRAM_Prepare(void)
01002 {
01003   LCD_WriteRegIndex(R34); /* Select GRAM Reg */
01004
01005   /* Reset LCD control line(/CS) and Send Start-Byte */
01006   LCD_nCS_StartByte(START_BYTE | LCD_WRITE_REG);
01007 }
01008
01009
01010
01011 /**
01012   * @brief  Writes 1 word to the LCD RAM.
01013   * @param RGB_Code: the pixel color in RGB mode (5-6-5).
01014   * @retval : None
01015   */
01016 void LCD_WriteRAMWord(uint16_t RGB_Code)
01017 {
01018   LCD_WriteRAM_Prepare();
01019
01020   LCD_WriteRAM(RGB_Code);
01021
01022   LCD_CtrlLinesWrite(GPIOB, CtrlPin_NCS, Bit_SET);
01023 }
01024
01025
01026
01027 /**
01028   * @brief  Writes to the selected LCD HX8312 register.
01029   * @param LCD_Reg: address of the selected register.
01030   * @arg LCD_RegValue: value to write to the selected register.
01031   * @retval : None
01032   */
01033 static void LCD_WriteRegHX8312(uint8_t LCD_Reg, uint8_t LCD_RegValue)
01034 {
01035   uint16_t tmp = 0;
01036
01037   LCD_CtrlLinesWrite(GPIOD, CtrlPin_NWR, Bit_RESET);
01038   LCD_CtrlLinesWrite(GPIOD, CtrlPin_RS, Bit_RESET);
01039   LCD_CtrlLinesWrite(GPIOB, CtrlPin_NCS, Bit_RESET);
01040
01041   tmp = LCD_Reg << 8;
01042   tmp |= LCD_RegValue;
01043
01044   SPI_I2S_SendData(SPI2, tmp);
01045   while(SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_BSY) != RESET)
01046   {
01047   }
01048
01049   LCD_CtrlLinesWrite(GPIOB, CtrlPin_NCS, Bit_SET);
01050 }
01051
01052
01053
01054 /**
01055   * @brief  Writes to the selected LCD register.
01056   * @param LCD_Reg: address of the selected register.
01057   * @arg LCD_RegValue: value to write to the selected register.
01058   * @retval : None
01059   */
01060 void LCD_WriteReg(uint8_t LCD_Reg, uint16_t LCD_RegValue)
01061 {
01062   if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
01063   {
01064     LCD_WriteRegILI9320(LCD_Reg, LCD_RegValue);
01065   }
01066   else if(LCDType == LCD_HX8312)
01067   {
01068     LCD_WriteRegHX8312(LCD_Reg, ((uint8_t)LCD_RegValue));
01069   }
01070 }
01071
01072
01073
01074
01075 /**
01076   * @brief  Writes to the LCD RAM.
01077   * @param RGB_Code: the pixel color in RGB mode (5-6-5).
01078   * @retval : None
01079   */
01080 void LCD_WriteRAM(uint16_t RGB_Code)
01081 {
01082   if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
01083   {
01084     SPI_I2S_SendData(SPI2, RGB_Code >> 8);
01085     while(SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_BSY) != RESET)
01086     {
01087     }
01088     SPI_I2S_SendData(SPI2, RGB_Code & 0xFF);
01089     while(SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_BSY) != RESET)
01090     {
01091     }
01092   }
01093   if(LCDType == LCD_HX8312)
01094   {
01095     LCD_CtrlLinesWrite(GPIOD, CtrlPin_NWR, Bit_RESET);
01096     LCD_CtrlLinesWrite(GPIOD, CtrlPin_RS, Bit_SET);
01097     LCD_CtrlLinesWrite(GPIOB, CtrlPin_NCS, Bit_RESET);
01098
01099     SPI_I2S_SendData(SPI2, RGB_Code);
01100     while(SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_BSY) != RESET)
01101     {
01102     }
01103
01104     LCD_CtrlLinesWrite(GPIOB, CtrlPin_NCS, Bit_SET);
01105   }
01106 }
01107
01108
01109
01110 /**
01111   * @brief  Power on the LCD.
01112   * @param  None
01113   * @retval : None
01114   */
01115 void LCD_PowerOn(void)
01116 {
01117   if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
01118   {
01119     /* Power On sequence ---------------------------------------------------------*/
01120     LCD_WriteReg(R16, 0x0000); /* SAP, BT[3:0], AP, DSTB, SLP, STB */
01121     LCD_WriteReg(R17, 0x0000); /* DC1[2:0], DC0[2:0], VC[2:0] */
01122     LCD_WriteReg(R18, 0x0000); /* VREG1OUT voltage */
01123     LCD_WriteReg(R19, 0x0000); /* VDV[4:0] for VCOM amplitude */
01124     Delay(20);                 /* Dis-charge capacitor power voltage (200ms) */
01125     LCD_WriteReg(R16, 0x17B0); /* SAP, BT[3:0], AP, DSTB, SLP, STB */
01126     LCD_WriteReg(R17, 0x0137); /* DC1[2:0], DC0[2:0], VC[2:0] */
01127     Delay(5);                  /* Delay 50 ms */
01128     LCD_WriteReg(R18, 0x0139); /* VREG1OUT voltage */
01129     Delay(5);                  /* delay 50 ms */
01130     LCD_WriteReg(R19, 0x1d00); /* VDV[4:0] for VCOM amplitude */
01131     LCD_WriteReg(R41, 0x0013); /* VCM[4:0] for VCOMH */
01132     Delay(5);                  /* delay 50 ms */
01133     LCD_WriteReg(R7, 0x0173);  /* 262K color and display ON */
01134   }
01135   else if(LCDType == LCD_HX8312)
01136   {
01137     /* Power On Set */
01138     LCD_WriteReg(R28, 0x73);
01139     LCD_WriteReg(R36, 0x74);
01140     LCD_WriteReg(R30, 0x01);
01141     LCD_WriteReg(R24, 0xC1);
01142     Delay(1); /* Delay 10 ms */
01143     LCD_WriteReg(R24, 0xE1);
01144     LCD_WriteReg(R24, 0xF1);
01145     Delay(6); /* Delay 60 ms */
01146     LCD_WriteReg(R24, 0xF5);
01147     Delay(6); /* Delay 60 ms */
01148     LCD_WriteReg(R27, 0x09);
01149     Delay(1); /* Delay 10 ms */
01150     LCD_WriteReg(R31, 0x11);
01151     LCD_WriteReg(R32, 0x0E);
01152     LCD_WriteReg(R30, 0x81);
01153     Delay(1); /* Delay 10 ms */
01154   }
01155 }
01156
01157
01158
01159 /**
01160   * @brief  Enables the Display.
01161   * @param  None
01162   * @retval : None
01163   */
01164 void LCD_DisplayOn(void)
01165 {
01166   if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
01167   {
01168     /* Display On */
01169     LCD_WriteReg(R7, 0x0173); /* 262K color and display ON */
01170   }
01171   else if(LCDType == LCD_HX8312)
01172   {
01173     LCD_WriteReg(R1, 0x50);
01174     LCD_WriteReg(R5, 0x04);
01175
01176     /* Display On */
01177     LCD_WriteReg(R0, 0x80);
01178     LCD_WriteReg(R59, 0x01);
01179     Delay(4);                 /* Delay 40 ms */
01180     LCD_WriteReg(R0, 0x20);
01181   }
01182 }
01183
01184
01185
01186 /**
01187   * @brief  Disables the Display.
01188   * @param  None
01189   * @retval : None
01190   */
01191 void LCD_DisplayOff(void)
01192 {
01193   if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
01194   {
01195     /* Display Off */
01196     LCD_WriteReg(R7, 0x0);
01197   }
01198   else if(LCDType == LCD_HX8312)
01199   {
01200     /* Display Off */
01201     LCD_WriteReg(R0, 0xA0);
01202     Delay(4);                 /* Delay 40 ms */
01203     LCD_WriteReg(R59, 0x00);
01204   }
01205 }
01206
01207
01208
01209 /**
01210   * @brief  Configures LCD control lines in Output Push-Pull mode.
01211   * @param  None
01212   * @retval : None
01213   */
01214 void LCD_CtrlLinesConfig(void)
01215 {
01216   GPIO_InitTypeDef GPIO_InitStructure;
01217
01218   /* Configure NCS (PB.02) in Output Push-Pull mode */
01219   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2;
01220   GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
01221   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
01222   GPIO_Init(GPIOB, &GPIO_InitStructure);
01223
01224   /* Configure NWR(RNW), RS (PD.15, PD.07) in Output Push-Pull mode */
01225   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7 | GPIO_Pin_15;
01226   GPIO_Init(GPIOD, &GPIO_InitStructure);
01227
01228   LCD_CtrlLinesWrite(GPIOD, CtrlPin_NWR, Bit_SET);
01229   LCD_CtrlLinesWrite(GPIOD, CtrlPin_RS, Bit_SET);
01230 }
01231
01232
01233
01234 /**
01235   * @brief  Sets or reset LCD control lines.
01236   * @param GPIOx: where x can be B or D to select the GPIO peripheral.
01237   * @param CtrlPins: the Control line. This parameter can be:
01238   * @param CtrlPin_NCS: Chip Select pin (PB.02)
01239   * @param CtrlPin_NWR: Read/Write Selection pin (PD.15)
01240   * @param CtrlPin_RS: Register/RAM Selection pin (PD.07)
01241   * @param BitVal: specifies the value to be written to the selected bit.
01242   *   This parameter can be:
01243   * @param Bit_RESET: to clear the port pin
01244   * @param Bit_SET: to set the port pin
01245   * @retval : None
01246   */
01247 void LCD_CtrlLinesWrite(GPIO_TypeDef* GPIOx, uint16_t CtrlPins, BitAction BitVal)
01248 {
01249   /* Set or Reset the control line */
01250   GPIO_WriteBit(GPIOx, CtrlPins, BitVal);
01251 }
01252
01253
01254
01255 /**
01256   * @brief  Configures the SPI2 interface.
01257   * @param  None
01258   * @retval : None
01259   */
01260 void LCD_SPIConfig(void)
01261 {
01262   SPI_InitTypeDef    SPI_InitStructure;
01263   GPIO_InitTypeDef   GPIO_InitStructure;
01264
01265   /* Enable GPIOB clock */
01266   RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);
01267
01268   /* Enable SPI2 clock  */
01269   RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2, ENABLE);
01270
01271   /* Configure SPI2 pins: NSS, SCK, MISO and MOSI */
01272   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15;
01273   GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
01274   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
01275   GPIO_Init(GPIOB, &GPIO_InitStructure);
01276
01277   SPI_I2S_DeInit(SPI2);
01278
01279   /* SPI2 Config */
01280   SPI_InitStructure.SPI_Direction = SPI_Direction_2Lines_FullDuplex;
01281   SPI_InitStructure.SPI_Mode = SPI_Mode_Master;
01282
01283   if((LCDType == LCD_ILI9320) || (LCDType == LCD_SPFD5408))
01284   {
01285     SPI_InitStructure.SPI_DataSize = SPI_DataSize_8b;
01286     SPI_InitStructure.SPI_CPOL = SPI_CPOL_High;
01287     SPI_InitStructure.SPI_CPHA = SPI_CPHA_2Edge;
01288   }
01289   else if(LCDType == LCD_HX8312)
01290   {
01291     SPI_InitStructure.SPI_DataSize = SPI_DataSize_16b;
01292     SPI_InitStructure.SPI_CPOL = SPI_CPOL_Low;
01293     SPI_InitStructure.SPI_CPHA = SPI_CPHA_1Edge;
01294   }
01295
01296   SPI_InitStructure.SPI_NSS = SPI_NSS_Soft;
01297   SPI_InitStructure.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_2;
01298   SPI_InitStructure.SPI_FirstBit = SPI_FirstBit_MSB;
01299   SPI_Init(SPI2, &SPI_InitStructure);
01300
01301   /* SPI2 enable */
01302   SPI_Cmd(SPI2, ENABLE);
01303 }
01304
01305 /**
01306   * @}
01307   */
01308
01309 /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/


STM32F10xxx DSP library firmware & FFT_Demo: stm3210b_lcd.h Source File

STM32F10x_DSP_Lib_V2.0.0 » Project » FFT_Demo » inc

stm3210b_lcd.h

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file FFT_Demo/inc/stm3210b_lcd.h
00004   * @author  MCD Application Team
00005   * @version  V2.0.0
00006   * @date  04/27/2009
00007   * @brief  This file contains all the functions prototypes for the
00008 *                      stm3210b_lcd firmware driver.
00009   ******************************************************************************
00010   * @copy
00011   *
00012   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
00013   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
00014   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
00015   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
00016   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
00017   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
00018   *
00019   * <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2>
00020   */
00021
00022
00023 /* Define to prevent recursive inclusion -------------------------------------*/
00024 #ifndef __STM3210B_LCD_H
00025 #define __STM3210B_LCD_H
00026
00027 /* Includes ------------------------------------------------------------------*/
00028 #include "stm32f10x.h"
00029
00030
00031 /* Exported types ------------------------------------------------------------*/
00032 /* Exported constants --------------------------------------------------------*/
00033 /* LCD Registers */
00034 #define R0             0x00
00035 #define R1             0x01
00036 #define R2             0x02
00037 #define R3             0x03
00038 #define R4             0x04
00039 #define R5             0x05
00040 #define R6             0x06
00041 #define R7             0x07
00042 #define R8             0x08
00043 #define R9             0x09
00044 #define R10            0x0A
00045 #define R12            0x0C
00046 #define R13            0x0D
00047 #define R14            0x0E
00048 #define R15            0x0F
00049 #define R16            0x10
00050 #define R17            0x11
00051 #define R18            0x12
00052 #define R19            0x13
00053 #define R20            0x14
00054 #define R21            0x15
00055 #define R22            0x16
00056 #define R23            0x17
00057 #define R24            0x18
00058 #define R25            0x19
00059 #define R26            0x1A
00060 #define R27            0x1B
00061 #define R28            0x1C
00062 #define R29            0x1D
00063 #define R30            0x1E
00064 #define R31            0x1F
00065 #define R32            0x20
00066 #define R33            0x21
00067 #define R34            0x22
00068 #define R36            0x24
00069 #define R37            0x25
00070 #define R40            0x28
00071 #define R41            0x29
00072 #define R43            0x2B
00073 #define R45            0x2D
00074 #define R48            0x30
00075 #define R49            0x31
00076 #define R50            0x32
00077 #define R51            0x33
00078 #define R52            0x34
00079 #define R53            0x35
00080 #define R54            0x36
00081 #define R55            0x37
00082 #define R56            0x38
00083 #define R57            0x39
00084 #define R59            0x3B
00085 #define R60            0x3C
00086 #define R61            0x3D
00087 #define R62            0x3E
00088 #define R63            0x3F
00089 #define R64            0x40
00090 #define R65            0x41
00091 #define R66            0x42
00092 #define R67            0x43
00093 #define R68            0x44
00094 #define R69            0x45
00095 #define R70            0x46
00096 #define R71            0x47
00097 #define R72            0x48
00098 #define R73            0x49
00099 #define R74            0x4A
00100 #define R75            0x4B
00101 #define R76            0x4C
00102 #define R77            0x4D
00103 #define R78            0x4E
00104 #define R79            0x4F
00105 #define R80            0x50
00106 #define R81            0x51
00107 #define R82            0x52
00108 #define R83            0x53
00109 #define R96            0x60
00110 #define R97            0x61
00111 #define R106           0x6A
00112 #define R118           0x76
00113 #define R128           0x80
00114 #define R129           0x81
00115 #define R130           0x82
00116 #define R131           0x83
00117 #define R132           0x84
00118 #define R133           0x85
00119 #define R134           0x86
00120 #define R135           0x87
00121 #define R136           0x88
00122 #define R137           0x89
00123 #define R139           0x8B
00124 #define R140           0x8C
00125 #define R141           0x8D
00126 #define R143           0x8F
00127 #define R144           0x90
00128 #define R145           0x91
00129 #define R146           0x92
00130 #define R147           0x93
00131 #define R148           0x94
00132 #define R149           0x95
00133 #define R150           0x96
00134 #define R151           0x97
00135 #define R152           0x98
00136 #define R153           0x99
00137 #define R154           0x9A
00138 #define R157           0x9D
00139 #define R192           0xC0
00140 #define R193           0xC1
00141 #define R227           0xE3
00142 #define R229           0xE5
00143 #define R231           0xE7
00144 #define R239           0xEF
00145
00146 /* LCD Control pins */
00147 #define CtrlPin_NCS    GPIO_Pin_2   /* PB.02 */
00148 #define CtrlPin_RS     GPIO_Pin_7   /* PD.07 */
00149 #define CtrlPin_NWR    GPIO_Pin_15  /* PD.15 */
00150
00151 /* LCD color */
00152 #define White          0xFFFF
00153 #define Black          0x0000
00154 #define Grey           0xF7DE
00155 #define Blue           0x001F
00156 #define Blue2          0x051F
00157 #define Red            0xF800
00158 #define Magenta        0xF81F
00159 #define Green          0x07E0
00160 #define Cyan           0x7FFF
00161 #define Yellow         0xFFE0
00162
00163 #define Line0          0
00164 #define Line1          24
00165 #define Line2          48
00166 #define Line3          72
00167 #define Line4          96
00168 #define Line5          120
00169 #define Line6          144
00170 #define Line7          168
00171 #define Line8          192
00172 #define Line9          216
00173
00174 #define Horizontal     0x00
00175 #define Vertical       0x01
00176
00177 /* Exported macro ------------------------------------------------------------*/
00178 /* Exported functions ------------------------------------------------------- */
00179 /*----- High layer function -----*/
00180 void LCD_Setup(void);
00181 void STM3210B_LCD_Init(void);
00182 void LCD_SetTextColor(__IO uint16_t Color);
00183 void LCD_SetBackColor(__IO uint16_t Color);
00184 void LCD_ClearLine(uint8_t Line);
00185 void LCD_Clear(uint16_t Color);
00186 void LCD_SetCursor(uint8_t Xpos, uint16_t Ypos);
00187 void LCD_DrawChar(uint8_t Xpos, uint16_t Ypos, const uint16_t *c);
00188 void LCD_DisplayChar(uint8_t Line, uint16_t Column, uint8_t Ascii);
00189 void LCD_DisplayStringLine(uint8_t Line, uint8_t *ptr);
00190 void LCD_SetDisplayWindow(uint8_t Xpos, uint16_t Ypos, uint8_t Height, uint16_t Width);
00191 void LCD_WindowModeDisable(void);
00192 void LCD_DrawLine(uint8_t Xpos, uint16_t Ypos, uint16_t Length, uint8_t Direction);
00193 void LCD_DrawRect(uint8_t Xpos, uint16_t Ypos, uint8_t Height, uint16_t Width);
00194 void LCD_DrawCircle(uint8_t Xpos, uint16_t Ypos, uint16_t Radius);
00195 void LCD_DrawMonoPict(const uint32_t *Pict);
00196
00197 /*----- Medium layer function -----*/
00198 void LCD_nCS_StartByte(uint8_t Start_Byte);
00199 void LCD_WriteRegIndex(uint8_t LCD_Reg);
00200 void LCD_WriteReg(uint8_t LCD_Reg, uint16_t LCD_RegValue);
00201 void LCD_WriteRAM_Prepare(void);
00202 void LCD_WriteRAMWord(uint16_t RGB_Code);
00203 uint16_t LCD_ReadReg(uint8_t LCD_Reg);
00204 void LCD_WriteRAM(uint16_t RGB_Code);
00205 void LCD_PowerOn(void);
00206 void LCD_DisplayOn(void);
00207 void LCD_DisplayOff(void);
00208
00209 /*----- Low layer function -----*/
00210 void LCD_CtrlLinesConfig(void);
00211 void LCD_CtrlLinesWrite(GPIO_TypeDef* GPIOx, uint16_t CtrlPins, BitAction BitVal);
00212 void LCD_SPIConfig(void);
00213
00214 void Delay(uint32_t nCount);
00215
00216 #endif /* __STM3210B_LCD_H */
00217
00218 /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/


STM32F10xxx DSP library firmware & FFT_Demo: table_fft.h Source File

STM32F10x_DSP_Lib_V2.0.0 » Libraries » STM32F10x_DSP_Lib » inc

table_fft.h

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file STM32F10x_DSP_Lib/inc/table_fft.h
00004   * @author  MCD Application Team
00005   * @version  V2.0.0
00006   * @date  04/27/2009
00007   * @brief  Contains the coefficients required for FFT computation.
00008   ******************************************************************************
00009   * @copy
00010   *
00011   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
00012   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
00013   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
00014   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
00015   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
00016   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
00017   *
00018   * <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2>
00019   */
00020
00021
00022 /* Define to prevent recursive inclusion -------------------------------------*/
00023 #ifndef __TABLE_FFT_H
00024 #define __TABLE_FFT_H
00025
00026 /* Includes ------------------------------------------------------------------*/
00027
00028 /* Exported types ------------------------------------------------------------*/
00029 /* Exported constants --------------------------------------------------------*/
00030 uint16_t TableFFT[]= {0x4000,0x0000, 0x4000,0x0000, 0x4000,0x0000,
00031                  0xdd5d,0x3b21, 0x22a3,0x187e, 0x0000,0x2d41,
00032                  0xa57e,0x2d41, 0x0000,0x2d41, 0xc000,0x4000,
00033                  0xdd5d,0xe782, 0xdd5d,0x3b21, 0xa57e,0x2d41,
00034                  0x4000,0x0000, 0x4000,0x0000, 0x4000,0x0000,  /* N=64 */
00035                  0x2aaa,0x1294, 0x396b,0x0646, 0x3249,0x0c7c,
00036                  0x11a8,0x238e, 0x3249,0x0c7c, 0x22a3,0x187e,
00037                  0xf721,0x3179, 0x2aaa,0x1294, 0x11a8,0x238e,
00038                  0xdd5d,0x3b21, 0x22a3,0x187e, 0x0000,0x2d41,
00039                  0xc695,0x3fb1, 0x1a46,0x1e2b, 0xee58,0x3537,
00040                  0xb4be,0x3ec5, 0x11a8,0x238e, 0xdd5d,0x3b21,
00041                  0xa963,0x3871, 0x08df,0x289a, 0xcdb7,0x3ec5,
00042                  0xa57e,0x2d41, 0x0000,0x2d41, 0xc000,0x4000,
00043                  0xa963,0x1e2b, 0xf721,0x3179, 0xb4be,0x3ec5,
00044                  0xb4be,0x0c7c, 0xee58,0x3537, 0xac61,0x3b21,
00045                  0xc695,0xf9ba, 0xe5ba,0x3871, 0xa73b,0x3537,
00046                  0xdd5d,0xe782, 0xdd5d,0x3b21, 0xa57e,0x2d41,
00047                  0xf721,0xd766, 0xd556,0x3d3f, 0xa73b,0x238e,
00048                  0x11a8,0xcac9, 0xcdb7,0x3ec5, 0xac61,0x187e,
00049                  0x2aaa,0xc2c1, 0xc695,0x3fb1, 0xb4be,0x0c7c,
00050                  0x4000,0x0000, 0x4000,0x0000, 0x4000,0x0000,  /* N=256 */
00051                  0x3b1e,0x04b5, 0x3e69,0x0192, 0x3cc8,0x0324,
00052                  0x35eb,0x0964, 0x3cc8,0x0324, 0x396b,0x0646,
00053                  0x306c,0x0e06, 0x3b1e,0x04b5, 0x35eb,0x0964,
00054                  0x2aaa,0x1294, 0x396b,0x0646, 0x3249,0x0c7c,
00055                  0x24ae,0x1709, 0x37af,0x07d6, 0x2e88,0x0f8d,
00056                  0x1e7e,0x1b5d, 0x35eb,0x0964, 0x2aaa,0x1294,
00057                  0x1824,0x1f8c, 0x341e,0x0af1, 0x26b3,0x1590,
00058                  0x11a8,0x238e, 0x3249,0x0c7c, 0x22a3,0x187e,
00059                  0x0b14,0x2760, 0x306c,0x0e06, 0x1e7e,0x1b5d,
00060                  0x0471,0x2afb, 0x2e88,0x0f8d, 0x1a46,0x1e2b,
00061                  0xfdc7,0x2e5a, 0x2c9d,0x1112, 0x15fe,0x20e7,
00062                  0xf721,0x3179, 0x2aaa,0x1294, 0x11a8,0x238e,
00063                  0xf087,0x3453, 0x28b2,0x1413, 0x0d48,0x2620,
00064                  0xea02,0x36e5, 0x26b3,0x1590, 0x08df,0x289a,
00065                  0xe39c,0x392b, 0x24ae,0x1709, 0x0471,0x2afb,
00066                  0xdd5d,0x3b21, 0x22a3,0x187e, 0x0000,0x2d41,
00067                  0xd74e,0x3cc5, 0x2093,0x19ef, 0xfb8f,0x2f6c,
00068                  0xd178,0x3e15, 0x1e7e,0x1b5d, 0xf721,0x3179,
00069                  0xcbe2,0x3f0f, 0x1c64,0x1cc6, 0xf2b8,0x3368,
00070                  0xc695,0x3fb1, 0x1a46,0x1e2b, 0xee58,0x3537,
00071                  0xc197,0x3ffb, 0x1824,0x1f8c, 0xea02,0x36e5,
00072                  0xbcf0,0x3fec, 0x15fe,0x20e7, 0xe5ba,0x3871,
00073                  0xb8a6,0x3f85, 0x13d5,0x223d, 0xe182,0x39db,
00074                  0xb4be,0x3ec5, 0x11a8,0x238e, 0xdd5d,0x3b21,
00075                  0xb140,0x3daf, 0x0f79,0x24da, 0xd94d,0x3c42,
00076                  0xae2e,0x3c42, 0x0d48,0x2620, 0xd556,0x3d3f,
00077                  0xab8e,0x3a82, 0x0b14,0x2760, 0xd178,0x3e15,
00078                  0xa963,0x3871, 0x08df,0x289a, 0xcdb7,0x3ec5,
00079                  0xa7b1,0x3612, 0x06a9,0x29ce, 0xca15,0x3f4f,
00080                  0xa678,0x3368, 0x0471,0x2afb, 0xc695,0x3fb1,
00081                  0xa5bc,0x3076, 0x0239,0x2c21, 0xc338,0x3fec,
00082                  0xa57e,0x2d41, 0x0000,0x2d41, 0xc000,0x4000,
00083                  0xa5bc,0x29ce, 0xfdc7,0x2e5a, 0xbcf0,0x3fec,
00084                  0xa678,0x2620, 0xfb8f,0x2f6c, 0xba09,0x3fb1,
00085                  0xa7b1,0x223d, 0xf957,0x3076, 0xb74d,0x3f4f,
00086                  0xa963,0x1e2b, 0xf721,0x3179, 0xb4be,0x3ec5,
00087                  0xab8e,0x19ef, 0xf4ec,0x3274, 0xb25e,0x3e15,
00088                  0xae2e,0x1590, 0xf2b8,0x3368, 0xb02d,0x3d3f,
00089                  0xb140,0x1112, 0xf087,0x3453, 0xae2e,0x3c42,
00090                  0xb4be,0x0c7c, 0xee58,0x3537, 0xac61,0x3b21,
00091                  0xb8a6,0x07d6, 0xec2b,0x3612, 0xaac8,0x39db,
00092                  0xbcf0,0x0324, 0xea02,0x36e5, 0xa963,0x3871,
00093                  0xc197,0xfe6e, 0xe7dc,0x37b0, 0xa834,0x36e5,
00094                  0xc695,0xf9ba, 0xe5ba,0x3871, 0xa73b,0x3537,
00095                  0xcbe2,0xf50f, 0xe39c,0x392b, 0xa678,0x3368,
00096                  0xd178,0xf073, 0xe182,0x39db, 0xa5ed,0x3179,
00097                  0xd74e,0xebed, 0xdf6d,0x3a82, 0xa599,0x2f6c,
00098                  0xdd5d,0xe782, 0xdd5d,0x3b21, 0xa57e,0x2d41,
00099                  0xe39c,0xe33a, 0xdb52,0x3bb6, 0xa599,0x2afb,
00100                  0xea02,0xdf19, 0xd94d,0x3c42, 0xa5ed,0x289a,
00101                  0xf087,0xdb26, 0xd74e,0x3cc5, 0xa678,0x2620,
00102                  0xf721,0xd766, 0xd556,0x3d3f, 0xa73b,0x238e,
00103                  0xfdc7,0xd3df, 0xd363,0x3daf, 0xa834,0x20e7,
00104                  0x0471,0xd094, 0xd178,0x3e15, 0xa963,0x1e2b,
00105                  0x0b14,0xcd8c, 0xcf94,0x3e72, 0xaac8,0x1b5d,
00106                  0x11a8,0xcac9, 0xcdb7,0x3ec5, 0xac61,0x187e,
00107                  0x1824,0xc850, 0xcbe2,0x3f0f, 0xae2e,0x1590,
00108                  0x1e7e,0xc625, 0xca15,0x3f4f, 0xb02d,0x1294,
00109                  0x24ae,0xc44a, 0xc851,0x3f85, 0xb25e,0x0f8d,
00110                  0x2aaa,0xc2c1, 0xc695,0x3fb1, 0xb4be,0x0c7c,
00111                  0x306c,0xc18e, 0xc4e2,0x3fd4, 0xb74d,0x0964,
00112                  0x35eb,0xc0b1, 0xc338,0x3fec, 0xba09,0x0646,
00113                  0x3b1e,0xc02c, 0xc197,0x3ffb, 0xbcf0,0x0324,
00114                  0x4000,0x0000, 0x4000,0x0000, 0x4000,0x0000, /* N=1024*/
00115                  0x3ed0,0x012e, 0x3f9b,0x0065, 0x3f36,0x00c9,
00116                  0x3d9a,0x025b, 0x3f36,0x00c9, 0x3e69,0x0192,
00117                  0x3c5f,0x0388, 0x3ed0,0x012e, 0x3d9a,0x025b,
00118                  0x3b1e,0x04b5, 0x3e69,0x0192, 0x3cc8,0x0324,
00119                  0x39d9,0x05e2, 0x3e02,0x01f7, 0x3bf4,0x03ed,
00120                  0x388e,0x070e, 0x3d9a,0x025b, 0x3b1e,0x04b5,
00121                  0x373f,0x0839, 0x3d31,0x02c0, 0x3a46,0x057e,
00122                  0x35eb,0x0964, 0x3cc8,0x0324, 0x396b,0x0646,
00123                  0x3492,0x0a8e, 0x3c5f,0x0388, 0x388e,0x070e,
00124                  0x3334,0x0bb7, 0x3bf4,0x03ed, 0x37af,0x07d6,
00125                  0x31d2,0x0cdf, 0x3b8a,0x0451, 0x36ce,0x089d,
00126                  0x306c,0x0e06, 0x3b1e,0x04b5, 0x35eb,0x0964,
00127                  0x2f02,0x0f2b, 0x3ab2,0x051a, 0x3505,0x0a2b,
00128                  0x2d93,0x1050, 0x3a46,0x057e, 0x341e,0x0af1,
00129                  0x2c21,0x1173, 0x39d9,0x05e2, 0x3334,0x0bb7,
00130                  0x2aaa,0x1294, 0x396b,0x0646, 0x3249,0x0c7c,
00131                  0x2931,0x13b4, 0x38fd,0x06aa, 0x315b,0x0d41,
00132                  0x27b3,0x14d2, 0x388e,0x070e, 0x306c,0x0e06,
00133                  0x2632,0x15ee, 0x381f,0x0772, 0x2f7b,0x0eca,
00134                  0x24ae,0x1709, 0x37af,0x07d6, 0x2e88,0x0f8d,
00135                  0x2326,0x1821, 0x373f,0x0839, 0x2d93,0x1050,
00136                  0x219c,0x1937, 0x36ce,0x089d, 0x2c9d,0x1112,
00137                  0x200e,0x1a4b, 0x365d,0x0901, 0x2ba4,0x11d3,
00138                  0x1e7e,0x1b5d, 0x35eb,0x0964, 0x2aaa,0x1294,
00139                  0x1ceb,0x1c6c, 0x3578,0x09c7, 0x29af,0x1354,
00140                  0x1b56,0x1d79, 0x3505,0x0a2b, 0x28b2,0x1413,
00141                  0x19be,0x1e84, 0x3492,0x0a8e, 0x27b3,0x14d2,
00142                  0x1824,0x1f8c, 0x341e,0x0af1, 0x26b3,0x1590,
00143                  0x1688,0x2091, 0x33a9,0x0b54, 0x25b1,0x164c,
00144                  0x14ea,0x2193, 0x3334,0x0bb7, 0x24ae,0x1709,
00145                  0x134a,0x2292, 0x32bf,0x0c1a, 0x23a9,0x17c4,
00146                  0x11a8,0x238e, 0x3249,0x0c7c, 0x22a3,0x187e,
00147                  0x1005,0x2488, 0x31d2,0x0cdf, 0x219c,0x1937,
00148                  0x0e61,0x257e, 0x315b,0x0d41, 0x2093,0x19ef,
00149                  0x0cbb,0x2671, 0x30e4,0x0da4, 0x1f89,0x1aa7,
00150                  0x0b14,0x2760, 0x306c,0x0e06, 0x1e7e,0x1b5d,
00151                  0x096d,0x284c, 0x2ff4,0x0e68, 0x1d72,0x1c12,
00152                  0x07c4,0x2935, 0x2f7b,0x0eca, 0x1c64,0x1cc6,
00153                  0x061b,0x2a1a, 0x2f02,0x0f2b, 0x1b56,0x1d79,
00154                  0x0471,0x2afb, 0x2e88,0x0f8d, 0x1a46,0x1e2b,
00155                  0x02c7,0x2bd8, 0x2e0e,0x0fee, 0x1935,0x1edc,
00156                  0x011c,0x2cb2, 0x2d93,0x1050, 0x1824,0x1f8c,
00157                  0xff72,0x2d88, 0x2d18,0x10b1, 0x1711,0x203a,
00158                  0xfdc7,0x2e5a, 0x2c9d,0x1112, 0x15fe,0x20e7,
00159                  0xfc1d,0x2f28, 0x2c21,0x1173, 0x14ea,0x2193,
00160                  0xfa73,0x2ff2, 0x2ba4,0x11d3, 0x13d5,0x223d,
00161                  0xf8ca,0x30b8, 0x2b28,0x1234, 0x12bf,0x22e7,
00162                  0xf721,0x3179, 0x2aaa,0x1294, 0x11a8,0x238e,
00163                  0xf579,0x3236, 0x2a2d,0x12f4, 0x1091,0x2435,
00164                  0xf3d2,0x32ef, 0x29af,0x1354, 0x0f79,0x24da,
00165                  0xf22c,0x33a3, 0x2931,0x13b4, 0x0e61,0x257e,
00166                  0xf087,0x3453, 0x28b2,0x1413, 0x0d48,0x2620,
00167                  0xeee3,0x34ff, 0x2833,0x1473, 0x0c2e,0x26c1,
00168                  0xed41,0x35a5, 0x27b3,0x14d2, 0x0b14,0x2760,
00169                  0xeba1,0x3648, 0x2733,0x1531, 0x09fa,0x27fe,
00170                  0xea02,0x36e5, 0x26b3,0x1590, 0x08df,0x289a,
00171                  0xe865,0x377e, 0x2632,0x15ee, 0x07c4,0x2935,
00172                  0xe6cb,0x3812, 0x25b1,0x164c, 0x06a9,0x29ce,
00173                  0xe532,0x38a1, 0x252f,0x16ab, 0x058d,0x2a65,
00174                  0xe39c,0x392b, 0x24ae,0x1709, 0x0471,0x2afb,
00175                  0xe208,0x39b0, 0x242b,0x1766, 0x0355,0x2b8f,
00176                  0xe077,0x3a30, 0x23a9,0x17c4, 0x0239,0x2c21,
00177                  0xdee9,0x3aab, 0x2326,0x1821, 0x011c,0x2cb2,
00178                  0xdd5d,0x3b21, 0x22a3,0x187e, 0x0000,0x2d41,
00179                  0xdbd5,0x3b92, 0x221f,0x18db, 0xfee4,0x2dcf,
00180                  0xda4f,0x3bfd, 0x219c,0x1937, 0xfdc7,0x2e5a,
00181                  0xd8cd,0x3c64, 0x2117,0x1993, 0xfcab,0x2ee4,
00182                  0xd74e,0x3cc5, 0x2093,0x19ef, 0xfb8f,0x2f6c,
00183                  0xd5d3,0x3d21, 0x200e,0x1a4b, 0xfa73,0x2ff2,
00184                  0xd45c,0x3d78, 0x1f89,0x1aa7, 0xf957,0x3076,
00185                  0xd2e8,0x3dc9, 0x1f04,0x1b02, 0xf83c,0x30f9,
00186                  0xd178,0x3e15, 0x1e7e,0x1b5d, 0xf721,0x3179,
00187                  0xd00c,0x3e5c, 0x1df8,0x1bb8, 0xf606,0x31f8,
00188                  0xcea5,0x3e9d, 0x1d72,0x1c12, 0xf4ec,0x3274,
00189                  0xcd41,0x3ed8, 0x1ceb,0x1c6c, 0xf3d2,0x32ef,
00190                  0xcbe2,0x3f0f, 0x1c64,0x1cc6, 0xf2b8,0x3368,
00191                  0xca88,0x3f40, 0x1bdd,0x1d20, 0xf19f,0x33df,
00192                  0xc932,0x3f6b, 0x1b56,0x1d79, 0xf087,0x3453,
00193                  0xc7e1,0x3f91, 0x1ace,0x1dd3, 0xef6f,0x34c6,
00194                  0xc695,0x3fb1, 0x1a46,0x1e2b, 0xee58,0x3537,
00195                  0xc54e,0x3fcc, 0x19be,0x1e84, 0xed41,0x35a5,
00196                  0xc40c,0x3fe1, 0x1935,0x1edc, 0xec2b,0x3612,
00197                  0xc2cf,0x3ff1, 0x18ad,0x1f34, 0xeb16,0x367d,
00198                  0xc197,0x3ffb, 0x1824,0x1f8c, 0xea02,0x36e5,
00199                  0xc065,0x4000, 0x179b,0x1fe3, 0xe8ef,0x374b,
00200                  0xbf38,0x3fff, 0x1711,0x203a, 0xe7dc,0x37b0,
00201                  0xbe11,0x3ff8, 0x1688,0x2091, 0xe6cb,0x3812,
00202                  0xbcf0,0x3fec, 0x15fe,0x20e7, 0xe5ba,0x3871,
00203                  0xbbd4,0x3fdb, 0x1574,0x213d, 0xe4aa,0x38cf,
00204                  0xbabf,0x3fc4, 0x14ea,0x2193, 0xe39c,0x392b,
00205                  0xb9af,0x3fa7, 0x145f,0x21e8, 0xe28e,0x3984,
00206                  0xb8a6,0x3f85, 0x13d5,0x223d, 0xe182,0x39db,
00207                  0xb7a2,0x3f5d, 0x134a,0x2292, 0xe077,0x3a30,
00208                  0xb6a5,0x3f30, 0x12bf,0x22e7, 0xdf6d,0x3a82,
00209                  0xb5af,0x3efd, 0x1234,0x233b, 0xde64,0x3ad3,
00210                  0xb4be,0x3ec5, 0x11a8,0x238e, 0xdd5d,0x3b21,
00211                  0xb3d5,0x3e88, 0x111d,0x23e2, 0xdc57,0x3b6d,
00212                  0xb2f2,0x3e45, 0x1091,0x2435, 0xdb52,0x3bb6,
00213                  0xb215,0x3dfc, 0x1005,0x2488, 0xda4f,0x3bfd,
00214                  0xb140,0x3daf, 0x0f79,0x24da, 0xd94d,0x3c42,
00215                  0xb071,0x3d5b, 0x0eed,0x252c, 0xd84d,0x3c85,
00216                  0xafa9,0x3d03, 0x0e61,0x257e, 0xd74e,0x3cc5,
00217                  0xaee8,0x3ca5, 0x0dd4,0x25cf, 0xd651,0x3d03,
00218                  0xae2e,0x3c42, 0x0d48,0x2620, 0xd556,0x3d3f,
00219                  0xad7b,0x3bda, 0x0cbb,0x2671, 0xd45c,0x3d78,
00220                  0xacd0,0x3b6d, 0x0c2e,0x26c1, 0xd363,0x3daf,
00221                  0xac2b,0x3afa, 0x0ba1,0x2711, 0xd26d,0x3de3,
00222                  0xab8e,0x3a82, 0x0b14,0x2760, 0xd178,0x3e15,
00223                  0xaaf8,0x3a06, 0x0a87,0x27af, 0xd085,0x3e45,
00224                  0xaa6a,0x3984, 0x09fa,0x27fe, 0xcf94,0x3e72,
00225                  0xa9e3,0x38fd, 0x096d,0x284c, 0xcea5,0x3e9d,
00226                  0xa963,0x3871, 0x08df,0x289a, 0xcdb7,0x3ec5,
00227                  0xa8eb,0x37e1, 0x0852,0x28e7, 0xcccc,0x3eeb,
00228                  0xa87b,0x374b, 0x07c4,0x2935, 0xcbe2,0x3f0f,
00229                  0xa812,0x36b1, 0x0736,0x2981, 0xcafb,0x3f30,
00230                  0xa7b1,0x3612, 0x06a9,0x29ce, 0xca15,0x3f4f,
00231                  0xa757,0x356e, 0x061b,0x2a1a, 0xc932,0x3f6b,
00232                  0xa705,0x34c6, 0x058d,0x2a65, 0xc851,0x3f85,
00233                  0xa6bb,0x3419, 0x04ff,0x2ab0, 0xc772,0x3f9c,
00234                  0xa678,0x3368, 0x0471,0x2afb, 0xc695,0x3fb1,
00235                  0xa63e,0x32b2, 0x03e3,0x2b45, 0xc5ba,0x3fc4,
00236                  0xa60b,0x31f8, 0x0355,0x2b8f, 0xc4e2,0x3fd4,
00237                  0xa5e0,0x3139, 0x02c7,0x2bd8, 0xc40c,0x3fe1,
00238                  0xa5bc,0x3076, 0x0239,0x2c21, 0xc338,0x3fec,
00239                  0xa5a1,0x2faf, 0x01aa,0x2c6a, 0xc266,0x3ff5,
00240                  0xa58d,0x2ee4, 0x011c,0x2cb2, 0xc197,0x3ffb,
00241                  0xa581,0x2e15, 0x008e,0x2cfa, 0xc0ca,0x3fff,
00242                  0xa57e,0x2d41, 0x0000,0x2d41, 0xc000,0x4000,
00243                  0xa581,0x2c6a, 0xff72,0x2d88, 0xbf38,0x3fff,
00244                  0xa58d,0x2b8f, 0xfee4,0x2dcf, 0xbe73,0x3ffb,
00245                  0xa5a1,0x2ab0, 0xfe56,0x2e15, 0xbdb0,0x3ff5,
00246                  0xa5bc,0x29ce, 0xfdc7,0x2e5a, 0xbcf0,0x3fec,
00247                  0xa5e0,0x28e7, 0xfd39,0x2e9f, 0xbc32,0x3fe1,
00248                  0xa60b,0x27fe, 0xfcab,0x2ee4, 0xbb77,0x3fd4,
00249                  0xa63e,0x2711, 0xfc1d,0x2f28, 0xbabf,0x3fc4,
00250                  0xa678,0x2620, 0xfb8f,0x2f6c, 0xba09,0x3fb1,
00251                  0xa6bb,0x252c, 0xfb01,0x2faf, 0xb956,0x3f9c,
00252                  0xa705,0x2435, 0xfa73,0x2ff2, 0xb8a6,0x3f85,
00253                  0xa757,0x233b, 0xf9e5,0x3034, 0xb7f8,0x3f6b,
00254                  0xa7b1,0x223d, 0xf957,0x3076, 0xb74d,0x3f4f,
00255                  0xa812,0x213d, 0xf8ca,0x30b8, 0xb6a5,0x3f30,
00256                  0xa87b,0x203a, 0xf83c,0x30f9, 0xb600,0x3f0f,
00257                  0xa8eb,0x1f34, 0xf7ae,0x3139, 0xb55e,0x3eeb,
00258                  0xa963,0x1e2b, 0xf721,0x3179, 0xb4be,0x3ec5,
00259                  0xa9e3,0x1d20, 0xf693,0x31b9, 0xb422,0x3e9d,
00260                  0xaa6a,0x1c12, 0xf606,0x31f8, 0xb388,0x3e72,
00261                  0xaaf8,0x1b02, 0xf579,0x3236, 0xb2f2,0x3e45,
00262                  0xab8e,0x19ef, 0xf4ec,0x3274, 0xb25e,0x3e15,
00263                  0xac2b,0x18db, 0xf45f,0x32b2, 0xb1cd,0x3de3,
00264                  0xacd0,0x17c4, 0xf3d2,0x32ef, 0xb140,0x3daf,
00265                  0xad7b,0x16ab, 0xf345,0x332c, 0xb0b5,0x3d78,
00266                  0xae2e,0x1590, 0xf2b8,0x3368, 0xb02d,0x3d3f,
00267                  0xaee8,0x1473, 0xf22c,0x33a3, 0xafa9,0x3d03,
00268                  0xafa9,0x1354, 0xf19f,0x33df, 0xaf28,0x3cc5,
00269                  0xb071,0x1234, 0xf113,0x3419, 0xaea9,0x3c85,
00270                  0xb140,0x1112, 0xf087,0x3453, 0xae2e,0x3c42,
00271                  0xb215,0x0fee, 0xeffb,0x348d, 0xadb6,0x3bfd,
00272                  0xb2f2,0x0eca, 0xef6f,0x34c6, 0xad41,0x3bb6,
00273                  0xb3d5,0x0da4, 0xeee3,0x34ff, 0xacd0,0x3b6d,
00274                  0xb4be,0x0c7c, 0xee58,0x3537, 0xac61,0x3b21,
00275                  0xb5af,0x0b54, 0xedcc,0x356e, 0xabf6,0x3ad3,
00276                  0xb6a5,0x0a2b, 0xed41,0x35a5, 0xab8e,0x3a82,
00277                  0xb7a2,0x0901, 0xecb6,0x35dc, 0xab29,0x3a30,
00278                  0xb8a6,0x07d6, 0xec2b,0x3612, 0xaac8,0x39db,
00279                  0xb9af,0x06aa, 0xeba1,0x3648, 0xaa6a,0x3984,
00280                  0xbabf,0x057e, 0xeb16,0x367d, 0xaa0f,0x392b,
00281                  0xbbd4,0x0451, 0xea8c,0x36b1, 0xa9b7,0x38cf,
00282                  0xbcf0,0x0324, 0xea02,0x36e5, 0xa963,0x3871,
00283                  0xbe11,0x01f7, 0xe978,0x3718, 0xa912,0x3812,
00284                  0xbf38,0x00c9, 0xe8ef,0x374b, 0xa8c5,0x37b0,
00285                  0xc065,0xff9b, 0xe865,0x377e, 0xa87b,0x374b,
00286                  0xc197,0xfe6e, 0xe7dc,0x37b0, 0xa834,0x36e5,
00287                  0xc2cf,0xfd40, 0xe753,0x37e1, 0xa7f1,0x367d,
00288                  0xc40c,0xfc13, 0xe6cb,0x3812, 0xa7b1,0x3612,
00289                  0xc54e,0xfae6, 0xe642,0x3842, 0xa774,0x35a5,
00290                  0xc695,0xf9ba, 0xe5ba,0x3871, 0xa73b,0x3537,
00291                  0xc7e1,0xf88e, 0xe532,0x38a1, 0xa705,0x34c6,
00292                  0xc932,0xf763, 0xe4aa,0x38cf, 0xa6d3,0x3453,
00293                  0xca88,0xf639, 0xe423,0x38fd, 0xa6a4,0x33df,
00294                  0xcbe2,0xf50f, 0xe39c,0x392b, 0xa678,0x3368,
00295                  0xcd41,0xf3e6, 0xe315,0x3958, 0xa650,0x32ef,
00296                  0xcea5,0xf2bf, 0xe28e,0x3984, 0xa62c,0x3274,
00297                  0xd00c,0xf198, 0xe208,0x39b0, 0xa60b,0x31f8,
00298                  0xd178,0xf073, 0xe182,0x39db, 0xa5ed,0x3179,
00299                  0xd2e8,0xef4f, 0xe0fc,0x3a06, 0xa5d3,0x30f9,
00300                  0xd45c,0xee2d, 0xe077,0x3a30, 0xa5bc,0x3076,
00301                  0xd5d3,0xed0c, 0xdff2,0x3a59, 0xa5a9,0x2ff2,
00302                  0xd74e,0xebed, 0xdf6d,0x3a82, 0xa599,0x2f6c,
00303                  0xd8cd,0xeacf, 0xdee9,0x3aab, 0xa58d,0x2ee4,
00304                  0xda4f,0xe9b4, 0xde64,0x3ad3, 0xa585,0x2e5a,
00305                  0xdbd5,0xe89a, 0xdde1,0x3afa, 0xa57f,0x2dcf,
00306                  0xdd5d,0xe782, 0xdd5d,0x3b21, 0xa57e,0x2d41,
00307                  0xdee9,0xe66d, 0xdcda,0x3b47, 0xa57f,0x2cb2,
00308                  0xe077,0xe559, 0xdc57,0x3b6d, 0xa585,0x2c21,
00309                  0xe208,0xe448, 0xdbd5,0x3b92, 0xa58d,0x2b8f,
00310                  0xe39c,0xe33a, 0xdb52,0x3bb6, 0xa599,0x2afb,
00311                  0xe532,0xe22d, 0xdad1,0x3bda, 0xa5a9,0x2a65,
00312                  0xe6cb,0xe124, 0xda4f,0x3bfd, 0xa5bc,0x29ce,
00313                  0xe865,0xe01d, 0xd9ce,0x3c20, 0xa5d3,0x2935,
00314                  0xea02,0xdf19, 0xd94d,0x3c42, 0xa5ed,0x289a,
00315                  0xeba1,0xde18, 0xd8cd,0x3c64, 0xa60b,0x27fe,
00316                  0xed41,0xdd19, 0xd84d,0x3c85, 0xa62c,0x2760,
00317                  0xeee3,0xdc1e, 0xd7cd,0x3ca5, 0xa650,0x26c1,
00318                  0xf087,0xdb26, 0xd74e,0x3cc5, 0xa678,0x2620,
00319                  0xf22c,0xda31, 0xd6cf,0x3ce4, 0xa6a4,0x257e,
00320                  0xf3d2,0xd93f, 0xd651,0x3d03, 0xa6d3,0x24da,
00321                  0xf579,0xd851, 0xd5d3,0x3d21, 0xa705,0x2435,
00322                  0xf721,0xd766, 0xd556,0x3d3f, 0xa73b,0x238e,
00323                  0xf8ca,0xd67f, 0xd4d8,0x3d5b, 0xa774,0x22e7,
00324                  0xfa73,0xd59b, 0xd45c,0x3d78, 0xa7b1,0x223d,
00325                  0xfc1d,0xd4bb, 0xd3df,0x3d93, 0xa7f1,0x2193,
00326                  0xfdc7,0xd3df, 0xd363,0x3daf, 0xa834,0x20e7,
00327                  0xff72,0xd306, 0xd2e8,0x3dc9, 0xa87b,0x203a,
00328                  0x011c,0xd231, 0xd26d,0x3de3, 0xa8c5,0x1f8c,
00329                  0x02c7,0xd161, 0xd1f2,0x3dfc, 0xa912,0x1edc,
00330                  0x0471,0xd094, 0xd178,0x3e15, 0xa963,0x1e2b,
00331                  0x061b,0xcfcc, 0xd0fe,0x3e2d, 0xa9b7,0x1d79,
00332                  0x07c4,0xcf07, 0xd085,0x3e45, 0xaa0f,0x1cc6,
00333                  0x096d,0xce47, 0xd00c,0x3e5c, 0xaa6a,0x1c12,
00334                  0x0b14,0xcd8c, 0xcf94,0x3e72, 0xaac8,0x1b5d,
00335                  0x0cbb,0xccd4, 0xcf1c,0x3e88, 0xab29,0x1aa7,
00336                  0x0e61,0xcc21, 0xcea5,0x3e9d, 0xab8e,0x19ef,
00337                  0x1005,0xcb73, 0xce2e,0x3eb1, 0xabf6,0x1937,
00338                  0x11a8,0xcac9, 0xcdb7,0x3ec5, 0xac61,0x187e,
00339                  0x134a,0xca24, 0xcd41,0x3ed8, 0xacd0,0x17c4,
00340                  0x14ea,0xc983, 0xcccc,0x3eeb, 0xad41,0x1709,
00341                  0x1688,0xc8e8, 0xcc57,0x3efd, 0xadb6,0x164c,
00342                  0x1824,0xc850, 0xcbe2,0x3f0f, 0xae2e,0x1590,
00343                  0x19be,0xc7be, 0xcb6e,0x3f20, 0xaea9,0x14d2,
00344                  0x1b56,0xc731, 0xcafb,0x3f30, 0xaf28,0x1413,
00345                  0x1ceb,0xc6a8, 0xca88,0x3f40, 0xafa9,0x1354,
00346                  0x1e7e,0xc625, 0xca15,0x3f4f, 0xb02d,0x1294,
00347                  0x200e,0xc5a7, 0xc9a3,0x3f5d, 0xb0b5,0x11d3,
00348                  0x219c,0xc52d, 0xc932,0x3f6b, 0xb140,0x1112,
00349                  0x2326,0xc4b9, 0xc8c1,0x3f78, 0xb1cd,0x1050,
00350                  0x24ae,0xc44a, 0xc851,0x3f85, 0xb25e,0x0f8d,
00351                  0x2632,0xc3e0, 0xc7e1,0x3f91, 0xb2f2,0x0eca,
00352                  0x27b3,0xc37b, 0xc772,0x3f9c, 0xb388,0x0e06,
00353                  0x2931,0xc31c, 0xc703,0x3fa7, 0xb422,0x0d41,
00354                  0x2aaa,0xc2c1, 0xc695,0x3fb1, 0xb4be,0x0c7c,
00355                  0x2c21,0xc26d, 0xc627,0x3fbb, 0xb55e,0x0bb7,
00356                  0x2d93,0xc21d, 0xc5ba,0x3fc4, 0xb600,0x0af1,
00357                  0x2f02,0xc1d3, 0xc54e,0x3fcc, 0xb6a5,0x0a2b,
00358                  0x306c,0xc18e, 0xc4e2,0x3fd4, 0xb74d,0x0964,
00359                  0x31d2,0xc14f, 0xc476,0x3fdb, 0xb7f8,0x089d,
00360                  0x3334,0xc115, 0xc40c,0x3fe1, 0xb8a6,0x07d6,
00361                  0x3492,0xc0e0, 0xc3a1,0x3fe7, 0xb956,0x070e,
00362                  0x35eb,0xc0b1, 0xc338,0x3fec, 0xba09,0x0646,
00363                  0x373f,0xc088, 0xc2cf,0x3ff1, 0xbabf,0x057e,
00364                  0x388e,0xc064, 0xc266,0x3ff5, 0xbb77,0x04b5,
00365                  0x39d9,0xc045, 0xc1fe,0x3ff8, 0xbc32,0x03ed,
00366                  0x3b1e,0xc02c, 0xc197,0x3ffb, 0xbcf0,0x0324,
00367                  0x3c5f,0xc019, 0xc130,0x3ffd, 0xbdb0,0x025b,
00368                  0x3d9a,0xc00b, 0xc0ca,0x3fff, 0xbe73,0x0192,
00369                  0x3ed0,0xc003, 0xc065,0x4000, 0xbf38,0x00c9
00370 };
00371
00372 /* Exported macro ------------------------------------------------------------*/
00373 /* Exported functions ------------------------------------------------------- */
00374
00375 #endif /* __TABLE_FFT_H */
00376
00377 /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/