Solved
SPI NSS do not change. HAL libraries
Posted on September 22, 2016 at 12:51
Hi all;
I am trying to comunicate with an external flash memory with my STM32F429. I can see my signals in the oscilloscope . I see how my microcontroler starts the clock and write to the bus but the NSS signal do not change. It is always at LOW level. This is a problem with this flash beacuse it uses NSS signal to sincronice data. I have configure the SPI5 chanel with the following code: hspi5.Instance = SPI5; hspi5.Init.Mode = SPI_MODE_MASTER; hspi5.Init.Direction = SPI_DIRECTION_2LINES; hspi5.Init.DataSize = SPI_DATASIZE_8BIT; hspi5.Init.CLKPolarity = SPI_POLARITY_LOW; hspi5.Init.CLKPhase = SPI_PHASE_1EDGE; hspi5.Init.NSS = SPI_NSS_HARD_OUTPUT; hspi5.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_128; hspi5.Init.FirstBit = SPI_FIRSTBIT_MSB; hspi5.Init.TIMode = SPI_TIMODE_DISABLE; hspi5.Init.CRCCalculation = SPI_CRCCALCULATION_ENABLE; hspi5.Init.CRCPolynomial = 7; if (HAL_SPI_Init(&hspi5) != HAL_OK) I understand that if I set NSS as a Hardware Output SPI peripheal is going to manage it correctly but it ramains in LOW state. I wanto to see the change from HIG to LOW state so the flash start to read or write into the com lines. Could anybody help me?? I repeat that te SPI is working but if there is not edge in the NSS bit. #!spi-!stm32f429-!externalflash