ST-Link not configuring QSPI flsah for STM32F746
I have built a custom board using STM32F746BET6. I have MT25QL512ABB8ESF-0SIT flash connected to the STM32F746BET6 (same pins as the discovery board) . When I upload my code ST-Link does not write into the external flash. Uploading the hex file goes well for the internal flash but ST-Link stalls when writing to the external flash mentioning a programming error in address 0X90000000 or above. I checked the connectivity, probed the QSPI traffic with a scope, performed erase and read with ST-LInk all seems to be good. I checked what flash they put in the discovery board 746 because they seem to have changed them quite few times. I found they are using the MT25QL128ABA1EW9-0SIT on the discovery board I have. While initially I have used on my board the MT25QL512ABB8ESF-0SIT. So both flashes are from the same family but the one I used is double the size. I swapped flash from discovery to my board and programmed fine. The ST-link seem to be picky about the flash, but I still don’t understand why.
I will be grateful if someone can help me solve the problem.
