rfid working

This commit is contained in:
Mitchell Marino 2024-06-12 22:57:35 -05:00
parent 2e9120f117
commit 0b0d0f4875
24 changed files with 14363 additions and 12915 deletions

196
Core/Inc/RFID.h Normal file
View File

@ -0,0 +1,196 @@
/*
* RFID.h
*
* Created on: Jan 16, 2022
* Author: hussam
*/
#ifndef RFID_H_
#define RFID_H_
#include "stdbool.h"
#include "stdint.h"
#define MFRC522_CS_LOW MFRC522_CS_PORT->BSRRH = MFRC522_CS_PIN;
#define MFRC522_CS_HIGH MFRC522_CS_PORT->BSRRL = MFRC522_CS_PIN;
/* MFRC522 Commands */
#define PCD_IDLE 0x00 //NO action; Cancel the current command
#define PCD_AUTHENT 0x0E //Authentication Key
#define PCD_RECEIVE 0x08 //Receive Data
#define PCD_TRANSMIT 0x04 //Transmit data
#define PCD_TRANSCEIVE 0x0C //Transmit and receive data,
#define PCD_RESETPHASE 0x0F //Reset
#define PCD_CALCCRC 0x03 //CRC Calculate
/* Mifare_One card command word */
#define PICC_REQIDL 0x26 // find the antenna area does not enter hibernation
#define PICC_REQALL 0x52 // find all the cards antenna area
#define PICC_ANTICOLL 0x93 // anti-collision
#define PICC_SElECTTAG 0x93 // election card
#define PICC_AUTHENT1A 0x60 // authentication key A
#define PICC_AUTHENT1B 0x61 // authentication key B
#define PICC_READ 0x30 // Read Block
#define PICC_WRITE 0xA0 // write block
#define PICC_DECREMENT 0xC0 // debit
#define PICC_INCREMENT 0xC1 // recharge
#define PICC_RESTORE 0xC2 // transfer block data to the buffer
#define PICC_TRANSFER 0xB0 // save the data in the buffer
#define PICC_HALT 0x50 // Sleep
/* MFRC522 Registers */
//Page 0: Command and Status
#define MFRC522_REG_RESERVED00 0x00
#define MFRC522_REG_COMMAND 0x01
#define MFRC522_REG_COMM_IE_N 0x02
#define MFRC522_REG_DIV1_EN 0x03
#define MFRC522_REG_COMM_IRQ 0x04
#define MFRC522_REG_DIV_IRQ 0x05
#define MFRC522_REG_ERROR 0x06
#define MFRC522_REG_STATUS1 0x07
#define MFRC522_REG_STATUS2 0x08
#define MFRC522_REG_FIFO_DATA 0x09
#define MFRC522_REG_FIFO_LEVEL 0x0A
#define MFRC522_REG_WATER_LEVEL 0x0B
#define MFRC522_REG_CONTROL 0x0C
#define MFRC522_REG_BIT_FRAMING 0x0D
#define MFRC522_REG_COLL 0x0E
#define MFRC522_REG_RESERVED01 0x0F
//Page 1: Command
#define MFRC522_REG_RESERVED10 0x10
#define MFRC522_REG_MODE 0x11
#define MFRC522_REG_TX_MODE 0x12
#define MFRC522_REG_RX_MODE 0x13
#define MFRC522_REG_TX_CONTROL 0x14
#define MFRC522_REG_TX_AUTO 0x15
#define MFRC522_REG_TX_SELL 0x16
#define MFRC522_REG_RX_SELL 0x17
#define MFRC522_REG_RX_THRESHOLD 0x18
#define MFRC522_REG_DEMOD 0x19
#define MFRC522_REG_RESERVED11 0x1A
#define MFRC522_REG_RESERVED12 0x1B
#define MFRC522_REG_MIFARE 0x1C
#define MFRC522_REG_RESERVED13 0x1D
#define MFRC522_REG_RESERVED14 0x1E
#define MFRC522_REG_SERIALSPEED 0x1F
//Page 2: CFG
#define MFRC522_REG_RESERVED20 0x20
#define MFRC522_REG_CRC_RESULT_M 0x21
#define MFRC522_REG_CRC_RESULT_L 0x22
#define MFRC522_REG_RESERVED21 0x23
#define MFRC522_REG_MOD_WIDTH 0x24
#define MFRC522_REG_RESERVED22 0x25
#define MFRC522_REG_RF_CFG 0x26
#define MFRC522_REG_GS_N 0x27
#define MFRC522_REG_CWGS_PREG 0x28
#define MFRC522_REG__MODGS_PREG 0x29
#define MFRC522_REG_T_MODE 0x2A
#define MFRC522_REG_T_PRESCALER 0x2B
#define MFRC522_REG_T_RELOAD_H 0x2C
#define MFRC522_REG_T_RELOAD_L 0x2D
#define MFRC522_REG_T_COUNTER_VALUE_H 0x2E
#define MFRC522_REG_T_COUNTER_VALUE_L 0x2F
//Page 3:TestRegister
#define MFRC522_REG_RESERVED30 0x30
#define MFRC522_REG_TEST_SEL1 0x31
#define MFRC522_REG_TEST_SEL2 0x32
#define MFRC522_REG_TEST_PIN_EN 0x33
#define MFRC522_REG_TEST_PIN_VALUE 0x34
#define MFRC522_REG_TEST_BUS 0x35
#define MFRC522_REG_AUTO_TEST 0x36
#define MFRC522_REG_VERSION 0x37
#define MFRC522_REG_ANALOG_TEST 0x38
#define MFRC522_REG_TEST_ADC1 0x39
#define MFRC522_REG_TEST_ADC2 0x3A
#define MFRC522_REG_TEST_ADC0 0x3B
#define MFRC522_REG_RESERVED31 0x3C
#define MFRC522_REG_RESERVED32 0x3D
#define MFRC522_REG_RESERVED33 0x3E
#define MFRC522_REG_RESERVED34 0x3F
//Dummy byte
#define MFRC522_DUMMY 0x00
#define MFRC522_MAX_LEN 16
/**
* @brief initialize function
*/
void rc522_init(void);
/**
* @brief read register
*/
uint8_t rc522_regRead8(uint8_t reg);
/**
* @brief write register
*/
void rc522_regWrite8(uint8_t reg, uint8_t data8);
/**
* @brief set bit
*/
void rc522_setBit(uint8_t reg, uint8_t mask);
/**
* @brief clear bit
*/
void rc522_clearBit(uint8_t reg, uint8_t mask);
/**
* @brief reset function
*/
void rc522_reset(void);
/**
* @brief Antenna ON
*/
void rc522_antennaON(void);
/**
* @brief Check card
*/
bool rc522_checkCard(uint8_t *id);
/**
* @brief Request function
*/
bool rc522_request(uint8_t reqMode, uint8_t *tagType);
/**
* @brief to Card
*/
bool rc522_toCard(
uint8_t command,
uint8_t* sendData,
uint8_t sendLen,
uint8_t* backData,
uint16_t* backLen);
/**
* @brief Anti-Collis
*/
bool rc522_antiColl(uint8_t* serNum);
/**
* @brief Halt
*/
void rc522_halt(void);
/**
* @brief calculate CRC
*/
void rc522_calculateCRC(uint8_t* pIndata, uint8_t len, uint8_t* pOutData);
/**
* @brief compare IDs
*/
bool rc522_compareIds(uint8_t *idCurrent, uint8_t *idReference);
#endif /* RFID_H_ */

View File

@ -54,11 +54,14 @@ void Error_Handler(void);
/* USER CODE BEGIN EFP */ /* USER CODE BEGIN EFP */
extern SPI_HandleTypeDef hspi1;
/* USER CODE END EFP */ /* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/ /* Private defines -----------------------------------------------------------*/
#define INT_Pin GPIO_PIN_1 #define INT_Pin GPIO_PIN_1
#define INT_GPIO_Port GPIOA #define INT_GPIO_Port GPIOA
#define RFID_CS_Pin GPIO_PIN_4
#define RFID_CS_GPIO_Port GPIOA
#define HALL_Pin GPIO_PIN_0 #define HALL_Pin GPIO_PIN_0
#define HALL_GPIO_Port GPIOB #define HALL_GPIO_Port GPIOB
#define CLOSE_Pin GPIO_PIN_1 #define CLOSE_Pin GPIO_PIN_1

341
Core/Src/RFID.c Normal file
View File

@ -0,0 +1,341 @@
#include "RFID.h"
#include "main.h"
#include "stdbool.h"
#include "stdio.h"
/**
* @brief initialize function
*/
/**
* @brief read register
*/
bool rc522_toCard(
uint8_t command,
uint8_t* sendData,
uint8_t sendLen,
uint8_t* backData,
uint16_t* backLen);
bool rc522_request(uint8_t reqMode, uint8_t *tagType);
bool rc522_antiColl(uint8_t* serNum);
void spi_cs_rfid_write(bool state)
{
HAL_GPIO_WritePin(RFID_CS_GPIO_Port, RFID_CS_Pin, state);
}
uint8_t rc522_regRead8(uint8_t reg)
{
spi_cs_rfid_write(0);
reg = ((reg << 1) & 0x7E) | 0x80;
// spi1_transmit(&reg, 1);
// TODO: change to interrupting or something.
HAL_SPI_Transmit(&hspi1, &reg, 1, 1000);
uint8_t dataRd=0;
HAL_SPI_Receive(&hspi1, &dataRd, 1, 1000);
// spi1_receive(&dataRd, 1);
spi_cs_rfid_write(1);
return dataRd;
}
/**
* @brief write register
*/
void rc522_regWrite8(uint8_t reg, uint8_t data8)
{
spi_cs_rfid_write(0);
uint8_t txData[2] = {0x7E&(reg << 1), data8};
// spi1_transmit(txData, 2);
HAL_SPI_Transmit(&hspi1, (uint8_t*)&txData, 2, 1000);
spi_cs_rfid_write(1);
}
/**
* @brief set bit
*/
void rc522_setBit(uint8_t reg, uint8_t mask)
{
rc522_regWrite8(reg, rc522_regRead8(reg)|mask);
}
/**
* @brief clear bit
*/
void rc522_clearBit(uint8_t reg, uint8_t mask)
{
rc522_regWrite8(reg, rc522_regRead8(reg)&(~mask));
}
/**
* @brief reset function
*/
void rc522_reset(void)
{
rc522_regWrite8(0x01, 0x0F);
}
/**
* @brief Antenna ON
*/
void rc522_antennaON(void)
{
uint8_t temp;
temp = rc522_regRead8(MFRC522_REG_TX_CONTROL);
if (!(temp & 0x03)) {
rc522_setBit(MFRC522_REG_TX_CONTROL, 0x03);
}
}
/**
* @brief Check card
*/
bool rc522_checkCard(uint8_t *id)
{
bool status=false;
//Find cards, return card type
status = rc522_request(PICC_REQIDL, id);
if (status == true) {
//Card detected
//Anti-collision, return card serial number 4 bytes
status = rc522_antiColl(id);
}
rc522_halt(); //Command card into hibernation
return status;
}
/**
* @brief Request function
*/
bool rc522_request(uint8_t reqMode, uint8_t *tagType)
{
bool status=false;
uint16_t backBits;
rc522_regWrite8(MFRC522_REG_BIT_FRAMING, 0x07);
tagType[0] = reqMode;
status = rc522_toCard(PCD_TRANSCEIVE, tagType, 1, tagType, &backBits);
if ((status != true) || (backBits != 0x10)) {
status = false;
}
return status;
}
/**
* @brief to Card
*/
bool rc522_toCard(
uint8_t command,
uint8_t* sendData,
uint8_t sendLen,
uint8_t* backData,
uint16_t* backLen)
{
bool status = false;
uint8_t irqEn = 0x00;
uint8_t waitIRq = 0x00;
uint8_t lastBits;
uint8_t n;
uint16_t i;
switch (command) {
case PCD_AUTHENT: {
irqEn = 0x12;
waitIRq = 0x10;
break;
}
case PCD_TRANSCEIVE: {
irqEn = 0x77;
waitIRq = 0x30;
break;
}
default:
break;
}
rc522_regWrite8(MFRC522_REG_COMM_IE_N, irqEn | 0x80);
rc522_clearBit(MFRC522_REG_COMM_IRQ, 0x80);
rc522_setBit(MFRC522_REG_FIFO_LEVEL, 0x80);
rc522_regWrite8(MFRC522_REG_COMMAND, PCD_IDLE);
//Writing data to the FIFO
for (i = 0; i < sendLen; i++) {
rc522_regWrite8(MFRC522_REG_FIFO_DATA, sendData[i]);
}
//Execute the command
rc522_regWrite8(MFRC522_REG_COMMAND, command);
if (command == PCD_TRANSCEIVE) {
rc522_setBit(MFRC522_REG_BIT_FRAMING, 0x80); //StartSend=1,transmission of data starts
}
//Waiting to receive data to complete
i = 100; //i according to the clock frequency adjustment, the operator M1 card maximum waiting time 25ms???
do {
//CommIrqReg[7..0]
//Set1 TxIRq RxIRq IdleIRq HiAlerIRq LoAlertIRq ErrIRq TimerIRq
n = rc522_regRead8(MFRC522_REG_COMM_IRQ);
i--;
} while ((i!=0) && !(n&0x01) && !(n&waitIRq));
rc522_clearBit(MFRC522_REG_BIT_FRAMING, 0x80); //StartSend=0
if (i != 0) {
if (!(rc522_regRead8(MFRC522_REG_ERROR) & 0x1B)) {
status = true;
if (n & irqEn & 0x01) {
status = false;
}
if (command == PCD_TRANSCEIVE) {
n = rc522_regRead8(MFRC522_REG_FIFO_LEVEL);
uint8_t l = n;
lastBits = rc522_regRead8(MFRC522_REG_CONTROL) & 0x07;
if (lastBits) {
*backLen = (n - 1) * 8 + lastBits;
} else {
*backLen = n * 8;
}
if (n == 0) {
n = 1;
}
if (n > MFRC522_MAX_LEN) {
n = MFRC522_MAX_LEN;
}
//Reading the received data in FIFO
for (i = 0; i < n; i++) {
uint8_t d = rc522_regRead8(MFRC522_REG_FIFO_DATA);
if (l == 4)
printf("%02x ", d);
backData[i] = d;
}
if (l==4)
printf("\r\n");
return status;
}
} else {
printf("error\r\n");
status = false;
}
}
return status;
}
bool rc522_antiColl(uint8_t* serNum)
{
bool status;
uint8_t i;
uint8_t serNumCheck = 0;
uint16_t unLen;
//for (i = 0; i < 4; i++)
// printf("Anticoll In %d: 0x%02x\r\n", i, serNum[i]);
rc522_regWrite8(MFRC522_REG_BIT_FRAMING, 0x00); //TxLastBists = BitFramingReg[2..0]
serNum[0] = PICC_ANTICOLL;
serNum[1] = 0x20;
status = rc522_toCard(PCD_TRANSCEIVE, serNum, 2, serNum, &unLen);
//for (i = 0; i < 4; i++)
// printf("Anticoll ToCard %d: 0x%02x\r\n", i, serNum[i]);
if (status == true) {
//Check card serial number
for (i = 0; i < 4; i++) {
serNumCheck ^= serNum[i];
}
if (serNumCheck != serNum[i]) {
status = false;
}
}
return status;
}
void rc522_halt(void)
{
uint16_t unLen;
uint8_t buff[4];
buff[0] = PICC_HALT;
buff[1] = 0;
rc522_calculateCRC(buff, 2, &buff[2]);
rc522_toCard(PCD_TRANSCEIVE, buff, 4, buff, &unLen);
}
void rc522_calculateCRC(uint8_t* pIndata, uint8_t len, uint8_t* pOutData)
{
uint8_t i, n;
rc522_clearBit(MFRC522_REG_DIV_IRQ, 0x04); //CRCIrq = 0
rc522_setBit(MFRC522_REG_FIFO_LEVEL, 0x80); //Clear the FIFO pointer
//Write_MFRC522(CommandReg, PCD_IDLE);
//Writing data to the FIFO
for (i = 0; i < len; i++) {
rc522_regWrite8(MFRC522_REG_FIFO_DATA, *(pIndata+i));
}
rc522_regWrite8(MFRC522_REG_COMMAND, PCD_CALCCRC);
//Wait CRC calculation is complete
i = 0xFF;
do {
n = rc522_regRead8(MFRC522_REG_DIV_IRQ);
i--;
} while ((i!=0) && !(n&0x04)); //CRCIrq = 1
//Read CRC calculation result
pOutData[0] = rc522_regRead8(MFRC522_REG_CRC_RESULT_L);
pOutData[1] = rc522_regRead8(MFRC522_REG_CRC_RESULT_M);
}
/**
* @brief compare IDs
*/
bool rc522_compareIds(uint8_t *idCurrent, uint8_t *idReference)
{
uint8_t i;
for(i=0; i<4;i++)
{
if(idCurrent[i] != idReference[i])
{
return false;
}
}
return true;
}
void rc522_init(void)
{
/*
* STM32 ->RFID
* SPI -> SPI
* PA8 ->RST
* PB0 ->CS
* */
HAL_GPIO_WritePin(RFID_RST_GPIO_Port, RFID_RST_Pin, 0);
HAL_GPIO_WritePin(RFID_RST_GPIO_Port, RFID_RST_Pin, 1);
rc522_reset();
rc522_regWrite8(MFRC522_REG_T_MODE, 0x80);
rc522_regWrite8(MFRC522_REG_T_PRESCALER, 0xA9);
rc522_regWrite8(MFRC522_REG_T_RELOAD_L, 0xE8);
rc522_regWrite8(MFRC522_REG_T_RELOAD_H, 0x03);
rc522_regWrite8(MFRC522_REG_TX_AUTO, 0x40);
rc522_regWrite8(MFRC522_REG_MODE, 0x3D);
rc522_antennaON(); //Open the antenna
}

View File

@ -21,6 +21,7 @@
/* Private includes ----------------------------------------------------------*/ /* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */ /* USER CODE BEGIN Includes */
#include "RFID.h"
#include <stdio.h> #include <stdio.h>
/* USER CODE END Includes */ /* USER CODE END Includes */
@ -128,22 +129,27 @@ int main(void)
/* USER CODE BEGIN 2 */ /* USER CODE BEGIN 2 */
init_keypad(); init_keypad();
init_buttons(); init_buttons();
rc522_init();
printf("Hello, world!\r\n"); printf("Hello, world!\r\n");
/* USER CODE END 2 */ /* USER CODE END 2 */
/* Infinite loop */ /* Infinite loop */
/* USER CODE BEGIN WHILE */ /* USER CODE BEGIN WHILE */
uint8_t rfid_id[4] = {0};
while (1) while (1)
{ {
HAL_Delay(100); HAL_Delay(500);
scan_keypad(); // scan_keypad();
scan_buttons(); // scan_buttons();
// printBinary(keypad_state); // printBinary(keypad_state);
printf("s: %d\r\n", keypad_state); // printf("s: %d\r\n", keypad_state);
printf("r: %d\r\n", recv_cnt); // printf("r: %d\r\n", recv_cnt);
printf("d: %d %d %d %d, %d %d %d %d\r\n", data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7]); // printf("d: %d %d %d %d, %d %d %d %d\r\n", data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7]);
HAL_I2C_Slave_Receive_IT(&hi2c1, (uint8_t*)&data, 8); // HAL_I2C_Slave_Receive_IT(&hi2c1, (uint8_t*)&data, 8);
if(rc522_checkCard(rfid_id)) {
printf("0x%x 0x%x 0x%x 0x%x\r\n", rfid_id[0], rfid_id[1], rfid_id[2], rfid_id[3]);
}
/* USER CODE END WHILE */ /* USER CODE END WHILE */
@ -257,10 +263,10 @@ static void MX_SPI1_Init(void)
hspi1.Instance = SPI1; hspi1.Instance = SPI1;
hspi1.Init.Mode = SPI_MODE_MASTER; hspi1.Init.Mode = SPI_MODE_MASTER;
hspi1.Init.Direction = SPI_DIRECTION_2LINES; hspi1.Init.Direction = SPI_DIRECTION_2LINES;
hspi1.Init.DataSize = SPI_DATASIZE_4BIT; hspi1.Init.DataSize = SPI_DATASIZE_8BIT;
hspi1.Init.CLKPolarity = SPI_POLARITY_LOW; hspi1.Init.CLKPolarity = SPI_POLARITY_LOW;
hspi1.Init.CLKPhase = SPI_PHASE_1EDGE; hspi1.Init.CLKPhase = SPI_PHASE_1EDGE;
hspi1.Init.NSS = SPI_NSS_HARD_OUTPUT; hspi1.Init.NSS = SPI_NSS_SOFT;
hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2; hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB; hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
hspi1.Init.TIMode = SPI_TIMODE_DISABLE; hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
@ -344,6 +350,9 @@ static void MX_GPIO_Init(void)
__HAL_RCC_GPIOC_CLK_ENABLE(); __HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOD_CLK_ENABLE(); __HAL_RCC_GPIOD_CLK_ENABLE();
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(RFID_CS_GPIO_Port, RFID_CS_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */ /*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(RFID_RST_GPIO_Port, RFID_RST_Pin, GPIO_PIN_RESET); HAL_GPIO_WritePin(RFID_RST_GPIO_Port, RFID_RST_Pin, GPIO_PIN_RESET);
@ -364,6 +373,13 @@ static void MX_GPIO_Init(void)
GPIO_InitStruct.Alternate = GPIO_AF7_EVENTOUT; GPIO_InitStruct.Alternate = GPIO_AF7_EVENTOUT;
HAL_GPIO_Init(INT_GPIO_Port, &GPIO_InitStruct); HAL_GPIO_Init(INT_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pin : RFID_CS_Pin */
GPIO_InitStruct.Pin = RFID_CS_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(RFID_CS_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pins : HALL_Pin CLOSE_Pin */ /*Configure GPIO pins : HALL_Pin CLOSE_Pin */
GPIO_InitStruct.Pin = HALL_Pin|CLOSE_Pin; GPIO_InitStruct.Pin = HALL_Pin|CLOSE_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;

View File

@ -182,12 +182,11 @@ void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi)
__HAL_RCC_GPIOA_CLK_ENABLE(); __HAL_RCC_GPIOA_CLK_ENABLE();
/**SPI1 GPIO Configuration /**SPI1 GPIO Configuration
PA4 ------> SPI1_NSS
PA5 ------> SPI1_SCK PA5 ------> SPI1_SCK
PA6 ------> SPI1_MISO PA6 ------> SPI1_MISO
PA7 ------> SPI1_MOSI PA7 ------> SPI1_MOSI
*/ */
GPIO_InitStruct.Pin = GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7; GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
@ -218,12 +217,11 @@ void HAL_SPI_MspDeInit(SPI_HandleTypeDef* hspi)
__HAL_RCC_SPI1_CLK_DISABLE(); __HAL_RCC_SPI1_CLK_DISABLE();
/**SPI1 GPIO Configuration /**SPI1 GPIO Configuration
PA4 ------> SPI1_NSS
PA5 ------> SPI1_SCK PA5 ------> SPI1_SCK
PA6 ------> SPI1_MISO PA6 ------> SPI1_MISO
PA7 ------> SPI1_MOSI PA7 ------> SPI1_MOSI
*/ */
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7); HAL_GPIO_DeInit(GPIOA, GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7);
/* USER CODE BEGIN SPI1_MspDeInit 1 */ /* USER CODE BEGIN SPI1_MspDeInit 1 */

15
Debug/Core/Src/RFID.cyclo Normal file
View File

@ -0,0 +1,15 @@
../Core/Src/RFID.c:26:6:spi_cs_rfid_write 1
../Core/Src/RFID.c:31:9:rc522_regRead8 1
../Core/Src/RFID.c:48:6:rc522_regWrite8 1
../Core/Src/RFID.c:60:6:rc522_setBit 1
../Core/Src/RFID.c:68:6:rc522_clearBit 1
../Core/Src/RFID.c:76:6:rc522_reset 1
../Core/Src/RFID.c:84:6:rc522_antennaON 2
../Core/Src/RFID.c:97:6:rc522_checkCard 2
../Core/Src/RFID.c:115:6:rc522_request 3
../Core/Src/RFID.c:131:6:rc522_toCard 18
../Core/Src/RFID.c:232:6:rc522_antiColl 4
../Core/Src/RFID.c:263:6:rc522_halt 1
../Core/Src/RFID.c:275:6:rc522_calculateCRC 4
../Core/Src/RFID.c:304:6:rc522_compareIds 3
../Core/Src/RFID.c:317:6:rc522_init 1

69
Debug/Core/Src/RFID.d Normal file
View File

@ -0,0 +1,69 @@
Core/Src/RFID.o: ../Core/Src/RFID.c ../Core/Inc/RFID.h ../Core/Inc/main.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal.h \
../Core/Inc/stm32g0xx_hal_conf.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_rcc.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_def.h \
../Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g0xx.h \
../Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g070xx.h \
../Drivers/CMSIS/Include/core_cm0plus.h \
../Drivers/CMSIS/Include/cmsis_version.h \
../Drivers/CMSIS/Include/cmsis_compiler.h \
../Drivers/CMSIS/Include/cmsis_gcc.h \
../Drivers/CMSIS/Include/mpu_armv7.h \
../Drivers/CMSIS/Device/ST/STM32G0xx/Include/system_stm32g0xx.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_ll_rcc.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_rcc_ex.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_gpio.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_gpio_ex.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_dma.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_ll_dma.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_ll_dmamux.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_dma_ex.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_cortex.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_exti.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_flash.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_flash_ex.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_i2c.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_i2c_ex.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_pwr.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_pwr_ex.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_spi.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_spi_ex.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_uart.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_uart_ex.h
../Core/Inc/RFID.h:
../Core/Inc/main.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal.h:
../Core/Inc/stm32g0xx_hal_conf.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_rcc.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_def.h:
../Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g0xx.h:
../Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g070xx.h:
../Drivers/CMSIS/Include/core_cm0plus.h:
../Drivers/CMSIS/Include/cmsis_version.h:
../Drivers/CMSIS/Include/cmsis_compiler.h:
../Drivers/CMSIS/Include/cmsis_gcc.h:
../Drivers/CMSIS/Include/mpu_armv7.h:
../Drivers/CMSIS/Device/ST/STM32G0xx/Include/system_stm32g0xx.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_ll_rcc.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_rcc_ex.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_gpio.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_gpio_ex.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_dma.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_ll_dma.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_ll_dmamux.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_dma_ex.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_cortex.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_exti.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_flash.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_flash_ex.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_i2c.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_i2c_ex.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_pwr.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_pwr_ex.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_spi.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_spi_ex.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_uart.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_uart_ex.h:

BIN
Debug/Core/Src/RFID.o Normal file

Binary file not shown.

15
Debug/Core/Src/RFID.su Normal file
View File

@ -0,0 +1,15 @@
../Core/Src/RFID.c:26:6:spi_cs_rfid_write 16 static
../Core/Src/RFID.c:31:9:rc522_regRead8 32 static
../Core/Src/RFID.c:48:6:rc522_regWrite8 24 static
../Core/Src/RFID.c:60:6:rc522_setBit 16 static
../Core/Src/RFID.c:68:6:rc522_clearBit 16 static
../Core/Src/RFID.c:76:6:rc522_reset 8 static
../Core/Src/RFID.c:84:6:rc522_antennaON 24 static
../Core/Src/RFID.c:97:6:rc522_checkCard 32 static
../Core/Src/RFID.c:115:6:rc522_request 48 static
../Core/Src/RFID.c:131:6:rc522_toCard 48 static
../Core/Src/RFID.c:232:6:rc522_antiColl 40 static
../Core/Src/RFID.c:263:6:rc522_halt 24 static
../Core/Src/RFID.c:275:6:rc522_calculateCRC 40 static
../Core/Src/RFID.c:304:6:rc522_compareIds 24 static
../Core/Src/RFID.c:317:6:rc522_init 8 static

View File

@ -1,15 +1,15 @@
../Core/Src/main.c:81:6:printBinary 2 ../Core/Src/main.c:82:6:printBinary 2
../Core/Src/main.c:100:5:main 1 ../Core/Src/main.c:101:5:main 2
../Core/Src/main.c:159:6:SystemClock_Config 3 ../Core/Src/main.c:165:6:SystemClock_Config 3
../Core/Src/main.c:198:13:MX_I2C1_Init 4 ../Core/Src/main.c:204:13:MX_I2C1_Init 4
../Core/Src/main.c:246:13:MX_SPI1_Init 2 ../Core/Src/main.c:252:13:MX_SPI1_Init 2
../Core/Src/main.c:286:13:MX_USART2_UART_Init 5 ../Core/Src/main.c:292:13:MX_USART2_UART_Init 5
../Core/Src/main.c:334:13:MX_GPIO_Init 1 ../Core/Src/main.c:340:13:MX_GPIO_Init 1
../Core/Src/main.c:436:1:__io_putchar 1 ../Core/Src/main.c:452:1:__io_putchar 1
../Core/Src/main.c:446:6:HAL_I2C_SlaveRxCpltCallback 1 ../Core/Src/main.c:462:6:HAL_I2C_SlaveRxCpltCallback 1
../Core/Src/main.c:451:6:init_keypad 1 ../Core/Src/main.c:467:6:init_keypad 1
../Core/Src/main.c:459:6:init_buttons 1 ../Core/Src/main.c:475:6:init_buttons 1
../Core/Src/main.c:466:6:scan_keypad 16 ../Core/Src/main.c:482:6:scan_keypad 16
../Core/Src/main.c:500:6:scan_buttons 12 ../Core/Src/main.c:516:6:scan_buttons 12
../Core/Src/main.c:527:6:send_iterupt 1 ../Core/Src/main.c:543:6:send_iterupt 1
../Core/Src/main.c:537:6:Error_Handler 1 ../Core/Src/main.c:553:6:Error_Handler 1

View File

@ -31,7 +31,8 @@ Core/Src/main.o: ../Core/Src/main.c ../Core/Inc/main.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_spi.h \ ../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_spi.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_spi_ex.h \ ../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_spi_ex.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_uart.h \ ../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_uart.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_uart_ex.h ../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_uart_ex.h \
../Core/Inc/RFID.h
../Core/Inc/main.h: ../Core/Inc/main.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal.h: ../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal.h:
../Core/Inc/stm32g0xx_hal_conf.h: ../Core/Inc/stm32g0xx_hal_conf.h:
@ -66,3 +67,4 @@ Core/Src/main.o: ../Core/Src/main.c ../Core/Inc/main.h \
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_spi_ex.h: ../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_spi_ex.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_uart.h: ../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_uart.h:
../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_uart_ex.h: ../Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_uart_ex.h:
../Core/Inc/RFID.h:

Binary file not shown.

View File

@ -1,15 +1,15 @@
../Core/Src/main.c:81:6:printBinary 24 static ../Core/Src/main.c:82:6:printBinary 24 static
../Core/Src/main.c:100:5:main 48 static ../Core/Src/main.c:101:5:main 32 static
../Core/Src/main.c:159:6:SystemClock_Config 88 static ../Core/Src/main.c:165:6:SystemClock_Config 88 static
../Core/Src/main.c:198:13:MX_I2C1_Init 8 static ../Core/Src/main.c:204:13:MX_I2C1_Init 8 static
../Core/Src/main.c:246:13:MX_SPI1_Init 8 static ../Core/Src/main.c:252:13:MX_SPI1_Init 8 static
../Core/Src/main.c:286:13:MX_USART2_UART_Init 8 static ../Core/Src/main.c:292:13:MX_USART2_UART_Init 8 static
../Core/Src/main.c:334:13:MX_GPIO_Init 56 static ../Core/Src/main.c:340:13:MX_GPIO_Init 56 static
../Core/Src/main.c:436:1:__io_putchar 16 static ../Core/Src/main.c:452:1:__io_putchar 16 static
../Core/Src/main.c:446:6:HAL_I2C_SlaveRxCpltCallback 16 static ../Core/Src/main.c:462:6:HAL_I2C_SlaveRxCpltCallback 16 static
../Core/Src/main.c:451:6:init_keypad 8 static ../Core/Src/main.c:467:6:init_keypad 8 static
../Core/Src/main.c:459:6:init_buttons 8 static ../Core/Src/main.c:475:6:init_buttons 8 static
../Core/Src/main.c:466:6:scan_keypad 8 static ../Core/Src/main.c:482:6:scan_keypad 8 static
../Core/Src/main.c:500:6:scan_buttons 8 static ../Core/Src/main.c:516:6:scan_buttons 8 static
../Core/Src/main.c:527:6:send_iterupt 8 static ../Core/Src/main.c:543:6:send_iterupt 8 static
../Core/Src/main.c:537:6:Error_Handler 8 static,ignoring_inline_asm ../Core/Src/main.c:553:6:Error_Handler 8 static,ignoring_inline_asm

View File

@ -2,6 +2,6 @@
../Core/Src/stm32g0xx_hal_msp.c:90:6:HAL_I2C_MspInit 3 ../Core/Src/stm32g0xx_hal_msp.c:90:6:HAL_I2C_MspInit 3
../Core/Src/stm32g0xx_hal_msp.c:139:6:HAL_I2C_MspDeInit 2 ../Core/Src/stm32g0xx_hal_msp.c:139:6:HAL_I2C_MspDeInit 2
../Core/Src/stm32g0xx_hal_msp.c:172:6:HAL_SPI_MspInit 2 ../Core/Src/stm32g0xx_hal_msp.c:172:6:HAL_SPI_MspInit 2
../Core/Src/stm32g0xx_hal_msp.c:210:6:HAL_SPI_MspDeInit 2 ../Core/Src/stm32g0xx_hal_msp.c:209:6:HAL_SPI_MspDeInit 2
../Core/Src/stm32g0xx_hal_msp.c:241:6:HAL_UART_MspInit 3 ../Core/Src/stm32g0xx_hal_msp.c:239:6:HAL_UART_MspInit 3
../Core/Src/stm32g0xx_hal_msp.c:288:6:HAL_UART_MspDeInit 2 ../Core/Src/stm32g0xx_hal_msp.c:286:6:HAL_UART_MspDeInit 2

Binary file not shown.

View File

@ -2,6 +2,6 @@
../Core/Src/stm32g0xx_hal_msp.c:90:6:HAL_I2C_MspInit 80 static ../Core/Src/stm32g0xx_hal_msp.c:90:6:HAL_I2C_MspInit 80 static
../Core/Src/stm32g0xx_hal_msp.c:139:6:HAL_I2C_MspDeInit 16 static ../Core/Src/stm32g0xx_hal_msp.c:139:6:HAL_I2C_MspDeInit 16 static
../Core/Src/stm32g0xx_hal_msp.c:172:6:HAL_SPI_MspInit 56 static ../Core/Src/stm32g0xx_hal_msp.c:172:6:HAL_SPI_MspInit 56 static
../Core/Src/stm32g0xx_hal_msp.c:210:6:HAL_SPI_MspDeInit 16 static ../Core/Src/stm32g0xx_hal_msp.c:209:6:HAL_SPI_MspDeInit 16 static
../Core/Src/stm32g0xx_hal_msp.c:241:6:HAL_UART_MspInit 80 static ../Core/Src/stm32g0xx_hal_msp.c:239:6:HAL_UART_MspInit 80 static
../Core/Src/stm32g0xx_hal_msp.c:288:6:HAL_UART_MspDeInit 16 static ../Core/Src/stm32g0xx_hal_msp.c:286:6:HAL_UART_MspDeInit 16 static

Binary file not shown.

View File

@ -5,6 +5,7 @@
# Add inputs and outputs from these tool invocations to the build variables # Add inputs and outputs from these tool invocations to the build variables
C_SRCS += \ C_SRCS += \
../Core/Src/RFID.c \
../Core/Src/main.c \ ../Core/Src/main.c \
../Core/Src/stm32g0xx_hal_msp.c \ ../Core/Src/stm32g0xx_hal_msp.c \
../Core/Src/stm32g0xx_it.c \ ../Core/Src/stm32g0xx_it.c \
@ -13,6 +14,7 @@ C_SRCS += \
../Core/Src/system_stm32g0xx.c ../Core/Src/system_stm32g0xx.c
C_DEPS += \ C_DEPS += \
./Core/Src/RFID.d \
./Core/Src/main.d \ ./Core/Src/main.d \
./Core/Src/stm32g0xx_hal_msp.d \ ./Core/Src/stm32g0xx_hal_msp.d \
./Core/Src/stm32g0xx_it.d \ ./Core/Src/stm32g0xx_it.d \
@ -21,6 +23,7 @@ C_DEPS += \
./Core/Src/system_stm32g0xx.d ./Core/Src/system_stm32g0xx.d
OBJS += \ OBJS += \
./Core/Src/RFID.o \
./Core/Src/main.o \ ./Core/Src/main.o \
./Core/Src/stm32g0xx_hal_msp.o \ ./Core/Src/stm32g0xx_hal_msp.o \
./Core/Src/stm32g0xx_it.o \ ./Core/Src/stm32g0xx_it.o \
@ -36,7 +39,7 @@ Core/Src/%.o Core/Src/%.su Core/Src/%.cyclo: ../Core/Src/%.c Core/Src/subdir.mk
clean: clean-Core-2f-Src clean: clean-Core-2f-Src
clean-Core-2f-Src: clean-Core-2f-Src:
-$(RM) ./Core/Src/main.cyclo ./Core/Src/main.d ./Core/Src/main.o ./Core/Src/main.su ./Core/Src/stm32g0xx_hal_msp.cyclo ./Core/Src/stm32g0xx_hal_msp.d ./Core/Src/stm32g0xx_hal_msp.o ./Core/Src/stm32g0xx_hal_msp.su ./Core/Src/stm32g0xx_it.cyclo ./Core/Src/stm32g0xx_it.d ./Core/Src/stm32g0xx_it.o ./Core/Src/stm32g0xx_it.su ./Core/Src/syscalls.cyclo ./Core/Src/syscalls.d ./Core/Src/syscalls.o ./Core/Src/syscalls.su ./Core/Src/sysmem.cyclo ./Core/Src/sysmem.d ./Core/Src/sysmem.o ./Core/Src/sysmem.su ./Core/Src/system_stm32g0xx.cyclo ./Core/Src/system_stm32g0xx.d ./Core/Src/system_stm32g0xx.o ./Core/Src/system_stm32g0xx.su -$(RM) ./Core/Src/RFID.cyclo ./Core/Src/RFID.d ./Core/Src/RFID.o ./Core/Src/RFID.su ./Core/Src/main.cyclo ./Core/Src/main.d ./Core/Src/main.o ./Core/Src/main.su ./Core/Src/stm32g0xx_hal_msp.cyclo ./Core/Src/stm32g0xx_hal_msp.d ./Core/Src/stm32g0xx_hal_msp.o ./Core/Src/stm32g0xx_hal_msp.su ./Core/Src/stm32g0xx_it.cyclo ./Core/Src/stm32g0xx_it.d ./Core/Src/stm32g0xx_it.o ./Core/Src/stm32g0xx_it.su ./Core/Src/syscalls.cyclo ./Core/Src/syscalls.d ./Core/Src/syscalls.o ./Core/Src/syscalls.su ./Core/Src/sysmem.cyclo ./Core/Src/sysmem.d ./Core/Src/sysmem.o ./Core/Src/sysmem.su ./Core/Src/system_stm32g0xx.cyclo ./Core/Src/system_stm32g0xx.d ./Core/Src/system_stm32g0xx.o ./Core/Src/system_stm32g0xx.su
.PHONY: clean-Core-2f-Src .PHONY: clean-Core-2f-Src

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,4 @@
"./Core/Src/RFID.o"
"./Core/Src/main.o" "./Core/Src/main.o"
"./Core/Src/stm32g0xx_hal_msp.o" "./Core/Src/stm32g0xx_hal_msp.o"
"./Core/Src/stm32g0xx_it.o" "./Core/Src/stm32g0xx_it.o"

View File

@ -78,5 +78,6 @@
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/> <listEntry value="4"/>
</listAttribute> </listAttribute>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;/&gt;"/>
<stringAttribute key="process_factory_id" value="com.st.stm32cube.ide.mcu.debug.launch.HardwareDebugProcessFactory"/> <stringAttribute key="process_factory_id" value="com.st.stm32cube.ide.mcu.debug.launch.HardwareDebugProcessFactory"/>
</launchConfiguration> </launchConfiguration>

View File

@ -104,9 +104,10 @@ PA2.Signal=USART2_TX
PA3.Locked=true PA3.Locked=true
PA3.Mode=Asynchronous PA3.Mode=Asynchronous
PA3.Signal=USART2_RX PA3.Signal=USART2_RX
PA4.GPIOParameters=GPIO_Label
PA4.GPIO_Label=RFID_CS
PA4.Locked=true PA4.Locked=true
PA4.Mode=NSS_Signal_Hard_Output PA4.Signal=GPIO_Output
PA4.Signal=SPI1_NSS
PA5.Locked=true PA5.Locked=true
PA5.Mode=Full_Duplex_Master PA5.Mode=Full_Duplex_Master
PA5.Signal=SPI1_SCK PA5.Signal=SPI1_SCK
@ -292,10 +293,10 @@ RCC.USART2Freq_Value=8000000
RCC.VCOInputFreq_Value=8000000 RCC.VCOInputFreq_Value=8000000
RCC.VCOOutputFreq_Value=128000000 RCC.VCOOutputFreq_Value=128000000
SPI1.CalculateBaudRate=4.0 MBits/s SPI1.CalculateBaudRate=4.0 MBits/s
SPI1.DataSize=SPI_DATASIZE_8BIT
SPI1.Direction=SPI_DIRECTION_2LINES SPI1.Direction=SPI_DIRECTION_2LINES
SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate,VirtualNSS SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate,DataSize
SPI1.Mode=SPI_MODE_MASTER SPI1.Mode=SPI_MODE_MASTER
SPI1.VirtualNSS=VM_NSSHARD
SPI1.VirtualType=VM_MASTER SPI1.VirtualType=VM_MASTER
USART2.IPParameters=VirtualMode-Asynchronous USART2.IPParameters=VirtualMode-Asynchronous
USART2.VirtualMode-Asynchronous=VM_ASYNC USART2.VirtualMode-Asynchronous=VM_ASYNC