SDRAM Hardware & Firmware Tutorial (STM32) - Phil's Lab #80

preview_player
Показать описание
Schematic design, PCB layout and routing, as well as firmware set-up and test for STM32 FMC (flexible memory controller) and SDRAM memory ICs.

[SUPPORT]

[GIT]

[TIMESTAMPS]
00:00 Introduction

00:15 Altium Designer Free Trial
00:37 PCBWay

01:08 Example SDRAM IC
02:06 Schematic
08:29 PCB Layout & Routing

11:04 Firmware Set-Up
16:59 Firmware Test

23:39 Outro
Рекомендации по теме
Комментарии
Автор

Instead of reading and writing data using pointers or memcpy, what you can do is modify the linkerscript to create a memory segment at the memory region mapped to SDRAM address range and then use the section attribute on your variables:

DjordjeNedic
Автор

Love your channel, can't find a better source for STM32 dev than you!

nicestmanintheworld
Автор

Your memory test is doing "byte by byte" and uint8_t. But your memory interface is 16bit wide.

You could very easily achieve double the speed by using 16b words!

mgeo
Автор

Awesome video, glad you showed the actual implementation details. Implementing support for DRAM has always been mysterious to me. Glad to see ST's implementation with the FMC is mostly straightforward. I think the H7 also supports interfacing via OctoSPI/Hyperbus for Flash devices, so would be cool to explore that as well.

yellowcrescent
Автор

Thank you, I'm willing to learn more about embedded systems, and you are one of those channels where I say thank you for sharing your knowledge. At the moment, when I have the money and time, I will be doing your course about Mixed-Signal Hardware Design.

RandomValueToBe
Автор

saving up for your course Phil thank you for the amazing videos

xpressivemusic
Автор

Thank you for your videos! When I need to measure the exact execution time of a command, I submit a logical unit for output pin at the start of the command and convert it to a logical zero at the end. Of course the output pin must be configured to the maximum speed I measure the time itself with an oscilloscope or a logic analyzer. It turns out very high accuracy. Sorry for my English, it's not my native language

jordanpales
Автор

There are checks you can implement like checkers, climbing bit, alternating bits, etc IIRC JEDEC has document that describes them. That's what is typically used in BIST tests (I mean ATE silicon testing)
Also one thing that needs checking is whether the refresh rate is properly programmed by waiting much longer than the refresh rate and reading again. Sometimes it's just outside the value and once in a blue moon a bit will flip. Hard to find except by running those pattern tests with enough time between write and reads.

unperrier
Автор

Another well-explaned tutorial - thanks for sharing your knowledge!

Sovvyy
Автор

Thıs was very affirming that things might work when I try them.whew! Thank you!

sandrainthesky
Автор

Thank you so much this helped a lot!!!! You saved my life

gaurangvadher
Автор

great your channel is amazing keep sharing knowledge . may god give you long life

Xerox
Автор

I think its kind of sad that Altium now "invades" every hw design YT channel. Not that altium is bad, I think it's a very desireable piece of software but it's pricing is definitely not made for hobbists and makers which is the major audience of these kind of channels. I liked the videos where you used KiCad.
Anyway... Thank you so much for your videos. I'll get my order next week and a good portion of the boards arriving will be based on the knowledge I got from your videos!

piranha
Автор

Great video! When the new course will be available?

alexevivi
Автор

As always excellent video :) To bad it was not available few months ago :) It took me so much time to collect all necessary information for my STM32 gaming console where I also use SDRAM :) Anyway, the idea to put SDRAM chip underneath microcontroler is excellent and I will definitely use it for next iteration of my project. Thank you Phil for your work!

marek_ryn
Автор

At 6:22 you mentioned that pin swapping for the FMC data line is possible to make the routing easier, could you please state how? Because the datasheet does not provide alternate function for those pins

On another note, thank you so much for your valuable videos, they've taught me much and they're always insightful.
Cheers!

wissamtedros
Автор

Creative video, thanks for sharing :)

RixtronixLAB
Автор

Super video. Next please a video how to debug the FMC if it did not work... :D

arcoshpl
Автор

Great demystifying of the SDRAM ! Question > Can the sdram memory be integrated in the linker script so that it replaces the internal memory ? That would allow straight up initializing variables in it at compile time and using memory allocation commands (malloc), instead of just using pointers to it, which are prone to code design errors.

raultanasie
Автор

You should have a look at the Expressif S3 with built-in RAM

gtcollection