I have connected the Flash memory to a STM32G071 Nucleo board.
For example I try to read the manufacturer and device Id, but the chip don´t send an answer. I tried 3 chips but all with the same result.
!Hold and !WP are connected to VCC.
!CS is controlled by the controller.
Clock frequency is 0,5MHz.
Any suggestion why i don´t get an answer from the chip?
In this type of situation, I would first try to confirm that your host/MCU and associated code / driver for SPI is really functioning in terms of writing and reading a known tested SPI device. After this…
In this type of situation, I would first try to confirm that your host/MCU and associated code / driver for SPI is really functioning in terms of writing and reading a known tested SPI device. After this is confirmed, make sure that the SPI frequency (start with a lower frequency) is set within the limits, set SPI Mode (try Mode = 0 to start with). Study carefully, how this SPI transaction works =>See attached timing diagram and refer datasheet for more details.
Basically, the clock from your host MCU (you are sending commands from)should continue until the SPI Flash has completed sending back the ID to MCU.Also, just for testing on the scope, try to send 90h(8 bits) + 24 bits of zeros + 16 bits for ID (CLK count required = 48)in a loop.So, you need a total of 48 clock cycles.For every loop, toggle the CS. In a nut shell the following bit sequence should be used =>The SPI Read Mfr ID instruction is initiated by driving the CS pin low and shifting the instruction code 90h ( confirm this command code for your device from datasheet ) followed by a 24-bit address (A23-A0) of 000000h. If the 24-bit address is initially set to 000001h, the Device ID will be read first. Note that there will be nothing (high impedance) on the SO line until the transmission of the instruction code 90h and 24-bit address (A23-A0) of 000000h are finished. That is 8+24 = 32 bits of silence. After that, the ID will appear on the SO line.
Best regards,Renesas Electronics Online Support
Thanks for the answer. Problem is solved. There was a problem with the wire for SI