/*!
 * @file        readme.txt
 *
 * @brief       This file is routine instruction
 *
 * @version     V1.0.5
 *
 * @date        2026-10-09
 *
 * @attention
 *
 *  Copyright (C) 2020-2022 Geehy Semiconductor
 *
 *  You may not use this file except in compliance with the
 *  GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE).
 *
 *  The program is only for reference, which is distributed in the hope
 *  that it will be useful and instructional for customers to develop
 *  their software. Unless required by applicable law or agreed to in
 *  writing, the program is distributed on an "AS IS" BASIS, WITHOUT
 *  ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions
 *  and limitations under the License.
 */


&par Example Description

This example connects synchronous USART1 to the SPI1 full-duplex slave on one board.
Both peripherals send 30 bytes with values 0 to 29, using 8-bit data, LSB first,
low clock polarity and the first clock edge. USART1 is configured for 115200 baud.
The CPU polls transmit flags. USART1 and SPI1 receive interrupts store incoming bytes. The CPU waits for both receive counters.
LED2 turns on when the transfer returns PASSED and both receive buffers match.
LED3 blinks after the transfer attempt returns. LED3 alone does not indicate success.

Connect the pins as follows:
USART1 TX  (PA9)  to SPI1 MOSI (PA7)
USART1 RX  (PA10) to SPI1 MISO (PA6)
USART1 CLK (PA8)  to SPI1 SCK  (PA5)
SPI1 uses software NSS; no external NSS connection is used.

&par Directory contents

  - SPI/SPI_INTERRUPT/Source/main.c              Main program and transfer handlers
  - SPI/SPI_INTERRUPT/Source/apm32f10x_int.c     Core exception handlers
  - SPI/SPI_INTERRUPT/Source/system_apm32f10x.c  System clock configuration
  - SPI/SPI_INTERRUPT/Include/main.h            Application declarations

&par IDE environment

  - MDK-ARM V5.36
  - EWARM V8.50.5.26295
  - Eclipse project configuration is also provided.

&par Hardware and Software environment

  - APM32F103 MINI board with the three jumper connections listed above.
  - Chip and board definitions: APM32F103xE, APM32F103_MINI.