EEVblog Electronics Community Forum

Electronics => Microcontrollers => Topic started by: mrunje96 on September 05, 2019, 08:44:11 pm

Title: Recommend a microcontroller
Post by: mrunje96 on September 05, 2019, 08:44:11 pm
Hi, can someone recommend me a microcontroller for project (im currently at rpi 3b+ just for prototyping) that uses ethernet ( UDP for OSC protocol/comunication), midi through USB, around 120 buttons (that i will handle through shift registers 165D, or you have better idea for this amount of buttons) and same number of leds (WS2812, so im just sending data to data in pin of led and it has +5v, gnd pin and data out..) + few slide potentiometers. Thanks in advance.  :-+ :-+
Title: Re: Recommend a microcontroller
Post by: ledtester on September 05, 2019, 08:52:52 pm
What's wrong with the Rpi? In other words, what other constraints are you trying to meet -- size, cost, power consumption, ...?


Title: Re: Recommend a microcontroller
Post by: Kjelt on September 05, 2019, 08:56:10 pm
Any Arm Cortex M3, M4 uC or higher with MAC peripheral such as STM32F2x7, STM32F4x7  but it will take you quite some time to get everything working nicely together, while a rpi is set to go.
Title: Re: Recommend a microcontroller
Post by: mrunje96 on September 05, 2019, 09:17:46 pm
Im thinking if i make a product ( some kind of controller) it wouldnt be that profesional to sell if theres rpi sticked inside... or should i just copy rpi scheme in my pcb and do job like that...
Title: Re: Recommend a microcontroller
Post by: luiHS on September 05, 2019, 09:20:13 pm
 
NXP ARM RT1020, Cortex M7 500Mhz, LQFP100 and LQFP144. Very cheap and very powerful.

After working for a few years with Kinetis MK66 and some designs with STM32, I decided to port it all to the NXP RT series.
Title: Re: Recommend a microcontroller
Post by: ledtester on September 05, 2019, 09:29:21 pm
A fully assembled Rpi Zero costs $6 delivered. I doubt you'll be able to better than that.
Title: Re: Recommend a microcontroller
Post by: Kjelt on September 05, 2019, 09:59:05 pm
Im thinking if i make a product ( some kind of controller) it wouldnt be that profesional to sell if theres rpi sticked inside... or should i just copy rpi scheme in my pcb and do job like that...
:-// I saw some high end audio manufacturer put an Olimex board of $50 in their 10k$+ "high end" apparatus.
But chances are higher with a pi that your device is copied 1:1 and sold for less on Ebay from Shenzen within a month.
Title: Re: Recommend a microcontroller
Post by: mrunje96 on September 05, 2019, 10:11:38 pm
 
Im thinking if i make a product ( some kind of controller) it wouldnt be that profesional to sell if theres rpi sticked inside... or should i just copy rpi scheme in my pcb and do job like that...
:-// I saw some high end audio manufacturer put an Olimex board of $50 in their 10k$+ "high end" apparatus.
But chances are higher with a pi that your device is copied 1:1 and sold for less on Ebay from Shenzen within a month.

They could copy hardware ( which would be regular rpi for example) but they could not access the code? And is there any code read protection for something like that?
Title: Re: Recommend a microcontroller
Post by: rsjsouza on September 05, 2019, 10:19:20 pm
Can you buy the Broadcom IC at quantities of less than, say, 100.000? If not, then the RPi Zero mentioned above is unbeatable.
Title: Re: Recommend a microcontroller
Post by: Kjelt on September 05, 2019, 10:32:43 pm
They could copy hardware ( which would be regular rpi for example) but they could not access the code? And is there any code read protection for something like that?
Quite difficult to protect firmware, you need a processor with a special security peripheral to execute encrypted firmware.
Title: Re: Recommend a microcontroller
Post by: jhpadjustable on September 05, 2019, 11:08:08 pm
The STM32F107 looks to have ample torque for a MIDI/OSC controller and does have two levels of code readout protection. If you're into that sort of thing, STM32duino has an Ethernet library.
Title: Re: Recommend a microcontroller
Post by: brucehoult on September 06, 2019, 03:08:07 am
Im thinking if i make a product ( some kind of controller) it wouldnt be that profesional to sell if theres rpi sticked inside... or should i just copy rpi scheme in my pcb and do job like that...

How many are you planning to make?

If the answer is "one" or for that matter anything under 1000 then the right professional answer is almost certainly RPi or NanoPi Neo or something like that, not a bare chip.

Many of them can easily be mounted on a bigger PCB that has your own circuits (e.g. your shift registers). That's all perfectly professional. And economical on NRE, which is a very professional thing to do for your client.
Title: Re: Recommend a microcontroller
Post by: tglev on September 06, 2019, 08:53:22 am
A Raspberry Pi Compute Module could be a solution.
Gives you access to using a RPI while looking more professional on your own custom PCB.
Title: Re: Recommend a microcontroller
Post by: SiliconWizard on September 06, 2019, 02:32:25 pm
The "how many" question seems the most pressing point here.

But still, the OP may want to favor a pure MCU solution as opposed to one that requires a full OS to work, for a number of reasons. Sure you can always program an RPi or similar bare-metal, but good luck with that: it would be a lot more complex than doing the same on a typical MCU. So it all comes down to whether the OP accepts to use a system that REQUIRES an OS to function.

An additional potential issue with an RPi is that those boot from an SD card. I'm not too sure about the long-term reliability of such a solution frankly... (other SBCs use eMMC Flash which is already a lot better IMO.)

So that's 3 questions to ask themselves: 1/ quantity, 2/ OS or not OS and 3/ reliability of mass storage.



Title: Re: Recommend a microcontroller
Post by: Scrts on September 06, 2019, 02:54:09 pm
Check www.ucapps.de (http://www.ucapps.de), seems like they've already done what you want. The latest Core was designed around STM32F4: http://ucapps.de/mbhp_core_stm32f4.html (http://ucapps.de/mbhp_core_stm32f4.html)
Title: Re: Recommend a microcontroller
Post by: Sal Ammoniac on September 06, 2019, 02:57:58 pm
NXP ARM RT1020, Cortex M7 500Mhz, LQFP100 and LQFP144. Very cheap and very powerful.

Are you sure a 500MHz M7 is enough power for this application? Perhaps he should go straight to an embedded Intel part at 3.5 GHz and 16GB of RAM...

/sarcasm mode off
Title: Re: Recommend a microcontroller
Post by: Kjelt on September 06, 2019, 03:29:41 pm
Check www.ucapps.de (http://www.ucapps.de), seems like they've already done what you want. The latest Core was designed around STM32F4: http://ucapps.de/mbhp_core_stm32f4.html (http://ucapps.de/mbhp_core_stm32f4.html)
Does not have ethernet or does it?
Title: Re: Recommend a microcontroller
Post by: Scrts on September 06, 2019, 04:05:39 pm
Check www.ucapps.de (http://www.ucapps.de), seems like they've already done what you want. The latest Core was designed around STM32F4: http://ucapps.de/mbhp_core_stm32f4.html (http://ucapps.de/mbhp_core_stm32f4.html)
Does not have ethernet or does it?

STM32F407 does have ethernet, but you would need a custom motherboard for the devkit with Ethernet port.
Title: Re: Recommend a microcontroller
Post by: Kjelt on September 06, 2019, 06:07:14 pm
STM32F407 does have ethernet, but you would need a custom motherboard for the devkit with Ethernet port.
Yes I know that see my first reply.
The question was if that recommended USB to midi platform has it and more important the firmware supports it.
Supporting ethernet on the STM32F yourself from scratch is lets put it mildly a long challenge  ;)
Title: Re: Recommend a microcontroller
Post by: nctnico on September 06, 2019, 06:42:17 pm
If you want network support then I strongly suggest to use one of the Wiznet chips.
Title: Re: Recommend a microcontroller
Post by: mrunje96 on September 06, 2019, 08:18:53 pm
Thank you guys for answers, now i have direction to go...

How many? I dont know yet, im in test mode still and in meanwhile i'll be looking for some feedback from people is it worth to build it for selling in large quantities :D

Os/ no Os = no os, probably there will be some simple pc app for configuration of buttons

storage = i think i dont need 16gb sd memory for that kind of controller :D
Title: Re: Recommend a microcontroller
Post by: maginnovision on September 06, 2019, 08:59:32 pm
I'd also add something like an xcore xe216/232 as an option.
Title: Re: Recommend a microcontroller
Post by: nctnico on September 06, 2019, 09:22:53 pm
NXP ARM RT1020, Cortex M7 500Mhz, LQFP100 and LQFP144. Very cheap and very powerful.
Are you sure a 500MHz M7 is enough power for this application?
If the microcontroller fits the budget then you better take the microcontroller which has lots of performance. Having room for extensions is always good especially for a startup company. The last thing you want to deal with is endless code optimisation because the microcontroller doesn't have enough resources. That will cost more money in lost revenue than using a cheaper microcontroller can ever make up for. Optimising purely on component costs and not thinking ahead about software development costs is a costly mistake which is often made.
Title: Re: Recommend a microcontroller
Post by: Sal Ammoniac on September 06, 2019, 09:40:27 pm
NXP ARM RT1020, Cortex M7 500Mhz, LQFP100 and LQFP144. Very cheap and very powerful.
Are you sure a 500MHz M7 is enough power for this application?
If the microcontroller fits the budget then you better take the microcontroller which has lots of performance. Having room for extensions is always good especially for a startup company. The last thing you want to deal with is endless code optimisation because the microcontroller doesn't have enough resources. That will cost more money in lost revenue than using a cheaper microcontroller can ever make up for. Optimising purely on component costs and not thinking ahead about software development costs is a costly mistake which is often made.

I agree with you on that, but only up to a point. Sometimes massive overkill is counterproductive for reasons that are not related to budget. A complex microcontroller can me more prone to failure, both as a result of coding errors and the simple fact that the more complex something is, the more failure paths there'll be.
Title: Re: Recommend a microcontroller
Post by: mariush on September 06, 2019, 10:20:37 pm
You should consider if it may be better to make it a bit more modular, even if it may cost a bit more.

For example, you could have a 50 cent  microcontroller read the state of up to 16-32 buttons and send the data for up to 16-32 leds.
Each of these microcontrollers would use I2C or SPI or RS-485 or RS-232 (2 wires) and use another IO line as ENABLE (or give each a unique address through some jumpers on the board if you use i2c for example .. note i2c may have limit of up to 8 devices on one i2c bus, but in your case 8 devices x 32 buttons/led = 256 so you'd be fine even with i2c)

The microcontroller is fast enough that it can read the state of buttons tens of times a second and could even multiplex the detection of buttons to use less pins ... ex use 8 i/o pins to read the state of 16 buttons, or 12 IO pins to read state of 32 buttons (by reading 8 buttons at a time) ... and 2 outputs would be used for the led strip with 16-32 leds, and 2-3 wires for the hardware SPI/UART etc

ex a 60 cent ATTiny 406 with 18 IO pins would work just fine to control 32 buttons and a strip with 32 leds... and you don't need shift registers or whatever you thought of.  https://www.digikey.com/product-detail/en/microchip-technology/ATTINY406-MNR/ATTINY406-MNRCT-ND/8536649 (https://www.digikey.com/product-detail/en/microchip-technology/ATTINY406-MNR/ATTINY406-MNRCT-ND/8536649)

So then you're left with a controller that needs USB and Ethernet and way less pins... worse case scenario 2-3 pins for spi/uart + 1 enable pin for each "module", some ADC inputs for the sliders (but you could make a separate module for those if you want to)

It would allow you to use lower pin count microcontrollers... for example maybe something as simple as a PIC32MX may be enough : https://www.digikey.com/product-detail/en/microchip-technology/PIC32MX664F128H-I-PT/PIC32MX664F128H-I-PT-ND/2601589 (https://www.digikey.com/product-detail/en/microchip-technology/PIC32MX664F128H-I-PT/PIC32MX664F128H-I-PT-ND/2601589)
 
Title: Re: Recommend a microcontroller
Post by: nctnico on September 06, 2019, 10:50:59 pm
Oh please don't turn a simple project into a multi-processor turd which is impossible to debug.  :palm:
Rule number one with communication is that it will fail and thus you'll need to handle communication failures. In turn this means you need to built in a way to reset a multi-processor system back into a known good state. Also: each processor will run at it's own pace and do stuff at it's own time. At one point all this asynchronousness needs to become synchronised. In short: avoid multi processor systems like the plague. They are extremely hard to get to work reliably.
Title: Re: Recommend a microcontroller
Post by: mariush on September 06, 2019, 11:06:01 pm
The only way those small microcontrollers would interact with the main micro would be through something standard like i2c or spi ... nothing complicated, no bit-banging, plain and simple... nothing to keep synchronized, or whatever. They'd basically behave like dumb port expander chips.

You'd have 3-4 commands like "send me state of all 32 buttons" and the micro sends 4 bytes back through the i2c or spi or whatever ... or you send a one byte command followed by a bunch of bytes with the color information for leds. ex set led 1, r, g,b ... 4 bytes ... send and forget.

how is this any different than using shift registers or shifting data for 120 leds on a strip every time something changes?
Title: Re: Recommend a microcontroller
Post by: nctnico on September 06, 2019, 11:22:17 pm
The only way those small microcontrollers would interact with the main micro would be through something standard like i2c or spi ... nothing complicated, no bit-banging, plain and simple... nothing to keep synchronized, or whatever. They'd basically behave like dumb port expander chips.

You'd have 3-4 commands like "send me state of all 32 buttons" and the micro sends 4 bytes back through the i2c or spi or whatever ... or you send a one byte command followed by a bunch of bytes with the color information for leds. ex set led 1, r, g,b ... 4 bytes ... send and forget.

how is this any different than using shift registers or shifting data for 120 leds on a strip every time something changes?
If they behave like dump port expanders then it is better to just buy port dumb expanders. But as soon as you are going to implement more clever commands (IOW some form of sequential logic) you'll be opening a can of worms. I've seen the strategy to use many small microcontrollers instead of one big one fail many times. Especially when the project is being built by a relatively novice person.
Title: Re: Recommend a microcontroller
Post by: Kjelt on September 07, 2019, 08:17:55 am
Agree with nctnico, if not absolutely required don't do it.
If you do have to use it don't use communication dependencies use some thing simple like a mailbox, eg dual port sram where both controllers can read write to.
Title: Re: Recommend a microcontroller
Post by: krho on September 07, 2019, 08:19:46 am
Check www.ucapps.de (http://www.ucapps.de), seems like they've already done what you want. The latest Core was designed around STM32F4: http://ucapps.de/mbhp_core_stm32f4.html (http://ucapps.de/mbhp_core_stm32f4.html)
Taht cannot be sold as it uses evaluation boards from stm, which explicitly forbids selling final products containing their eval boards.
Title: Re: Recommend a microcontroller
Post by: donotdespisethesnake on September 07, 2019, 12:10:40 pm
Check www.ucapps.de (http://www.ucapps.de), seems like they've already done what you want. The latest Core was designed around STM32F4: http://ucapps.de/mbhp_core_stm32f4.html (http://ucapps.de/mbhp_core_stm32f4.html)
Taht cannot be sold as it uses evaluation boards from stm, which explicitly forbids selling final products containing their eval boards.

Unless they have a patent, they can't stop you doing whatever you like with the board, I think the "first sale" doctrine applies. But on a practical note, if you tried to order 10,000 boards from them they could just say "no". I don't know why they put this stupid non-legal clause in anyway, it's this sort of dumb-ass shit that always puts me off anything to do with STM.

Anyway, while we are nominating favourite random micros, mine is XMC4700, there's nice dev boards and the "DAVE" IDE and libraries are some of the best I've used, unlike typical vendor offerings. https://www.infineon.com/cms/en/product/microcontroller/32-bit-industrial-microcontroller-based-on-arm-cortex-m/32-bit-xmc4000-industrial-microcontroller-arm-cortex-m4/xmc4700/# (https://www.infineon.com/cms/en/product/microcontroller/32-bit-industrial-microcontroller-based-on-arm-cortex-m/32-bit-xmc4000-industrial-microcontroller-arm-cortex-m4/xmc4700/#)!tools
Title: Re: Recommend a microcontroller
Post by: mrunje96 on September 07, 2019, 05:50:21 pm
So the best way would be to use some ethernet chip/mcu example w5100 and then talk over SPI to mcu that is powerful enough to do 120buttons scan around 10+ times in second, send something over midiusb/ethernet, depending on message from ethernet output right color to leds?

Is there any problem to communicate with different PC's in same LAN, like i want to send one data on 192.168.1.1, another to 192.168.1.2 and recieve respond or another data from both of them?
Title: Re: Recommend a microcontroller
Post by: nctnico on September 07, 2019, 05:58:48 pm
The Wiznet chips support multiple open TCP/IP connections and if you use UDP you can serve many hosts. Just reply to the address of the sender of the message.

I recommend to use the W5500 or the W6100. The latter also has IPv6 support.
Title: Re: Recommend a microcontroller
Post by: SiliconWizard on September 07, 2019, 07:23:38 pm
I hadn't looked at Wiznet products in a while. I remembered chips which would only support 10Base-T and SPI or something like that. The W6100 seems pretty nice though: 100Base-T, and both SPI and parallel interfaces.

If they could release a 1000Base-T version with a 16-bit or 32-bit FIFO interface, that would be great! ;D
Title: Re: Recommend a microcontroller
Post by: nctnico on September 07, 2019, 07:27:59 pm
I hadn't looked at Wiznet products in a while. I remembered chips which would only support 10Base-T and SPI or something like that. The W6100 seems pretty nice though: 100Base-T, and both SPI and parallel interfaces.

If they could release a 1000Base-T version with a 16-bit or 32-bit FIFO interface, that would be great! ;D
Why would you need a 1000Base-T device? The Wiznet chips themselves and most general purpose microcontrollers don't have the processing power to deal with that kind of bandwidth anyway and every switch supports at least 100Base-T.
Title: Re: Recommend a microcontroller
Post by: SiliconWizard on September 07, 2019, 07:54:11 pm
I hadn't looked at Wiznet products in a while. I remembered chips which would only support 10Base-T and SPI or something like that. The W6100 seems pretty nice though: 100Base-T, and both SPI and parallel interfaces.

If they could release a 1000Base-T version with a 16-bit or 32-bit FIFO interface, that would be great! ;D
Why would you need a 1000Base-T device? The Wiznet chips themselves and most general purpose microcontrollers don't have the processing power to deal with that kind of bandwidth anyway and every switch supports at least 100Base-T.

I'm sure you would have said the same thing if I had asked for a 100Base-T device back when they were only offering 10Base-T... :D
And since this is Wiznet's main business, they probably WILL release such a chip one of these days anyway.

There are many cases in which getting more than about 10MBytes/s throughput (if you're lucky and the stars are aligned) can be useful, just like having USB 2 HS (with about half the throughput) can be as well. There are all kinds of MCUs these days, some pretty fast. You could also want to use this with a small FPGA instead of having to deal with an ethernet + TCP/IP stack as IPs that could be costly and/or require a big FPGA just to be synthesized on. You could want to use anything (FPGA, MCU) else than a full SOC requiring a full OS just to get an ethernet interface... while still getting better throughput than what you'd get with a simple embedded ethernet peripheral on an MCU, requiring additional libraries and possibly significant debug time.

So I think there would be some market for this. Really ethernet+TCP/IP is not something that I'm very fond of messing with at the implementation level.
Title: Re: Recommend a microcontroller
Post by: nctnico on September 07, 2019, 08:04:25 pm
If you are getting into FPGA territory then adding a SoC with a 1GB ethernet + Linux isn't a far stretch to make. Also if you are going the FPGA route then implementing UDP is quite simple (together with a soft core). I have an FPGA (with softcore) design which pushes data out at a rate of 400MBps or so on a 1Gbit/s interface.

The Wiznet chips are really geared towards simple IoT device which need to send a little bit of data. If they get more fancy than that they will get too expensive.
Title: Re: Recommend a microcontroller
Post by: SiliconWizard on September 07, 2019, 08:29:18 pm
If you are getting into FPGA territory then adding a SoC with a 1GB ethernet + Linux isn't a far stretch to make.

Again, I may not want a SoC + a Linux OS just to run my damn device if I don't have to. So this chip would just allow me to do that. Not every fly requires a hammer to get killed.

Also if you are going the FPGA route then implementing UDP is quite simple (together with a soft core). I have an FPGA (with softcore) design which pushes data out at a rate of 400MBps or so on a 1Gbit/s interface.

Yeah. It may be simple, but did you write a complete ethernet controller + UDP in RTL? Did you buy anything? How big is the FPGA? And the Wiznet device supports TCP and IPV6. It's another world already.
(Again I already said why I wouldn't necessarily consider doing this. If you have, good for you.) Kinda same territory here as USB to me, for my uses. Would I want to bother writing my own USB core? I don't think so. Would I consider buying an IP? Maybe if the product and quantities justify this, but otherwise, most likely not.

The Wiznet chips are really geared towards simple IoT device which need to send a little bit of data. If they get more fancy than that they will get too expensive.

They are geared towards whatever will sell. The W6100 is already clearly a significant step up.
And too expensive? The W6100 is currently about 2.5€ per 1! So even if the 1000Base-T version was 4 times that, I would seriously consider it.
Title: Re: Recommend a microcontroller
Post by: mrunje96 on September 07, 2019, 08:45:56 pm
Since im quite new to this kind of controllers (wiznet w6100) and stacking them, do i need to program anything to them or just connect to mcu and ethernet magjack and do programing only on mcu?
Title: Re: Recommend a microcontroller
Post by: nctnico on September 07, 2019, 08:59:45 pm
Yeah. It may be simple, but did you write a complete ethernet controller + UDP in RTL? Did you buy anything? How big is the FPGA?
This was on a Spartan 6. The ethernet core is from an existing (open source) project. But even then getting the packets into the softcore and implementing ARP wasn't such a big job. Things get hairy with TCP/IP (I wouldn't touch that) but UDP is pretty simple.
Title: Re: Recommend a microcontroller
Post by: nctnico on September 07, 2019, 09:00:56 pm
Since im quite new to this kind of controllers (wiznet w6100) and stacking them, do i need to program anything to them or just connect to mcu and ethernet magjack and do programing only on mcu?
You just program the mcu to communicate with the Wiznet chip (over SPI) and that's it. Wiznet has example code on their website.
Title: Re: Recommend a microcontroller
Post by: mrunje96 on September 07, 2019, 09:06:28 pm
Since im quite new to this kind of controllers (wiznet w6100) and stacking them, do i need to program anything to them or just connect to mcu and ethernet magjack and do programing only on mcu?
You just program the mcu to communicate with the Wiznet chip (over SPI) and that's it. Wiznet has example code on their website.

Thanks, i will check that
Title: Re: Recommend a microcontroller
Post by: brucehoult on September 07, 2019, 11:52:08 pm
Many or most evaluation boards are not going to have CE FC certification. Ours certainly don't. Raspberry Pis, Odroids, Arduinos etc do.
Title: Re: Recommend a microcontroller
Post by: rsjsouza on September 08, 2019, 02:05:12 am
Many or most evaluation boards are not going to have CE FC certification. Ours certainly don't. Raspberry Pis, Odroids, Arduinos etc do.
Some level of compliance must be done, but being a non-enclosed PCB carries very little requirements for electromagnetic compatibility or safety. The famous printed phrase: "For evaluation only; not FCC approved for resale"
Title: Re: Recommend a microcontroller
Post by: fchk on September 08, 2019, 06:31:31 am
Hi, can someone recommend me a microcontroller for project (im currently at rpi 3b+ just for prototyping) that uses ethernet ( UDP for OSC protocol/comunication), midi through USB, around 120 buttons (that i will handle through shift registers 165D, or you have better idea for this amount of buttons) and same number of leds (WS2812, so im just sending data to data in pin of led and it has +5v, gnd pin and data out..) + few slide potentiometers. Thanks in advance.  :-+ :-+

TI TIVA TM4C129.
Builtin 10/100 Ethernet MAC+PHY
Buildin USB Host/Device/OTG
120 MHZ, up to 1M Flash/256k RAM
nice TI RTOS for free

Launchpad available
https://www.digikey.nl/product-detail/nl/texas-instruments/EK-TM4C1294XL/296-37267-ND/4725808 (https://www.digikey.nl/product-detail/nl/texas-instruments/EK-TM4C1294XL/296-37267-ND/4725808)

fchk
Title: Re: Recommend a microcontroller
Post by: Sal Ammoniac on September 09, 2019, 04:29:47 pm
Anyway, while we are nominating favourite random micros, mine is XMC4700, there's nice dev boards and the "DAVE" IDE and libraries are some of the best I've used, unlike typical vendor offerings. https://www.infineon.com/cms/en/product/microcontroller/32-bit-industrial-microcontroller-based-on-arm-cortex-m/32-bit-xmc4000-industrial-microcontroller-arm-cortex-m4/xmc4700/# (https://www.infineon.com/cms/en/product/microcontroller/32-bit-industrial-microcontroller-based-on-arm-cortex-m/32-bit-xmc4000-industrial-microcontroller-arm-cortex-m4/xmc4700/#)!tools

The Infineon XMC4000 series is quite nice, especially for motor control, power conversion, and things like that. Documentation is not bad either, even though it's obviously translated from German it's still better than ST or Freescale documentation. They have an application note for each peripheral on the chip that goes into detail beyond what's in the reference manual, which is somewhat unusual these days.

I don't know much about Dave as I've never used it (I typically use the XMC4700 with IAR or CrossWorks), but as it's based on Eclipse it's probably very similar to STM32Cube or MCUXpresso. They do have a nice debugger probe that's Segger J-Link compatible and costs only about $90, and it even includes isolation.

The fastest parts are limited to 144 MHz, however, and it's an M4, not an M7, so if you need more CPU horsepower or DP hardware floating point, you'll have to look at other vendors. I've been asking Infineon for years about their plans for faster parts and/or parts based on the M7, and I've gotten nothing but silence from them.
Title: Re: Recommend a microcontroller
Post by: samy03 on September 11, 2019, 07:20:49 pm
AM335x is pretty good as its used on beaglebone black and all the linux stuff is pretty similar to Raspi and is easily available.
Title: Re: Recommend a microcontroller
Post by: Bob Moore on September 23, 2019, 09:38:30 am
My 2 recommendations

The PIC (Programmable Intelligent Computers) and STM (by STMicroelectronics) microcontroller product lines.They both  have ranked among the top MCUs on the market for more than a decade. I feel both  manufacturers offer high-quality, highly diverse microcontrollers that can support different embedded applications, from IOT to Industrial to high quantity consumer applications.

Microchip (Pic 32) continues to support the lone tinkerer, in continuing to support things like the DIP package, and in hosting live webinars where you can ask questions to the company’s engineering team directly. If I had to choose one and only one I would go for STM32 though https://titoma.com/blog/stm32-pic32-manufacturing/ I feel it offers more.
Title: Re: Recommend a microcontroller
Post by: Scrts on October 25, 2019, 05:12:17 pm
STM32F407 does have ethernet, but you would need a custom motherboard for the devkit with Ethernet port.
...Supporting ethernet on the STM32F yourself from scratch is lets put it mildly a long challenge  ;)

Don't do it yourself. I've used LwIP before and integration was super easy.
Title: Re: Recommend a microcontroller
Post by: rstofer on October 26, 2019, 04:52:06 pm
In my view, the important question is whether you need code protection.  It isn't a simple question because the obvious answer "of course I do" might be incorrect if the application itself is trivial.

If all you do is read a bunch of buttons, frame an Ethernet packet and send it down the wire, I can duplicate your project by lunch time without ever seeing your hardware.  Designing from bare metal just to get code protection from a project that performs some trivial function is a waste of effort.

In fact, from a long term software maintenance point of view, having a full blown Pi makes a lot of sense.  The end user can update the software from a web site.  Heck, it could be automated - if the Pi can see the web site, it checks for an update.  Everybody does that sort of thing.

Of course, there is the "open source" issue and I don't pretend to understand how that works.  You can bet that this will come up at some point since you will almost inevitably be using "open source" tools and libraries.  Again, I don't understand how it works.  Neither does anybody else!

Because I already have a working project and if Linux brought nothing to the dance, I would tend to use the mbed LPC1768 mounted on a daughter card holding a MagJack and any other project specific hardware but I can see the allure of one of the STM boards.  As a fact, I would use the mbed toolchain and libraries for any of the boards they support and many STM boards are included in that list.

https://os.mbed.com/platforms/

Here are the boards that support Ethernet and the LPC1768 is at the lower right:

https://os.mbed.com/platforms/?q=&Communication=Ethernet

On the other hand, with Linux I get SSH (or Telnet) which may be handy for the user.  If there is no need for a console display, keyboard or mouse, the easy way to maintain the system is with a Telnet session and this comes free with Linux.

OTOH, Linux isn't a real-time OS and I don't know whether that matters to your program.  If time critical?  Can Linux handle it?  If not, FreeRTOS is one of the mbed libraries for my favorite LPC1768.  But unless I wanted to write a bunch of code, Telnet might be out of the question.  I haven't looked at the network stack to see what is available at that level.  My application just made a TCP connection to a LaserJet.

Title: Re: Recommend a microcontroller
Post by: FlyingDutch on October 27, 2019, 09:48:40 am
Im thinking if i make a product ( some kind of controller) it wouldnt be that profesional to sell if theres rpi sticked inside... or should i just copy rpi scheme in my pcb and do job like that...

Hello,
you can use some of STM32MP1x MCU. It has three cores: two ARM Cortex-A7 (with clock up to 650 MHz) and one ARM Cortex-M4 real time MCU (clock up to 209MHz). You can run Linux OS on two Cortex-A7 application processors, and real time task on Cortex-M4. There is software library for comunication between Cortex-A7 and Cortex-M4 cores. These series MCUs has also "on-board" DDR3 memory and GPU with OpenGL support (and many multimedia sockets and protocols). For doing develoipment you can use evaluation board from STM, for example such like this:

https://pl.mouser.com/ProductDetail/STMicroelectronics/STM32MP157C-DK2?qs=%2Fha2pyFaduh%2FKELL0HLb%2FPTLHFebxNCrIr4VO2atbb%2FGq6NL0YC5Pg%3D%3D (https://pl.mouser.com/ProductDetail/STMicroelectronics/STM32MP157C-DK2?qs=%2Fha2pyFaduh%2FKELL0HLb%2FPTLHFebxNCrIr4VO2atbb%2FGq6NL0YC5Pg%3D%3D)

And for production SOM module with custom PCB board with peripherals. For Example this:

https://somlabs.com/product/visionsom-stm32mp1/ (https://somlabs.com/product/visionsom-stm32mp1/)

You can use free software tools from STM for development: "STM32CubeMX" (generator of initialization code using HAL or LowLevel Linbraries) and "System Workbench for STM32" (IDE and compiler based on Eclipse projectr). This two tools can act together "CubeMX" is generating project for compiler with initialization code (with graphical GUI wizards).

Link for software are here:
https://www.st.com/en/development-tools/stm32cubemx.html (https://www.st.com/en/development-tools/stm32cubemx.html)

https://www.st.com/en/development-tools/sw4stm32.html (https://www.st.com/en/development-tools/sw4stm32.html)

And here is producer page for MCU:

https://www.st.com/en/microcontrollers-microprocessors/stm32mp157.html (https://www.st.com/en/microcontrollers-microprocessors/stm32mp157.html)

When you finish development you can design custom PCB for needed peripherals for SOM module. Product is: SOM module+PCB with peripherals needed in project.

Regards
Title: Re: Recommend a microcontroller
Post by: GeeBee2020 on December 18, 2019, 08:52:19 am
Hi, can someone recommend me a microcontroller for project (im currently at rpi 3b+ just for prototyping) that uses ethernet ( UDP for OSC protocol/comunication), midi through USB, around 120 buttons (that i will handle through shift registers 165D, or you have better idea for this amount of buttons) and same number of leds (WS2812, so im just sending data to data in pin of led and it has +5v, gnd pin and data out..) + few slide potentiometers. Thanks in advance.  :-+ :-+


Parallax Propeller -- parallax.com
Title: Re: Recommend a microcontroller
Post by: ag123 on December 20, 2019, 12:31:24 pm
my guess is the problem with Rpi is probably with *pins* there is a 40 pin connector and perhaps about 9 is gnd?
things like the stm32f103 - e.g. blue pill
https://www.aliexpress.com/wholesale?catId=0&SearchText=stm32f103c8t6 (https://www.aliexpress.com/wholesale?catId=0&SearchText=stm32f103c8t6)
can possibly handle that, if you are into Arduino then the variant/core would be stm32duino official or libmaple core
i think the various avr microcontroller works well too, it doesn't take a lot of speeds to scan keys
either way commercial keyboards 100 keys and more mostly use those little microcontrollers such as an equivalent of that stm32f103 mcu many even smaller and less feature rich than that
and microcontrollers avr, stm32, nxp, ti etc mostly has adc built-in which Rpi doesn't have.
Title: Re: Recommend a microcontroller
Post by: Jeroen3 on December 20, 2019, 12:44:43 pm
If you're on RPI level, you may as well stay at that level.
There is a new part which, imho, is going to get a big deal in IoT and embedded dense computing world.

The Tibbo PLUS1 (SP7021)
https://tibbo.com/store/plus1.html

Quad-core 1GHz Cortex-A7 CPU, plus ARM A926 and 8051 core.
Only 3.3V power input!
Title: Re: Recommend a microcontroller
Post by: Sal Ammoniac on December 20, 2019, 05:47:48 pm
Hi, can someone recommend me a microcontroller for project (im currently at rpi 3b+ just for prototyping) that uses ethernet ( UDP for OSC protocol/comunication), midi through USB, around 120 buttons (that i will handle through shift registers 165D, or you have better idea for this amount of buttons) and same number of leds (WS2812, so im just sending data to data in pin of led and it has +5v, gnd pin and data out..) + few slide potentiometers. Thanks in advance.  :-+ :-+


Parallax Propeller -- parallax.com

The Propeller can't do Ethernet. You'd need something like a WIZnet part to support that.
Title: Re: Recommend a microcontroller
Post by: brucehoult on December 20, 2019, 05:51:39 pm
If you're on RPI level, you may as well stay at that level.
There is a new part which, imho, is going to get a big deal in IoT and embedded dense computing world.

The Tibbo PLUS1 (SP7021)
https://tibbo.com/store/plus1.html

Quad-core 1GHz Cortex-A7 CPU, plus ARM A926 and 8051 core.
Only 3.3V power input!

8051? Are they insane? What on earth can it do that a Cortex M0 can't do? Except run assembly language software that hasn't been re-written in 35 years. But the people who neeeeeeeeed that would pay $200 a chip just as happily as $20.

I mean .. ok .. it's their money and I'm all in favour of letting it live or die in the market.
Title: Re: Recommend a microcontroller
Post by: SiliconWizard on December 20, 2019, 06:08:23 pm
If you're on RPI level, you may as well stay at that level.
There is a new part which, imho, is going to get a big deal in IoT and embedded dense computing world.

The Tibbo PLUS1 (SP7021)
https://tibbo.com/store/plus1.html

Quad-core 1GHz Cortex-A7 CPU, plus ARM A926 and 8051 core.
Only 3.3V power input!

8051? Are they insane? What on earth can it do that a Cortex M0 can't do? Except run assembly language software that hasn't been re-written in 35 years. But the people who neeeeeeeeed that would pay $200 a chip just as happily as $20.

I mean .. ok .. it's their money and I'm all in favour of letting it live or die in the market.

Well, this is odd for sure, but the reason seems pretty obvious... cost. A 8051 core can be added for virtually nothing, whereas an additional Cortex core would have added significant cost. (Well, since they already use 2 ARM cores, they may have gotten 3 for the price of 2, I dunno how ARM works these days... :-DD )

As to whether this chip will succeed market-wise, I also have some doubts.
Title: Re: Recommend a microcontroller
Post by: brucehoult on December 20, 2019, 07:59:37 pm
If you're on RPI level, you may as well stay at that level.
There is a new part which, imho, is going to get a big deal in IoT and embedded dense computing world.

The Tibbo PLUS1 (SP7021)
https://tibbo.com/store/plus1.html

Quad-core 1GHz Cortex-A7 CPU, plus ARM A926 and 8051 core.
Only 3.3V power input!

8051? Are they insane? What on earth can it do that a Cortex M0 can't do? Except run assembly language software that hasn't been re-written in 35 years. But the people who neeeeeeeeed that would pay $200 a chip just as happily as $20.

I mean .. ok .. it's their money and I'm all in favour of letting it live or die in the market.

Well, this is odd for sure, but the reason seems pretty obvious... cost. A 8051 core can be added for virtually nothing, whereas an additional Cortex core would have added significant cost. (Well, since they already use 2 ARM cores, they may have gotten 3 for the price of 2, I dunno how ARM works these days... :-DD )

If they didn't care about using the same ISA throughout, there are plenty of tiny free low performance RISC-V cores you can just grab off github. Ok, not *as* small as an 8051, but also not as low performance. Comparable to a Cortex M0, in fact :-)
Title: Re: Recommend a microcontroller
Post by: Jeroen3 on December 21, 2019, 11:07:58 am
I suspect an 8051 over cortex m0 (and aso ancient 926) for money reasons. Maybe surface area as well, I’m not sure.

And 8051 is fine for where you use it for here.
Title: Re: Recommend a microcontroller
Post by: coppice on December 21, 2019, 12:24:38 pm
If you're on RPI level, you may as well stay at that level.
There is a new part which, imho, is going to get a big deal in IoT and embedded dense computing world.

The Tibbo PLUS1 (SP7021)
https://tibbo.com/store/plus1.html

Quad-core 1GHz Cortex-A7 CPU, plus ARM A926 and 8051 core.
Only 3.3V power input!

8051? Are they insane? What on earth can it do that a Cortex M0 can't do? Except run assembly language software that hasn't been re-written in 35 years. But the people who neeeeeeeeed that would pay $200 a chip just as happily as $20.

I mean .. ok .. it's their money and I'm all in favour of letting it live or die in the market.
The DRAM content tells you its not a chip, but an MCM. Presumably the available die they could find which gave them the functionality they wanted had an 8051 core. Similarly the ARM 926 must have come with a fairly old die that did what they needed.

Title: Re: Recommend a microcontroller
Post by: rsjsouza on December 21, 2019, 12:48:53 pm
ARM926 is used at large for accelerators. It simply does the job it is supposed to do and its licensing is not that expensive.

An 8051 is indeed somewhat strange but I wonder if it uses a very tiny die area on a more modern process. That and the free license. 
Title: Re: Recommend a microcontroller
Post by: Jeroen3 on December 21, 2019, 01:16:50 pm
As far as I can tell this is the simplest chip on the market that you can run basic linux IoT stack on and have some realtime stuff going on with the 8051/926, all in one single non-bga package with a single supply, and it only needs external flash.

And all you can see is that it has an 8051?
Title: Re: Recommend a microcontroller
Post by: SiliconWizard on December 21, 2019, 03:20:37 pm
If they didn't care about using the same ISA throughout, there are plenty of tiny free low performance RISC-V cores you can just grab off github. Ok, not *as* small as an 8051, but also not as low performance. Comparable to a Cortex M0, in fact :-)

Hehe, would probably be much better here, but I bet this would still cost more for them. Implementing a "random" free core on github is not 100% failsafe and takes some work, with potentially no support. They likely had everything ready for the 8051, including possibly the layout (if, as suggested above, it's actually not all cores on the same die...)

And yeah, the 926 is oldish now and probably doesn't cost too much. The expensive part is probably the quad-core Cortex A7. I didn't see the specs of the 926 they used; how fast can it be clocked? It doesn't seem very competitive compared to the associated quad-core A7! (But likely reason to integrate it is for the Linux support I guess?)

Which all in all, makes this chip look like just an opportunistic arrangement rather than innovation.
Title: Re: Recommend a microcontroller
Post by: brucehoult on December 21, 2019, 04:26:16 pm
[Which all in all, makes this chip look like just an opportunistic arrangement rather than innovation.

Bearing in mind that for the same $20 or less you can get something like an Orange Pi Nano with the same or more RAM, faster quad core A7s, GPU, WIFI, and actual connectors for the ethernet and USB etc. Or a variety of NanoPi boards too.
Title: Re: Recommend a microcontroller
Post by: Jeroen3 on December 21, 2019, 05:09:41 pm
Which all in all, makes this chip look like just an opportunistic arrangement rather than innovation.
Do you know of any other competing parts? You can get lots of processors, but they all need external memory and are often only BGA.
Title: Re: Recommend a microcontroller
Post by: donotdespisethesnake on December 21, 2019, 09:38:09 pm
As far as I can tell this is the simplest chip on the market that you can run basic linux IoT stack on and have some realtime stuff going on with the 8051/926, all in one single non-bga package with a single supply, and it only needs external flash.


I don't get their sales pitch. There doesn't seem to be any dev board, software support or volume pricing. It looks like they did a one-off special for a customer and thought they would push some units onto the web site and see if anyone nibbles.

Unfortunately I've found with these niche specials they disappear as quickly as they appear, and if you need long product life you can stuck in a hole. A better option is to choose a more general purpose chip that is sold in the bucketloads and will be around for a long time.
Title: Re: Recommend a microcontroller
Post by: SiliconWizard on December 22, 2019, 02:21:09 am
Which all in all, makes this chip look like just an opportunistic arrangement rather than innovation.
Do you know of any other competing parts? You can get lots of processors, but they all need external memory and are often only BGA.

"opportunistic arrangement" didn't mean that it was useless. Integrating RAM is a bonus. The fact it's not BGA will mostly appeal to hobbyists or very small companies with very small volumes, otherwise BGA is not a problem at all these days. Which means that their market if there is any will be pretty limited.