Author Topic: pls can u tell why we use external sdram on the microcontroller  (Read 3714 times)

0 Members and 1 Guest are viewing this topic.

Offline me.rishabh12Topic starter

  • Contributor
  • Posts: 17
  • Country: in
    • innovating future-lets create something new
pls can u tell why we use external sdram on the microcontroller
« on: February 09, 2018, 12:27:18 pm »
i seen lot of design use external sdram with microcontroller
although the microcontroller has a ample amount of ram for that particular application
pls help me in understandig
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: pls can u tell why we use external sdram on the microcontroller
« Reply #1 on: February 09, 2018, 12:41:28 pm »
Because you can never have too much RAM.
Bob
"All you said is just a bunch of opinions."
 
The following users thanked this post: NiHaoMike

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9008
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: pls can u tell why we use external sdram on the microcontroller
« Reply #2 on: February 09, 2018, 04:09:56 pm »
Because you can never have too much RAM.
The exact phrase from one of the PC service videos was "You can never be too rich or have too much RAM." The counterpoint is that an inconsiderate developer can get used to having a vast surplus and end up with something a lot of end users can't afford to use.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline maginnovision

  • Super Contributor
  • ***
  • Posts: 1963
  • Country: us
Re: pls can u tell why we use external sdram on the microcontroller
« Reply #3 on: February 09, 2018, 06:07:29 pm »
It's also possible you're under estimating RAM requirements. It also leaves room for future expansions and updates.
 

Offline 0xdeadbeef

  • Super Contributor
  • ***
  • Posts: 1572
  • Country: de
Re: pls can u tell why we use external sdram on the microcontroller
« Reply #4 on: February 09, 2018, 06:29:12 pm »
I guess the rule is as simple as that: if it's a true embedded realtime application, nobody will use external RAM deliberately. Heck, most microcontrollers don't even have an external bus interface anymore.
But if it's pseudo-embedded stuff running Linux, WinCE, Android or whatever, then you will need  lots of RAM of course.
Trying is the first step towards failure - Homer J. Simpson
 
The following users thanked this post: me.rishabh12

Offline Brutte

  • Frequent Contributor
  • **
  • Posts: 614
Re: pls can u tell why we use external sdram on the microcontroller
« Reply #5 on: February 09, 2018, 06:52:43 pm »
i seen lot of design use external sdram with microcontroller
I'd say this is rather rare for a microcontroller to have an SDRAM interface. Most likely SRAM. The dynamic memories are more for processors (like application processors, gpu-s etc).
The reason is that SRAM is expensive in terms of bang per buck when compared to SDRAM. And built-in memory is more expensive than a general purpose memory chip, in terms of bang per buck of course.
 
The following users thanked this post: me.rishabh12

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3143
  • Country: ca
Re: pls can u tell why we use external sdram on the microcontroller
« Reply #6 on: February 09, 2018, 08:08:14 pm »
You must be kidding. How's that possible to guess why a certain engineering decision has been made without even knowing anything about the device being engineered except that it uses SRAM?

It is hard to reverse engineer human behaviour even in the best possible circumstances. Someone used more RAM than he should. So what? Happens all the time with and without reason.
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: pls can u tell why we use external sdram on the microcontroller
« Reply #7 on: February 10, 2018, 12:42:09 am »
Because you can never have too much RAM.
Word.

Apropos, does anyone know of a PCB vendor that offers a mauve solder mask option?
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3481
  • Country: us
Re: pls can u tell why we use external sdram on the microcontroller
« Reply #8 on: February 10, 2018, 02:03:15 am »
The Zynq line allows up to 1 GB of SDRAM.  Which is very valuable in a DSO or LA for history buffers. A bottom end DSO has 256 MB of SDRAM.

The MCU world is vast ranging from toys to industrial processes.  And "embedded systems" encompasses everything up to and including supercomputers as the CPU.
 

Offline dgtl

  • Regular Contributor
  • *
  • Posts: 183
  • Country: ee
Re: pls can u tell why we use external sdram on the microcontroller
« Reply #9 on: February 10, 2018, 11:19:54 am »
Add dynamic memory allocation and an operating system into play and you'll increase your memory requirements rapidly.
There are microcontrollers with SRAM/SDRAM controllers and SRAM-only controllers. SRAMs are much smaller than SDRAMs at the same price point, but are simpler to control and the controllers are smaller. So if the application does not require large add-on memory, the SRAM-based solution may be cheaper than using an more expensive uc with SDRAM controller.
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: pls can u tell why we use external sdram on the microcontroller
« Reply #10 on: February 10, 2018, 12:13:07 pm »
I guess the rule is as simple as that: if it's a true embedded realtime application, nobody will use external RAM deliberately. Heck, most microcontrollers don't even have an external bus interface anymore.
But if it's pseudo-embedded stuff running Linux, WinCE, Android or whatever, then you will need  lots of RAM of course.

Not true at all.  Please stop looking at the 8bit PIC crap in DIL packages, you'll see that almost any modern decent MCU is equipped with external bus controller. Heck even some 8bit MCUs today have external mem IO.
 
The following users thanked this post: me.rishabh12

Offline 0xdeadbeef

  • Super Contributor
  • ***
  • Posts: 1572
  • Country: de
Re: pls can u tell why we use external sdram on the microcontroller
« Reply #11 on: February 10, 2018, 03:52:53 pm »
Not true at all.  Please stop looking at the 8bit PIC crap in DIL packages, you'll see that almost any modern decent MCU is equipped with external bus controller. Heck even some 8bit MCUs today have external mem IO.
Nope. We're only using modern multicore 32bit controllers at work. Most of them don't even have an external bus interface so if you need RAM as ROM emulation ("calibration") during development, you need to buy expensive "engineering devices" with embedded emulation RAM (I.e. Infineon Aurix, Renesas RH850 -> FCCx). Only the very high end NXP eSys MPC5XXX controller still have package variants with external bus interface. But again, there it's only used to simulate ROM during development.
Trying is the first step towards failure - Homer J. Simpson
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: pls can u tell why we use external sdram on the microcontroller
« Reply #12 on: February 10, 2018, 04:03:07 pm »
Then stop talking about some very specific, obscure presumably APPLICATION PROCESSORS targeted at a specific single purpose, as the thread is about MCUs. See the difference?

I don't want to be mean, but it is just not true at all, considering general MCUs.  Some MPC5xxx or Renesas is not in any way a general purpose MCU. That is just some automotive specific whatever strange part, and I strongly doubt that the OP was asking for these. ;)
« Last Edit: February 10, 2018, 04:06:29 pm by Yansi »
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3143
  • Country: ca
Re: pls can u tell why we use external sdram on the microcontroller
« Reply #13 on: February 10, 2018, 04:26:31 pm »
Please stop looking at the 8bit PIC crap in DIL packages, you'll see that almost any modern decent MCU is equipped with external bus controller.

Many old (and obsolete now) PIC18s, although not in DIL packages, had external memory bus, but nobody was using it, so modern PIC18s don't have it any more.

There are lots of bad programmers out there who write very bloated software, and consequently  think they need much more RAM. But as soon as they get more RAM, they add more bloat and thus need even more RAM. It will never be enough.
 

Offline 0xdeadbeef

  • Super Contributor
  • ***
  • Posts: 1572
  • Country: de
Re: pls can u tell why we use external sdram on the microcontroller
« Reply #14 on: February 10, 2018, 05:10:54 pm »
Then stop talking about some very specific, obscure presumably APPLICATION PROCESSORS targeted at a specific single purpose, as the thread is about MCUs. See the difference?
The thread is about microcontrollers and by all means, NXP, Infineon and Reneasas produce microcontrollers. Heaps of them.
Don't become emotional if your 8bit drivel is objected just because your view of the usage of microcontrollers is limited.

I don't want to be mean, but it is just not true at all, considering general MCUs.  Some MPC5xxx or Renesas is not in any way a general purpose MCU. That is just some automotive specific whatever strange part, and I strongly doubt that the OP was asking for these. ;)
There are several words for either not understanding of admitting when you're wrong, but "mean" is not one of them.
Trying is the first step towards failure - Homer J. Simpson
 

Offline maginnovision

  • Super Contributor
  • ***
  • Posts: 1963
  • Country: us
Re: pls can u tell why we use external sdram on the microcontroller
« Reply #15 on: February 11, 2018, 08:39:58 pm »
Many atmel controllers have external memory interfaces, even the 8 bit.
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 3713
  • Country: us
Re: pls can u tell why we use external sdram on the microcontroller
« Reply #16 on: February 11, 2018, 09:22:16 pm »
Then stop talking about some very specific, obscure presumably APPLICATION PROCESSORS targeted at a specific single purpose, as the thread is about MCUs. See the difference?

I don't want to be mean, but it is just not true at all, considering general MCUs.  Some MPC5xxx or Renesas is not in any way a general purpose MCU. That is just some automotive specific whatever strange part, and I strongly doubt that the OP was asking for these. ;)

Lots of microcontrollers have external memory interfaces.  Maybe not on every model or package variant, but it is quite common, and not just on "automotive" stuff.  Automotive is also a *huge* industry for microcontrollers and many microcontrollers are designed to support automotive applications even if they are also used elsewhere, so "automotive specific strange part" makes no sense.

Anyway, there are tons of reasons to have external DRAM in a microcontroller, even if you think the application wouldn't require it. 

* One reason might be to store log data.  Think of a monitoring device that normally sends data immediately to some remote host but needs to be able to function for a few days without access.
*  You might want to support safe(er) firmware upgrades.  Most microcontrollers have far more flash than SRAM.  If you have an external memory you can load new firmware into the DRAM, checksum it, and then start programming the flash.  That reduces your risk of corruption if the upload connection is broken or has data errors. In this case, the DRAM would possibly not even get used under normal operation.
* More and more microcontrollers are being asked to host web interfaces.  Whether that is a good idea or not, that can take a lot of RAM to render pages.  So it makes sense to keep your real time stuff in SRAM and put the web stuff in DRAM.
* A CNC motor control system might need DRAM to store a large program while using SRAM to hold only the currently executing tool path.
* In a low volume application it might make sense to simply add the DRAM for future growth, since it is easier than retrofitting systems.

Also, I want to steadfastly and strenuously object to NorthGuy's characterization of "bad programmers."  A bad programmer is one that wastes time trying to write the smallest and least featureful program to fit into a tiny microcontroller when realtime requirements don't require it and the volume cost savings don't justify it. Also, frequently microcontroller developers do really crappy stuff like impose arbitrary limits or fail to test input values properly in order to fit in memory since SRAM is still precious.  If your application can support DRAM and that lets you write more functional less brittle code, that is a big win.  Frankly, many micocontroller applications, especially IoT nonsense, should not even use microcontrollers, but small application processors.  There are now affordable ARM application processors with a reasonable compliment of IO peripherals, and if you are going to run TCP/IP you should really do it with a real OS.  Those wiznet chips or tiny IP stacks are cool, but ultimately quite limited.  Obviously if you need super accurate real-time or a huge number of IO pins, you may still need a microcontroller, but many applications don't require that.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3143
  • Country: ca
Re: pls can u tell why we use external sdram on the microcontroller
« Reply #17 on: February 12, 2018, 12:49:09 am »
Also, I want to steadfastly and strenuously object to NorthGuy's characterization of "bad programmers."  A bad programmer is one that wastes time trying to write the smallest and least featureful program to fit into a tiny microcontroller when realtime requirements don't require it and the volume cost savings don't justify it.

Oh, dear. That wasn't a characterization. There are many varieties of bad programmers. Very many.

IMHO, a good programmer is the one who's capable of designing simple and reliable solutions. This has nothing to do with fitting anything into anywhere. If you find a good approach to your task - you will get it all:

- less code, which means your code is more understandable and maintainable, and also requires less development time.
- simpler code which means more robust and reliable behaviour, less testing time, less bugs
- less resources, which means lower costs

Note that good design doesn't use less resources because you try to fit your solution into anything specific. Good design uses less resources because it doesn't need more.

If you start with a bad design, then it doesn't really matter whether you overbloat it beyond comprehension, or whether you try to squeeze it into something really tiny. The bad design will remain a bad design. Facing such situation, it takes a lot of courage to admit that "my design is bad, we need to start over", especially if you're in the middle of the project and someone has already paid you good money for it. Why not to say that "the design is good, but we have problems because there's not enough resources". But once you say this, you simply must go the distance to convince everyone (and primarily yourself) that what you're saying is the very truth. And people work on this really hard ...
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8637
  • Country: gb
Re: pls can u tell why we use external sdram on the microcontroller
« Reply #18 on: February 12, 2018, 01:09:17 am »
I guess the rule is as simple as that: if it's a true embedded realtime application, nobody will use external RAM deliberately. Heck, most microcontrollers don't even have an external bus interface anymore.
But if it's pseudo-embedded stuff running Linux, WinCE, Android or whatever, then you will need  lots of RAM of course.

Not true at all.  Please stop looking at the 8bit PIC crap in DIL packages, you'll see that almost any modern decent MCU is equipped with external bus controller. Heck even some 8bit MCUs today have external mem IO.
Most 32 bit MCUs don't have an external bus controller. MCUs with expandable memory are something of a niche market, unless they are using a QSPI interface. There are often one or two family members which have an external bus, but its not a characteristic of most devices in most families. QSPI to boot the internal RAM from external flash has been getting pretty common in the last couple of years, and I would expect that trend to continue. The vast majority of MCUs which don't contain a high pin count peripheral, like an LCD controller, are fairly low pin count devices. A full external bus would really eat into the available I/O.

Any MCU targeting ULP applications is unlikely to have any kind of external memory bus, beyond a QSPI that's used only during boot. The power consumption of driving such a bus makes a mockery of any ULP goals if it is used continuously.
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: pls can u tell why we use external sdram on the microcontroller
« Reply #19 on: February 12, 2018, 09:25:49 am »
Also, I want to steadfastly and strenuously object to NorthGuy's characterization of "bad programmers."

People who make that sort of snark are invariably people who have no clue about software development. It's annoying, but I wouldn't waste time arguing.  It's like trying to argue with Flat Earthers.

Bob
"All you said is just a bunch of opinions."
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3238
  • Country: gb
Re: pls can u tell why we use external sdram on the microcontroller
« Reply #20 on: February 12, 2018, 04:36:05 pm »
Also, I want to steadfastly and strenuously object to NorthGuy's characterization of "bad programmers."  A bad programmer is one that wastes time trying to write the smallest and least featureful program to fit into a tiny microcontroller when realtime requirements don't require it and the volume cost savings don't justify it.

If you object to a generalisation by countering it with your own generalisation, what does that make you?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf