aboutsummaryrefslogtreecommitdiff
path: root/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/USART/Smartcard
diff options
context:
space:
mode:
Diffstat (limited to 'tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/USART/Smartcard')
-rw-r--r--tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/USART/Smartcard/readme.txt116
-rw-r--r--tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/USART/Smartcard/stm32f10x_conf.h77
-rw-r--r--tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/USART/Smartcard/stm32f10x_it.c245
3 files changed, 0 insertions, 438 deletions
diff --git a/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/USART/Smartcard/readme.txt b/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/USART/Smartcard/readme.txt
deleted file mode 100644
index e5551b5..0000000
--- a/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/USART/Smartcard/readme.txt
+++ /dev/null
@@ -1,116 +0,0 @@
-/**
- @page USART_Smartcard USART Smartcard example
-
- @verbatim
- ******************** (C) COPYRIGHT 2011 STMicroelectronics *******************
- * @file USART/Smartcard/readme.txt
- * @author MCD Application Team
- * @version V3.5.0
- * @date 08-April-2011
- * @brief Description of the USART Smartcard example.
- ******************************************************************************
- * 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.
- ******************************************************************************
- @endverbatim
-
-@par Example Description
-
-This example provides a description of how to use the USART in Smartcard mode.
-The example gives only the possibility to read the ATR and decode it into
-predefined buffer.
-First, the code is waiting for an card insertion. If a card is detected through
-the EXTI Line interrupt (connected to the Smartcard detect pin), a reset signal
-is applied to the card through its reset pin.
-As response to this reset, the card transmit the ATR which will be stored in
-predefined buffer. Once the ATR is received, it is decoded and stored in a specific
-structure (SC_A2R) and the card protocol type is stored in a variable.
-ATRDecodeStatus variable must be equal to 1 (PASSED) when the sequence succeed.
-
-The used Smartcard should be ISO7816-3 T=0 compatible.
-
-SC_USART configured as follow:
- - Word Length = 9 Bits
- - 0.5 Stop Bit
- - Even parity
- - BaudRate = 12096 baud
- - Hardware flow control disabled (RTS and CTS signals)
- - Tx and Rx enabled
- - USART Clock enabled
- - USART CPOL: Clock is active low
- - USART CPHA: Data is captured on the second edge
- - USART LastBit: The clock pulse of the last data bit is not output to
- the SCLK pin
-
-
-@par Directory contents
-
- - USART/Smartcard/platform_config.h Evaluation board specific configuration file
- - USART/Smartcard/stm32f10x_conf.h Library Configuration file
- - USART/Smartcard/stm32f10x_it.h Interrupt handlers header file
- - USART/Smartcard/stm32f10x_it.c Interrupt handlers
- - USART/Smartcard/main.c Main program
- - USART/Smartcard/system_stm32f10x.c STM32F10x system source file
-
-@par Hardware and Software environment
-
- - This example runs on STM32F10x Connectivity line, High-Density, High-Density
- Value line, Medium-Density, XL-Density, Medium-Density Value line, Low-Density
- and Low-Density Value line Devices.
-
- - This example has been tested with STMicroelectronics STM3210C-EVAL (Connectivity line),
- STM3210E-EVAL (High-Density and XL-Density) and STM3210B-EVAL (Medium-Density)
- evaluation boards and can be easily tailored to any other supported device and
- development board.
- To select the STMicroelectronics evaluation board used to run the example,
- uncomment the corresponding line in USART/Smartcard/platform_config.h file
-
- - STM3210C-EVAL Set-up
- - Plug a Smartcard (ISO7816-3 T=0 compatible) into the dedicated Smartcard
- connector CN5.
- @note In this case USART3 Tx and CK pins are full remapped by software.
- Make sure that Jumper 11 (JP11), Jumper 12 (JP12) and Jumper 13 (JP13)
- are in position 1<-->2.
-
- - STM3210E-EVAL Set-up
- - Plug a Smartcard (ISO7816-3 T=0 compatible) into the dedicated Smartcard
- connector CN18.
- @note Make sure that Jumper 15 (JP15) and Jumper 16 (JP16) are fitted.
-
- - STM3210B-EVAL Set-up
- - Plug a Smartcard (ISO7816-3 T=0 compatible) into the dedicated Smartcard
- connector CN16.
-
-
-@par How to use it ?
-
-In order to make the program work, you must do the following :
- - Copy all source files from this example folder to the template folder under
- Project\STM32F10x_StdPeriph_Template
- - Open your preferred toolchain
- - Rebuild all files and load your image into target memory
- - Run the example
-
-@note
- - Low-density Value line devices are STM32F100xx microcontrollers where the
- Flash memory density ranges between 16 and 32 Kbytes.
- - Low-density devices are STM32F101xx, STM32F102xx and STM32F103xx
- microcontrollers where the Flash memory density ranges between 16 and 32 Kbytes.
- - Medium-density Value line devices are STM32F100xx microcontrollers where
- the Flash memory density ranges between 64 and 128 Kbytes.
- - Medium-density devices are STM32F101xx, STM32F102xx and STM32F103xx
- microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes.
- - High-density Value line devices are STM32F100xx microcontrollers where
- the Flash memory density ranges between 256 and 512 Kbytes.
- - High-density devices are STM32F101xx and STM32F103xx microcontrollers where
- the Flash memory density ranges between 256 and 512 Kbytes.
- - XL-density devices are STM32F101xx and STM32F103xx microcontrollers where
- the Flash memory density ranges between 512 and 1024 Kbytes.
- - Connectivity line devices are STM32F105xx and STM32F107xx microcontrollers.
-
- * <h3><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h3>
- */
diff --git a/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/USART/Smartcard/stm32f10x_conf.h b/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/USART/Smartcard/stm32f10x_conf.h
deleted file mode 100644
index 938cc84..0000000
--- a/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/USART/Smartcard/stm32f10x_conf.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- ******************************************************************************
- * @file USART/Smartcard/stm32f10x_conf.h
- * @author MCD Application Team
- * @version V3.5.0
- * @date 08-April-2011
- * @brief Library configuration file.
- ******************************************************************************
- * @attention
- *
- * 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.
- *
- * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
- ******************************************************************************
- */
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __STM32F10x_CONF_H
-#define __STM32F10x_CONF_H
-
-/* Includes ------------------------------------------------------------------*/
-/* Uncomment/Comment the line below to enable/disable peripheral header file inclusion */
-#include "stm32f10x_adc.h"
-#include "stm32f10x_bkp.h"
-#include "stm32f10x_can.h"
-#include "stm32f10x_cec.h"
-#include "stm32f10x_crc.h"
-#include "stm32f10x_dac.h"
-#include "stm32f10x_dbgmcu.h"
-#include "stm32f10x_dma.h"
-#include "stm32f10x_exti.h"
-#include "stm32f10x_flash.h"
-#include "stm32f10x_fsmc.h"
-#include "stm32f10x_gpio.h"
-#include "stm32f10x_i2c.h"
-#include "stm32f10x_iwdg.h"
-#include "stm32f10x_pwr.h"
-#include "stm32f10x_rcc.h"
-#include "stm32f10x_rtc.h"
-#include "stm32f10x_sdio.h"
-#include "stm32f10x_spi.h"
-#include "stm32f10x_tim.h"
-#include "stm32f10x_usart.h"
-#include "stm32f10x_wwdg.h"
-#include "misc.h" /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */
-
-/* Exported types ------------------------------------------------------------*/
-/* Exported constants --------------------------------------------------------*/
-/* Uncomment the line below to expanse the "assert_param" macro in the
- Standard Peripheral Library drivers code */
-/* #define USE_FULL_ASSERT 1 */
-
-/* Exported macro ------------------------------------------------------------*/
-#ifdef USE_FULL_ASSERT
-
-/**
- * @brief The assert_param macro is used for function's parameters check.
- * @param expr: If expr is false, it calls assert_failed function which reports
- * the name of the source file and the source line number of the call
- * that failed. If expr is true, it returns no value.
- * @retval None
- */
- #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
-/* Exported functions ------------------------------------------------------- */
- void assert_failed(uint8_t* file, uint32_t line);
-#else
- #define assert_param(expr) ((void)0)
-#endif /* USE_FULL_ASSERT */
-
-#endif /* __STM32F10x_CONF_H */
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
diff --git a/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/USART/Smartcard/stm32f10x_it.c b/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/USART/Smartcard/stm32f10x_it.c
deleted file mode 100644
index f69365d..0000000
--- a/tmp/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/USART/Smartcard/stm32f10x_it.c
+++ /dev/null
@@ -1,245 +0,0 @@
-/**
- ******************************************************************************
- * @file USART/Smartcard/stm32f10x_it.c
- * @author MCD Application Team
- * @version V3.5.0
- * @date 08-April-2011
- * @brief Main Interrupt Service Routines.
- * This file provides template for all exceptions handler and peripherals
- * interrupt service routine.
- ******************************************************************************
- * @attention
- *
- * 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.
- *
- * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
- ******************************************************************************
- */
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f10x_it.h"
-#include "platform_config.h"
-
-/** @addtogroup STM32F10x_StdPeriph_Examples
- * @{
- */
-
-/** @addtogroup USART_Smartcard
- * @{
- */
-
-/* Private typedef -----------------------------------------------------------*/
-/* Private define ------------------------------------------------------------*/
-/* Private macro -------------------------------------------------------------*/
-/* Private variables ---------------------------------------------------------*/
-extern __IO uint32_t CardInserted;
-
-/* Private function prototypes -----------------------------------------------*/
-/* Private functions ---------------------------------------------------------*/
-
-/******************************************************************************/
-/* Cortex-M3 Processor Exceptions Handlers */
-/******************************************************************************/
-
-/**
- * @brief This function handles NMI exception.
- * @param None
- * @retval None
- */
-void NMI_Handler(void)
-{
-}
-
-/**
- * @brief This function handles Hard Fault exception.
- * @param None
- * @retval None
- */
-void HardFault_Handler(void)
-{
- /* Go to infinite loop when Hard Fault exception occurs */
- while (1)
- {
- }
-}
-
-/**
- * @brief This function handles Memory Manage exception.
- * @param None
- * @retval None
- */
-void MemManage_Handler(void)
-{
- /* Go to infinite loop when Memory Manage exception occurs */
- while (1)
- {
- }
-}
-
-/**
- * @brief This function handles Bus Fault exception.
- * @param None
- * @retval None
- */
-void BusFault_Handler(void)
-{
- /* Go to infinite loop when Bus Fault exception occurs */
- while (1)
- {
- }
-}
-
-/**
- * @brief This function handles Usage Fault exception.
- * @param None
- * @retval None
- */
-void UsageFault_Handler(void)
-{
- /* Go to infinite loop when Usage Fault exception occurs */
- while (1)
- {
- }
-}
-
-/**
- * @brief This function handles SVCall exception.
- * @param None
- * @retval None
- */
-void SVC_Handler(void)
-{
-}
-
-/**
- * @brief This function handles Debug Monitor exception.
- * @param None
- * @retval None
- */
-void DebugMon_Handler(void)
-{
-}
-
-/**
- * @brief This function handles PendSV_Handler exception.
- * @param None
- * @retval None
- */
-void PendSV_Handler(void)
-{
-}
-
-/**
- * @brief This function handles SysTick Handler.
- * @param None
- * @retval None
- */
-void SysTick_Handler(void)
-{
-}
-
-/******************************************************************************/
-/* STM32F10x Peripherals Interrupt Handlers */
-/******************************************************************************/
-
-/**
- * @brief This function handles External lines 9 to 5 interrupt request.
- * @param None
- * @retval None
- */
-void EXTI9_5_IRQHandler(void)
-{
- /* Select Smart Card CMDVCC */
- GPIO_ResetBits(GPIO_CMDVCC, SC_CMDVCC);
-
- /* Set RSTIN LOW */
- GPIO_ResetBits(GPIO_RESET, SC_RESET);
-
- /* Set RSTIN HIGH */
- GPIO_SetBits(GPIO_RESET, SC_RESET);
-
- /* Clear SC EXTIT Line Pending Bit */
- EXTI_ClearITPendingBit(SC_EXTI);
-
- /* Smart card detected */
- CardInserted = 1;
-}
-
-/**
- * @brief This function handles SC_USART global interrupt request.
- * @param None
- * @retval None
- */
-void SC_USART_IRQHandler(void)
-{
- /* If the SC_USART detects a parity error */
- if(USART_GetITStatus(SC_USART, USART_IT_PE) != RESET)
- {
- /* Enable SC_USART RXNE Interrupt (until receiving the corrupted byte) */
- USART_ITConfig(SC_USART, USART_IT_RXNE, ENABLE);
- /* Flush the SC_USART DR register */
- USART_ReceiveData(SC_USART);
- }
-
- if(USART_GetITStatus(SC_USART, USART_IT_RXNE) != RESET)
- {
- /* Disable SC_USART RXNE Interrupt */
- USART_ITConfig(SC_USART, USART_IT_RXNE, DISABLE);
- USART_ReceiveData(SC_USART);
- }
-}
-
-/**
- * @brief This function handles External lines 15 to 10 interrupt request.
- * @param None
- * @retval None
- */
-void EXTI15_10_IRQHandler(void)
-{
- /* Select Smart Card CMDVCC */
- GPIO_ResetBits(GPIO_CMDVCC, SC_CMDVCC);
-
- /* Set RSTIN LOW */
- GPIO_ResetBits(GPIO_RESET, SC_RESET);
-
- /* Set RSTIN HIGH */
- GPIO_SetBits(GPIO_RESET, SC_RESET);
-
- /* Clear SC EXTIT Line Pending Bit */
- EXTI_ClearITPendingBit(SC_EXTI);
-
- /* Smart card detected */
- CardInserted = 1;
-}
-
-/******************************************************************************/
-/* STM32F10x Peripherals Interrupt Handlers */
-/* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */
-/* available peripheral interrupt handler's name please refer to the startup */
-/* file (startup_stm32f10x_xx.s). */
-/******************************************************************************/
-
-/**
- * @brief This function handles PPP interrupt request.
- * @param None
- * @retval None
- */
-/*void PPP_IRQHandler(void)
-{
-}*/
-
-/**
- * @}
- */
-
-
-/**
- * @}
- */
-
-/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/