[Cryptech Tech] Alpha SDRAMs
Basil Dolmatov
dol at reedcat.net
Sun May 22 13:51:40 UTC 2016
Incredible!!!
Thanks, Pavel!
dol@ с iPad
> 22 мая 2016 г., в 14:37, Pavel Shatov <meisterpaul1 at yandex.ru> написал(а):
>
> Hello!
>
> I got one of the Alpha boards from Fredrik and was busy trying to bring up the two on-board SDRAM chips. I believe, I finally have them working.
>
> There turns out to be a stupid bug in low-level HAL code. Actually, there are in fact two similar bugs, that don't cancel each other out unfortunately.
>
> In brief, our STM32 should have two independent SDRAM banks. When you start reading the fine print, you find out that they are not completely independent, i.e. they can only operate at the same frequency and share some of the timing parameters. This is not a problem itself, because we have two identical memory chips. The problem is that there are two configuration registers, the first register also controls some of the parameters for the second bank, therefore in the second register corresponding control bits are reserved. Sane person would configure the first bank, read its configuration register, mask reserved bits and write into the second bank. I believe this is what original FMC_SDRAM_Init() and FMC_SDRAM_Timing_Init() thought they were doing when they tried to configure the second bank, but those functions just messed up configuration of both banks instead.
>
> Anyways, both external memory chips seem to work now. I uploaded simple test program, that basically fills entire memory with pseudo-random pattern, reads it back and compares with what was written.
>
>
> --
> With best regards,
> Pavel Shatov
> _______________________________________________
> Tech mailing list
> Tech at cryptech.is
> https://lists.cryptech.is/listinfo/tech
More information about the Tech
mailing list