单片机falsh存储不上问题
代码原始的没改,
C:
#include "spi_flash.h"
uint8_t FLASH_BUF[4096];
//---------------------------------------------------------
void SPI_FLASH_Init(void)
{
SPI_InitTypeDef SPI_InitStructure;
RCC->APB2ENR |= 1<<2;
RCC->APB2ENR |= 1<<3;
RCC->APB2ENR |= 1<<12;
//NSS
GPIOA->CRH &= 0x0FFFFFFF;//PA15
GPIOA->CRH |= 0x30000000;
SPI_FLASH_CS_HIGH();
//SCK MISO MOSI
GPIOB->CRL &= 0xFF000FFF;//PB3 PB4 PB5
GPIOB->CRL |= 0x00BBB000;
//--------------------------------------------
SPI_InitStructure.SPI_Direction = SPI_Direction_2Lines_FullDuplex;
SPI_InitStructure.SPI_Mode = SPI_Mode_Master;
SPI_InitS