2026-02-03 3:17 PM
Hi,
I want to fly the STM32F429I-DISC with the 8 MB SDRAM. I use CubeIDE and selected the right board. All units are set to default. I commented out everything that had to do with os.
With help of ChatGPT I hacked together an initialization of the SDRAM and set up a SDRAM Test. That seems to work partly but with weird effects. In the following code: start/end 0x00/0xff or 0x100/0x1ff works fine, but start/end 0x00/0x101 reads out 0x100 at address 0x0. Maybe it is an timing issue with precharged lines.
THX
Cheers
Detlef
#define SDRAM_BASE_ADDR ((uint32_t)0xD0000000)
void SDRAM_Test(void)
{
volatile uint16_t *p = (volatile uint16_t *)SDRAM_BASE_ADDR;
uint32_t i ;
uint32_t start = 0x100 ;
uint32_t end = 0x302 ;
for (i=start; i<end; i++) p[i] = i;
sprintf(buf,"start \r\n",i);
HAL_UART_Transmit(&huart1, (uint8_t *) buf, strlen(buf), HAL_MAX_DELAY);
while(1){
for (i=start; i<end;i++)
if (p[i] != i){
sprintf(buf,"no 0x%x 0x%x\r\n",i,p[i]);
HAL_UART_Transmit(&huart1, (uint8_t *) buf, strlen(buf), HAL_MAX_DELAY);
}
sprintf(buf,"end \r\n",i);
HAL_UART_Transmit(&huart1, (uint8_t *) buf, strlen(buf), HAL_MAX_DELAY);
}
}