Cortex M4F Automotive MCU recommendation - Page 1
Forum section: electronics / general

author: shraken
author_rank: Newbie
timestamp: November 21, 2016, 08:57:02 pm
content: My company is deciding on an automotive MCU for a project in the future. I've been asked to evaluate some different options and thought I would solicit the community for their recommendations.The MCU will use the ADC to sample many inputs (n = ~78) using internal ADC multiplexer. Additionally, GPIO toggling is required after each ADC sample. The target sample rate is ~500 - 1kHz. Ideally this procedure could be implemented using DMA, so there's another plus. A fair amount of vision recognition must be performed, some of which might require floating point arithmetic.The chip must have a CAN controller and ample other busses for UART, SPI, and I2C is big plus.Footprint could be leaded or not. 64 or 80 pin but BGA parts not desired.Cost will likely be paramount ($<5 in volume) in future but flexibility to move to superset of same family with higher clock speed and more ROM/RAM is very nice. Standard industrial temperature range (-40 to 105) should be adequate.I'd strongly prefer open toolchain support as I'm familiar with arm gcc but using Keil or IAR would be acceptable, or even a vendor supplied toolchain.Does anyone have recommendations on these fronts? I'm currently considering the Freescale MK10DN512VLK10, Infineon XMC4108Q48K64ABXUMA1, and the ST STM32F427VGT7.Thanks,Nick

author: Harvs
author_rank: Super Contributor
timestamp: November 21, 2016, 09:15:29 pm
content: Given it's for an automotive use, is there any requirements on safety certifications?I ask this because I'm starting a project with TI's Hercules uC as it's got a lot of features that make the safety case easier.

author: nano
author_rank: Contributor
timestamp: November 21, 2016, 09:22:07 pm
content: I will comment on the chips you preselected from a software developer perspective:ST STM32F4xLots of online ressources and good documentation.The HAL library by ST is a bit bloated and has it’s pitfalls ("callbacks" everywhere, requires a systick, …)Complexity of the peripherals is medium and configuring everything by setting the bits in the registers is doable.Infineon XMC4xxxGood data sheets and application notes.So far no complains with their XMCLib. Easy to use and not overloaded.DAVE code generation is very confusing though and hides a lot of complexity. I’m not a fan of that.The peripherals are powerful but complex. Quite a bit more setup code is needed in comparison to the STM32F4x.The ADC has an dedicated external multiplexer control which might be interesting for your application.I have no experience with the Freescale parts. So no comment on them.You can use open GCC toolchain (https://launchpad.net/gcc-arm-embedded/+download) with any of those chips.The HAL Library (ST) or the XMCLib (Infineon) compile just fine with GCC.

author: jbb
author_rank: Super Contributor
timestamp: November 21, 2016, 10:38:01 pm
content: What ADC performance do you need?You can probably get up to 16 ADC MUX channels integrated into a chip with an ADC scan engine to run them. Youwillneed external MUXes, and these will probably need a little bit of code to run to swap the channels (or maybe DMA chaining...) If you need precisely synchronised sampling then everything gets more complicated.Depending on what you mean by 'GPIO toggling,' most chips don't really have an 'ADC sample done' output. But you might be able to fake it by very carefully reading the data sheet and using a free-running timer with exactly the right settings.Finally, you need to work out your flash / RAM / speed / power requirements. Often the memory drives the microcontroller cost 'cause it consumes a lot of silicon.

author: shraken
author_rank: Newbie
timestamp: November 21, 2016, 10:50:05 pm
content: Quote from: blueskull on November 21, 2016, 09:32:02 pmblueskull: Sorry if this wasn't clear. A 12 or 16 input analog multiplexor on-chip should be sufficient. I will need to sample 78 multiplexed inputs at a rate of 500 - 1kHz however. I wrote this to express the required interrupt and memory write time involved if a DMA approach is not adopted.nano: appreciate the response. Of all the offerings I most comfortable with STM32 having using the STM32L1xx line for a low power implementation and STM32F4 for some performance. I've mostly worked with the standard peripheral library and a little bit of libopencm3 for hobby. The Infineon offerings are compelling -- the aforementioned XMC4108Q48K64AB is $2.22 in volume with a Cortex M4F at 80MHz and has a 2 x 8-channel analog multiplexor for ADC.Harvs: at this point, no. It's not a safety critical system (might regret saying that) we are designing. The industrial temperature range (-40 to 105 degree C) should be sufficient though I do see that some parts have the full automotive range of -40 to 125 degree C. I'll have a look at the TI Hercules, appreciate the reference.jbb: 16 ADC mux should be sufficient. For this project, we'll need 10 ADC inputs and perhaps the others would be dedicated to a system voltage divider or current sense circuit. 64-128kB ROM size and 16 or 20kB RAM size I think will be our low-end target -- the STM32F429 has 256 kB SRAM and 512 kB ROM but I think that's a bit much.The item I seek clarification on or confirmation on the community is the vision recognition aspect. Our existing approach on desktop uses OpenCV. I would assume that it's technically very challenging to perform image processing on Cortex M0+ with no FPU. That's why I'm advocating for the M4F as I've seen some open-source projects like OpenMV who have successfully implemented it on an STM32F429 chip.

author: batteksystem
author_rank: Regular Contributor
timestamp: November 22, 2016, 01:22:10 am
content: if you need more ADC channels than the MCU, external analog multiplexers actually are quite easy to be added, however, as any circuits adding anything extra need to account for the extra noise and in this case, extra resistance among the path.

author: Harvs
author_rank: Super Contributor
timestamp: November 22, 2016, 04:15:07 am
content: Quote from: shraken on November 21, 2016, 10:50:05 pmAll good. Just be aware that the experience generally is safety can't be added into a system easily after it's baked. Often requires a rebuild from the ground up (particularly with software certification...)

author: mac.6
author_rank: Regular Contributor
timestamp: November 22, 2016, 07:52:24 am
content: Your requirements are a bit confused.You need OpenCV but only 20kB ram, you want many ADC but nothing about resolution and noise.You want automotive MCU but industrial range, which is contradictory at least. Nothing on sw requirements (MISRA?).In the end you want to refine your requirements, then ask MCU vendors for a match, not a forum where everybody will push only what they use/are inclined to use.

author: nctnico
author_rank: Super Contributor
timestamp: November 22, 2016, 08:14:28 am
content: Quote from: shraken on November 21, 2016, 10:50:05 pmFor this you'll need to make a precise requirement on what kind of algorithm you are going to need and how much processing power is involved. Just assuming you need an FPU isn't going to cut it. You'll need to prototype this part first before committing to any MCU. Depending on the volume (say less than 1000 units) it will be better to use an MCU with twice the memory and processing power because in the end the project will likely need tweaks which cost additional memory and CPU cycles. Trying to squeeze extra performance from an MCU which is too small will need an exponentially growing amount of engineering effort and will cost a huge amount of money so don't make the mistake to only look at component cost!

author: Jeroen3
author_rank: Super Contributor
timestamp: November 22, 2016, 11:21:56 am
content: Doesn't full automotive requirement insist on multi-sourced parts?You're not going to find an M4 chip made by two brands.

author: coppice
author_rank: Super Contributor
timestamp: November 22, 2016, 12:17:13 pm
content: Quote from: Jeroen3 on November 22, 2016, 11:21:56 amNo. For example, there are currently no redundant automotive MCUs that even vaguely resemble each other, let alone behave as second sources.

author: Scrts
author_rank: Frequent Contributor
timestamp: November 22, 2016, 12:53:21 pm
content: I wasn't aware that STM32 is actually automotive qualified. Do they have AECQ-100 qualification?We used ST micros before, but SPC56 series and now we're using Renesas parts. ST required crazy expensive JTAG debugger. On the other hand, if you are planning to use CAN bus, do you also plan to use AUTOSAR?

author: Frank
author_rank: Contributor
timestamp: November 22, 2016, 01:17:47 pm
content: Quote from: Scrts on November 22, 2016, 12:53:21 pmSame here, I thought that only some NXP Cortex-M0+ parts were qualified.

author: shraken
author_rank: Newbie
timestamp: November 22, 2016, 07:18:23 pm
content: Thanks for your responses. I think I have a lot to go off so I'm going to proceed. I'm going to work to port our OpenCV algorithm to firmware on the STM32F429 to get an idea of the requirements and then make a more informed decision from there.batteksystem: We've used external analog mux in the past. It won't be required for this application but thank you for the recommendation.Harvs: I'll keep that in mind as we continue.mac.6 & nctnico: That's valuable advice. ADC resolution needs to be 10 bits or greater, 500ksps minimum and I had not considered a noise specification as the thermal and shot noise of our sensor likely dominates. I totally agree though, it's a contradictory statement to say I want to do an undefined computer vision algorithm if I don't have a memory or processing spec. As for the temperature range, is it possible to design a product destined for an automobile that doesn't meet the automotive temperature range but only the industrial range? Our product is designed to go inside an automobile cabin. I am going to prototype this solution around an MCU platform I'm comfortable with that has ample resources and then make an informed decision with what we can drop down to when that time comes.Frank: The NXP/Freescale line that is AECQ-100 qualified I think is the KEA64/KEA128 line Cortex M0+ line.http://www.nxp.com/assets/documents/data/en/supporting-information/KEA-ULTRA-RELIABLE-APPS.pdf

author: nctnico
author_rank: Super Contributor
timestamp: November 22, 2016, 07:26:42 pm
content: AFAIK the NXP LPC11E6x and LPC11U6x (Cortex M0) are also available in automotive temperature ranges but I don't know about any further qualifications.

author: jnz
author_rank: Frequent Contributor
timestamp: November 23, 2016, 12:13:47 am
content: FWIW.... You may have more luck dumping CAN to another module. For one example, the LPC1100 has an integrated transceiver. Although this would mean two ARM parts, there may be advantages to that instead of limiting yourself to specific parts that have ARM functionality.But otherwise, I've had good luck with STM32's CAN peripheral. Beats the snot out of anything Microchip (for example) has ever made.

author: nctnico
author_rank: Super Contributor
timestamp: November 23, 2016, 12:58:41 am
content: I'd use multiple controllers as an absolute last resort because the communication between them is a huge can of worms (think about what to do when one controller isn't responding, timing between the processes, etc).

author: Jeroen3
author_rank: Super Contributor
timestamp: November 23, 2016, 06:32:59 am
content: CAN bus is actually pretty robust. You can't really kill without shorting it, or intentionally creating collisions by two nodes transmitting the same ID.The application layer can be more susceptible to issues, eg lost or late messages. However, the application is not given.Quote from: shraken on November 21, 2016, 10:50:05 pmIt is. Except when the cortex M0 is double, and clocked at 200 Mhz. Then it might help, since some operation will be simple inverts, adds or moves. An M4 isn't much better than an M0 there. (pipeline maybe)The STM32F407 is capable of performing vision operations. At 176x144 at least.

author: Scrts
author_rank: Frequent Contributor
timestamp: November 23, 2016, 03:28:24 pm
content: It all depends how serious this project in terms of real automotive application is. The manufacturers usually have a list of allowed microcontrollers. They also demand AUTOSAR if you use CAN. And on top of that, you have to have a certain resource limit set if you use the same micro for CAN. We're using DSPs for vision stuff and separate microcontrollers for CAN.

author: kfishy
author_rank: Newbie
timestamp: November 23, 2016, 04:02:20 pm
content: Quote from: Jeroen3 on November 23, 2016, 06:32:59 amThe Cortex M4 actually has some rudimentary SIMD operations where it can do parallel arithmetic on the four bytes of a 32-bit word. It also has the Thumb-2 instruction set (both 16-bit and 32-bit instructions), whereas M0 only has Thumb (16-bit only). For compute heavy code the M4 will definitely be faster.