求高手解答!! 实际读取数据为0XFF,即没有读到; 按照SST26VF064B规格部分, CE# low之后,发送0x9F, 然后就可以读取到manufacturer, device type, and Device ID; main.c()中读取部分: uint8_t Data1[1] = {0x9F}; uint8_t Rxdata[3]; HAL_GPIO_WritePin(GPIOG,GPIO_PIN_8,GPIO_PIN_RESET); HAL_SPI_Transmit(&hspi6,Data1,1,1000); HAL_SPI_Receive(&hspi6,Rxdata,3,1000); HAL_GPIO_WritePin(GPIOG,GPIO_PIN_8,GPIO_PIN_SET); |
STM32F407 定时器触发DMA 求助大神
【MCU实战经验】基于STM32F407的音频播放器设计
盘古UE-STM32F407工控板原理图
【STM32F429心得\疑问】+STM32F4之FSMC和FMC
STM32F429读取IO口传输的数据速率
STM32F407ZGT6 手摸芯片背部重启
STM32F4 SPI 动作时,软件片选信号被拉高,IO口程序逻辑失控
STM32F401RE NUCLEO求助,串口一直不能进中断
读取STM32F407内部温度传感器值错误
STM32F429多路内部ADC独立采集的办法
OK了,HW设计DATA IN/OUT反调了;
评分
查看全部评分
{
hspi6.Instance = SPI6;
hspi6.Init.Mode = SPI_MODE_MASTER;
hspi6.Init.Direction = SPI_DIRECTION_2LINES;
hspi6.Init.DataSize = SPI_DATASIZE_8BIT;
hspi6.Init.CLKPolarity = SPI_POLARITY_HIGH;
hspi6.Init.CLKPhase = SPI_PHASE_2EDGE;
hspi6.Init.NSS = SPI_NSS_SOFT;
hspi6.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_256;
hspi6.Init.FirstBit = SPI_FIRSTBIT_MSB;
hspi6.Init.TIMode = SPI_TIMODE_DISABLE;
hspi6.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
hspi6.Init.CRCPolynomial = 10;
if (HAL_SPI_Init(&hspi6) != HAL_OK)
{
Error_Handler();
}
}