/** @page SPI_FastCommunication Fast communication with a MicroSD memory card
@par Example description
This example provides a short description of how to make a communication (Write & Read data)
between the SPI and a MicroSD memory card like the one present on the evalboard.
First, Fill the Tx_Buffer (or Tx_MultiBlock) and write them into the MicroSD memory followed by a read of the written data. Then data read from the MicroSD memory stored in the Rx_Bufferor (or Tx_MultiBlock) are compared with the expected values of the Tx_Buffer. The result of this comparison is stored in the "TransferStatus" variable.
This example runs on STM8S-128K and STM8S-32K products
@par Directory contents
- main.c Main file containing the "main" function
- stm8s_conf.h Library Configuration file
- stm8s_it.c Interrupt routines source (not used in this example)
- stm8s_it.h Interrupt routines declaration
- stm8_interrupt_vector.c Interrupt vectors table
- mono_lcd.c Contains all basic functions to control the LCD
- mono_lcd.h Functions prototypes
- microsd.c Contains all functions to control the MSD
- microsd.h Functions prototypes
@par Hardware environment
- This example runs on STMicroelectronics STM8/128-EVAL evaluation board and need a microsd card
that can be plunged in the MicroSD connector.
@par How to use it ?
In order to make the program work, you must do the following :
- Create a project and setup all project configuration
- Compile the directory content files and required Library files :
+ stm8s_clk.c
+ stm8s_gpio.c
+ stm8s_spi.c
- Rebuild all files: Project->Rebuild all.
- Load project image: Debug->Start/Stop Debug Session
- Run program: Debug->Run (F5)
- If the program is pass, the four LEDs toggles. Otherwise only the LED1 or LED2 or LED3 toggles.
Go to main file: SPI_FastCommunication\main.c
*/
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/
SPI.zip_SPI STM8_STM8 SPI_spi_stm8_stm8 spi
版权申诉
183 浏览量
2022-09-20
19:19:34
上传
评论
收藏 29KB ZIP 举报
邓凌佳
- 粉丝: 65
- 资源: 1万+