Cortex-M7 vs ARM926EJ-S: which is more useful? - Page 1
Forum section: electronics / general

author: technix
author_rank: Super Contributor
timestamp: April 14, 2017, 10:17:42 am
content: I came across this chip:STM32F756ZG. Cortex-M7 @216MHz. Somewhere above $10 each. I have a few AT91SAM9260, ARM926EJ-S @180MHz. Also consider the V3s which sports Cortex-A7 MP1 @1.2GHzWhich is more useful for a general computing project? Playing around stuff, experimenting. The SAM9260 and V3s runs full Linux though. All chips here runs 64MB DRAM (PC133 for F756 and SAM9260, DDR2-533 for V3s)

author: tszaboo
author_rank: Super Contributor
timestamp: April 14, 2017, 10:32:53 am
content: What do you mean more useful? One is a microcontroller, the other is a microprocessor.For "general computing", an intel Xeon is more economical and useful.

author: technix
author_rank: Super Contributor
timestamp: April 14, 2017, 10:49:34 am
content: Quote from: NANDBlog on April 14, 2017, 10:32:53 amI mean to play around and experiment.I have three Xeons in two computers. Those things drain power like crazy.

author: daveshah
author_rank: Unknown
timestamp: April 14, 2017, 01:53:49 pm
content: I'd say in almost all areas the V3s wins - not only is it faster but a newer core means more precompiled Linux stuff will run. Simpler layout is a plus too.

author: Kjelt
author_rank: Super Contributor
timestamp: April 14, 2017, 06:01:42 pm
content: Quote from: technix on April 14, 2017, 10:49:34 amJust shut them down after playing aroundSerious though what do you really want to do?if you want to play with Linux, IP cameras whatever Ip connected, go for a raspberry pi and beaglebone single board solution,you have IP connectivity out of the box and all the peripherals and HAL have been done for you. M7 out of the box that will take you a year of your life

author: ataradov
author_rank: Super Contributor
timestamp: April 14, 2017, 06:25:13 pm
content: Quote from: technix on April 14, 2017, 10:49:34 amM7 then.

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: April 14, 2017, 06:57:46 pm
content: M7. The fact that it doesn't run Linux is a good thing. You can do your own thing rather than duplicate what's already been done.

author: westfw
author_rank: Super Contributor
timestamp: April 15, 2017, 09:19:51 am
content: CM7 is about the newest and most powerful of the Cortex microcontroller processors.ARM9 predates ANY of the Cortex processors, but it has the MMU and external RAM interface to support Linux. A lot of people in several different threads have recommended that you ignore such old chips; why aren't you listening? If you want linux-capable, investigate the more modern Cortex-A series (which includes Raspberry Pi, C.H.I.P., Beagle, and most of the other cheap single-board linux computers.)(Atmel has a Cortex-A, but their cheapest development board for it is over $100...)

author: Kjelt
author_rank: Super Contributor
timestamp: April 15, 2017, 02:53:32 pm
content: And if you really would like to write your own HAL code or mess with the peripherals a datasheet of the processor is a must, hence the raspberri pis don,t have proper datasheets for their processor but for instance beaglebone does.

author: technix
author_rank: Super Contributor
timestamp: April 15, 2017, 04:59:50 pm
content: Quote from: Kjelt on April 15, 2017, 02:53:32 pmI am talking about the three chips, all with available datasheets:* Allwinner V3s (Cortex-A7 MP1 @1.2GHz)*AtmelMicrochip AT91SAM9260-QU (ARM926EJ-S @180MHz)* STMicroelectronics STM32F756ZGT6 (Cortex-M7 @216MHz)

author: hans
author_rank: Super Contributor
timestamp: April 15, 2017, 06:10:54 pm
content: If you want to play with embedded Linux, get a SBC board with a Cortex A-type processor.If you want to play around with Linux and general computing, get an old laptop or whatever and install a distro on it.If you don't want a Linux board, but still need to do fast calculations, get a Cortex m7.Anything else is like comparing apples and oranges.Or perhaps apples and pears now that fast MCU's look much like older MPU's.But still the ARM926 is starting to show it's age, and the IPC aren't that great. The Cortex A9 and even m7 have new pipelines and show quite some improvements in synthetic embedded CPU benchmarks like Coremarks or Dhrystone.The original RasPi also had a single core ARM926 chip, but now practically all boards now use the Cortex A series. They are really quite significantly faster.If you ever plan on DIY'ing a Linux SBC perhaps the ARM926 chips are more accessible (sometimes available even in QFP, slower RAM, etc.), but these chips also support much less RAM which may restrict the amount of linux firmware you can run on them.More over, m7 is probably going to see another big boost this year when newer chips will come out with higher clocks. Atmel has the SAM V series with m7 at 300MHz right now, and I think ST is going to release the STM32H7 series that will run 400MHz.

author: Kjelt
author_rank: Super Contributor
timestamp: April 16, 2017, 09:11:37 am
content: QuoteWow that would almost double its performance.Pricing would become critical also icw the target application/product.I wonder what kind of products would need these kind of uCs and what they are using at the moment?

author: ataradov
author_rank: Super Contributor
timestamp: April 16, 2017, 05:23:04 pm
content: Quote from: Kjelt on April 16, 2017, 09:11:37 amNot really. There is more to performance than just the frequency. Flash memory is still slow and needs wait states, so unless you can run your entire program from RAM, or ITCM, you will see some slow-downs. System bus is also typically slower than the core, so if you use peripherals a lot, your performance will go down.Quote from: Kjelt on April 16, 2017, 09:11:37 amThose things are pretty cheap already. Atmel/Microchip 300 MHz SAM E70 is ~$10 in single piece quantities.Quote from: Kjelt on April 16, 2017, 09:11:37 amAll of them seem to be automotive-qualified, and have peripherals useful in that environment, so that looks like one of the industries that likes them. Cortex-M7 has great DSP capabilities, so it can probably replace some of the low-end segment of the DSP market, where devices are expensive due to lack of competition.

author: Kjelt
author_rank: Super Contributor
timestamp: April 16, 2017, 10:31:06 pm
content: Quote from: ataradov on April 16, 2017, 05:23:04 pmYes very good point.QuoteHmmm M4's are >four times cheaper. $10 is pretty expensive if you ask me.

author: ataradov
author_rank: Super Contributor
timestamp: April 16, 2017, 10:35:09 pm
content: Quote from: Kjelt on April 16, 2017, 10:31:06 pmIt is ridiculously cheap for what you get. HS USB and performance to actually keep up with it alone is worth it. Lots of RAM and flash do not hurt either. The price goes down fast with quantity, and for single units, the price does not really matter, as long as it is in the reasonable range.Which M4 you can get for $3, anyway?

author: enz
author_rank: Regular Contributor
timestamp: April 16, 2017, 10:48:25 pm
content: Quote from: ataradov on April 16, 2017, 10:35:09 pmIf you just ask for an arbitrary M4, than for example STM32F302C8 at 100pcs goes for approx 2.80€.

author: ataradov
author_rank: Super Contributor
timestamp: April 16, 2017, 10:52:50 pm
content: Quote from: enz on April 16, 2017, 10:48:25 pmThat's fair. But at 100 pcs, ATSAME70N19A is $7.57. And you get A LOT more for your money. Now, if you don't need that power, then there is no reason to pay more, of course. But in absolute numbers, $7.57 is unbelievably cheap for what you get.

author: Kjelt
author_rank: Super Contributor
timestamp: April 17, 2017, 05:15:35 pm
content: St s f4xx go for $2-$3 even at Farnell which is as anyone in the business knows almost two times to expensive compared at direct sales.But say you pay $8 for the uC alone add the Ram Flash psu, pcb etc and you end up with a BOM around $20 and that is your price, it has to turn over 4 to 5 times at least to make profit and payback for the manhours and you have something in the market close to $80-$100 endprice.I still wonder what that might be, for automotive that is too expensive unless it is the entire mediahub for other applications you,re cheaper putting a raspberri in itBut at larger quantities going for $4-$5 it might become interesting.

author: ataradov
author_rank: Super Contributor
timestamp: April 17, 2017, 05:20:29 pm
content: Quote from: Kjelt on April 17, 2017, 05:15:35 pmWe need to be comparing apples to apples. E70 is also way cheaper direct.Quote from: Kjelt on April 17, 2017, 05:15:35 pmIt is a microcontroller. RAM and Flash are internal, and PSU is an LDO and a few decoupling caps. And QFP packages can easily be routed on a 2 layer board.Quote from: Kjelt on April 17, 2017, 05:15:35 pmIt obviously costs way less in large quantities.M7 can do things that M4 never will (double precision floating point, for example). If you don't need this - stick with M4. But if you do, this is basically the cheapest you will get it.

author: Kjelt
author_rank: Super Contributor
timestamp: April 17, 2017, 08:07:20 pm
content: Ok fair enough, do post a message when you encounter a product with an M7 in it, I am curious what kind of product, application and what the MSRP will be

author: Kilrah
author_rank: Unknown
timestamp: April 17, 2017, 08:12:16 pm
content: Quote from: Kjelt on April 17, 2017, 08:07:20 pmhttp://www.banggood.com/STM32F745-100lqfp-216MHz-MPU6000-SPI-F7-Flight-Controller-for-FPV-Racing-Support-Betaflight-p-1137386.html?p=@K2800431511201401MH&utm_content=multirotorguide&utm_source=multirotorguide&utm_medium=multirotorguide&utm_campaign=montis

author: Kjelt
author_rank: Super Contributor
timestamp: April 17, 2017, 08:48:19 pm
content: With a product I mean a complete consumer product, something a decent large company is selling, usually it has its own psu and cover/box.

author: Kilrah
author_rank: Unknown
timestamp: April 17, 2017, 08:57:07 pm
content: Well, this IS the standard and expected form of a product in the customer base it targets, so yes it is a complete consumer product. The customer base is larger than you'd think.Note that using an F7 pretty much brings no benefit to the application, but the marketing machine in that particular field has been good enough in the past couple of years to ensure the higher number will attract customers.The move from F1 to F3 did bring a few useful features thanks to more flexibility on the newer generation peripherals e.g. hardware inversion on UARTs, so some sellers have used the momentum to sell F4 based products (that didn't have the flexibility...) and now F7 to those who don't know better.

author: Euphyllia
author_rank: Newbie
timestamp: April 17, 2017, 09:53:37 pm
content: Quote from: ataradov on April 16, 2017, 05:23:04 pmWhat kind of prefetch are the M7 chips using and is it effective? I want to say I recall simple prefetch on a lot of the M4 devices seemed to get them close to the theoretical improvement from clockspeed increases, but I'm sure real world is different than the benchmarks.

author: ataradov
author_rank: Super Contributor
timestamp: April 17, 2017, 09:57:44 pm
content: Quote from: Euphyllia on April 17, 2017, 09:53:37 pmMost M7 implement 8-16KB of data and instruction caches. Without them - everything gets very-very slow.Different manufacturers do what they can to accelerate flash fetches, mostly by using wide data buses (128 bits), and some local flash prefetching. But that alone does not help much.If you can - run most of the code from ITCM, it is runs at the core speed with zero wait states.

author: technix
author_rank: Super Contributor
timestamp: April 17, 2017, 11:55:02 pm
content: Then how do I write the linker scripts to put code in ITCM? I can memcpy code over but the pointers needs to be fixed.

author: ataradov
author_rank: Super Contributor
timestamp: April 17, 2017, 11:57:33 pm
content: Quote from: technix on April 17, 2017, 11:55:02 pmIn a linker script you specify where your code will be located (address within ITCM). This will make linker put correct addresses for that memory, but they will obviously be wrong for the flash. But that code will never be executed from flash, so it is fine.Then, you just do memcpy(), after you set up ITCM.

author: technix
author_rank: Super Contributor
timestamp: April 18, 2017, 12:12:49 am
content: What if the thing I want to put in ITCM is the entire program? Write a stub to copy the bulk of the code over?

author: ataradov
author_rank: Super Contributor
timestamp: April 18, 2017, 12:14:13 am
content: Quote from: technix on April 18, 2017, 12:12:49 amYes. Your startup code will have to be in flash.

author: technix
author_rank: Super Contributor
timestamp: April 18, 2017, 12:31:31 am
content: Quote from: ataradov on April 18, 2017, 12:14:13 amSo I basically need to create a bootloader that copies code over to ITCM and jump into it? What else should I do inside this bootloader?

author: ataradov
author_rank: Super Contributor
timestamp: April 18, 2017, 12:34:33 am
content: It is not really a bootlaoder, it is your normal startup code (reset vector). It should what any other startup code does - initialize DATA and BSS segments, relocate vector table and stack pointer, and then jump to main.Optionally, you can initialize some other hardware, but it all can be done from main().

author: technix
author_rank: Super Contributor
timestamp: April 18, 2017, 12:44:35 am
content: My usual startup code sets up the clocks, copies data segment over to the RAM locations, zeros BSS, and calls libc _start(). Now how do I do that with ITCM involved?

author: ataradov
author_rank: Super Contributor
timestamp: April 18, 2017, 01:12:35 am
content: Quote from: technix on April 18, 2017, 12:44:35 amAdd ITCM initialization and in addition to data segment, copy the code. The same exact way as you do for data.IC vendors have application notes on this. Atmel does for sure, I just don't remember the number.