Improved performance 5V Arduino Nano/Mega compatible  - Page 1
Forum section: electronics / projects

author: DC1MC
author_rank: Super Contributor
timestamp: February 02, 2023, 06:12:11 pm
content: HEAVY EDIT:This project initially wanted to produce an f Arduino NANO compatible board with an Nuvoton M0 core, that after a good investigation by the thread participants has been replaced with cheaper and more capable Cortex-M4F core.After important and useful feedback from the forum members, I've decided to design two boards as described:Nanoton:Arduino Nano compatible micro-USB connector, 30 pins, if everything goes well, is should be a performance/features increased drop-in replacement.Nanonton+:New design, software compatible with Nanoton (same MCU), USB-C connector, with more pins exported (for the EIB bus), an RGB led, 2 or 3 push-buttons besides the RST.Because of consistency and price (currently 1.66USD) on BOTH boards the M471SE6AE (LQFP64: Body Size 7 mm x 7 mm, Pin Pitch 0.4 mm)Full data sheet:https://www.nuvoton.com/export/resource-files/DS_M471M_M471R1_M471S_Series_EN_Rev1.00.pdf(attached here as well for convenience)Development kit:https://direct.nuvoton.com/en/numaker-m471r1for whom lives in Germany and want to contribute to the SW development, I can order extra, to spare transport costs.The manufacturer offers Eclipse/GCC based development IDE and packages for all the big contenders (Keil, IAR, ...). Also there is a pin configurator and a programming program, both graphical and command line.On both boards, there will be only one MCU, no USB to serial converter, as the MCU is capable of ICP/IAP programming, host and device USB.For "blanco" devices, the 6pin header will contain the SWD interface, used both for programming and debugging, I will attempt to produce an Arduino IDE compatible bootloader, using the IAP feature to program it over the USB port.I initially wanted to use 48pin package with 0.8 pitch for the Nanonton, but is actually physically bigger and who can't solder 0.4, will not be able to manually solder 0.8 as well, we'll leave this job to machines.Deliverables will be the zip archives to be given to JLCPB or whoever offers services, I may even try the assembly service of JLCPCB.Please let me know what you think about it and contribute with advice for the BOM and extra add-on like RTC battery/supercap and so on.Cheers,DC1MCEDIT: The development kit and 10 samples have arrived, pictures attached.

author: fchk
author_rank: Frequent Contributor
timestamp: February 02, 2023, 09:47:21 pm
content: For me the need for 5V operation is shrinking. Most things are 3V3 anyway now.For the few times where 5V operation made sense I used PIC24FV and dsPIC33EV. The dsPIC33EV runs at 140 MHz internal oscillator clock/70 MHz instruction clock, has up to 256k flash, up to 16k RAM, CAN, LIN, Motor control PWM, SENT, is Automotive qualified and is qualified to run even at 150°C (with only 40MHz instruction clock above 125°C). It's meant for power electronics where 5V outputs can drive larger power MOSFETs without needing extra gate drivers. Internally these chips run at 1.8 or 2.5V, only the IO ring uses the 5V supply directly. This is an example where 5V still makes sense.I'd drop the 5V requirement and use level shifters if absolutely necessary.And no, I'm not an Arduino user. I usually use the vendor tools directly.fchk

author: DC1MC
author_rank: Super Contributor
timestamp: February 02, 2023, 10:18:39 pm
content: @fchk - well, for me the need for 5V is there and growing, there are tons of Arduinos compatibles at 3V3 with STM32 and other chips, mostly nobody cares of them.On the other hand, the dsPIC33EV series, while a seemingly capable chip, has a bit of disadvantages: expensive, no real free toolchain for everybody and, oh God, the strange architecture, and most of all: Mouser when asked to show "Auf Lager" says "Es tut uns leid, für "dsPIC33EV" gibt es keine Ergebnisse." And that's a 52 weeks lead time from a main manufacturer and distributor for possible candidates from the series.I don't contest that for some industrial or targeted professional projects they may be ideal, but Arduino is the proletariat option.But you did give me an idea, I will place a 3V3 regulator + a jumper or solder bridge, the chip seem to work at both voltages, so that should broaden the appeal of it.Cheers,DC1MC

author: Infraviolet
author_rank: Super Contributor
timestamp: February 02, 2023, 10:25:12 pm
content: I agree that 5V is useful, but for a lot of things digital lines can all just be put through a MOSFET based level shifter to convert between 3V3 and 5V (works for input and output purposes).

author: DC1MC
author_rank: Super Contributor
timestamp: February 02, 2023, 10:30:07 pm
content: Quote from: Infraviolet on February 02, 2023, 10:25:12 pmWhy should I use 20 extra mosfets when I can change a jumper to switch the MCU voltage in between 5V and 3V3, actually where I would put 20 mosfets on a Nano sized board ?And I seriously want to see the schematic with this mythical one mosfet that works simultaneously for the input and output

author: Psi
author_rank: Super Contributor
timestamp: February 02, 2023, 10:34:12 pm
content: Quote from: DC1MC on February 02, 2023, 10:30:07 pmI would use a combined IO expander level converter chip.Then you have lots of 5V IO and the space needed is tiny.

author: DC1MC
author_rank: Super Contributor
timestamp: February 02, 2023, 10:44:34 pm
content: Quote from: Psi on February 02, 2023, 10:34:12 pmStill I don't see the advantage of replacing the native latency with I/O expander latency and increasing the code size and costs against switching a jumper, please help me here, for a "hat", or "shield", or whatever they call them, it may make sense, but for the main board?!?!

author: Psi
author_rank: Super Contributor
timestamp: February 02, 2023, 10:59:13 pm
content: Larger pin count AVRs tend to be expensive and all tap out around 20mhz, that's why manufactures don't tend to make Arduino compatible boards for them. A STM32 is much more powerful and much cheaper but at the cost of no native 5V logic output and limited 5V tolerant inputs.If you find this a problem then yeah, probably time to outgrow off-the-shelf Arduino and make your own board using a MCU that suits your needs. But usually 5V logic and high speed don't go together.I'm in the process of trying to get away from 5V. Everything I want to interface with is 3.3V and 5V mcus are getting expensive or just less cost effective.

author: DC1MC
author_rank: Super Contributor
timestamp: February 03, 2023, 05:36:27 am
content: Quote from: Psi on February 02, 2023, 10:59:13 pmThe whole purpose of this post was to outgrow the off the shelf offers for the 5V range and to offer a cost effective replacement with updated parameters. I have selected some cheap MCU with a reasonable Cortex M0 core as start point. I was hoping for guidance regarding all the question in the first post, but, so far, just got (in summary):- "But don't you heard thatbird3V3 is word, 3V3 is word, weeell everybody knows that 3V3 is a word...".- "I'm just using for 5V some high-end unobtanium dsPIC, that should make a nice, cost effective, Nano replacement...".- "Don't bother with 5V native, just put some mosfet on the 3V3 signals and they will auto-magically transform in 5V compatible, no, I won't come with a schematic of this magic circuit...."- "You can use a GPIO expander, screw latency and everything else, you only need to control some LEDs, do you..."- "You want to use a high(er) speed core, heh, high speed and 5V do not mix..."- "Do your own if you didn't like the off the shelf options, doh..."Aaaand we're back at the beginning...I don't want to mock the genuine attempts to help, but really is little related to the original project questions and scope, all these stuff doesn't really help or contribute with anything useful, so I guess I have to proceed and do aFait Accomplithingie, I think I've got a good candidate for the name.But being a hard-core optimist I still hope that some flower will grow in the pile of mist.Cheers,DC1MC

author: fchk
author_rank: Frequent Contributor
timestamp: February 03, 2023, 08:16:38 am
content: Quote from: DC1MC on February 02, 2023, 10:18:39 pmMany people get this wrong. Yes, it's not GNU, but is free enough to download and to use, and the Pro license is mainly intended for mass production where you can save $$$ by choosing the next smaller version.Quote from: DC1MC on February 02, 2023, 10:18:39 pmThis is also a popular lie. The architecture is rather similar to AVR (just wider), and the CPU core has nothing in common with the old 8 bit architecture most people know as PIC. Same for PIC32, which is MIPS32 in fact.Availability: yes, this is a problem, but it's the same everywhere.fchk

author: fchk
author_rank: Frequent Contributor
timestamp: February 03, 2023, 08:18:49 am
content: Quote from: DC1MC on February 03, 2023, 05:36:27 amMaybe the main takeaway is that 5V support is a non-issue anywhere else. The world has changed since the mid-90s and there is no way back.fchk

author: DC1MC
author_rank: Super Contributor
timestamp: February 03, 2023, 08:25:55 am
content: Quote from: fchk on February 03, 2023, 08:18:49 amGood then, it will be avintage Nano, everybody loves vintage around here, isn't that OK?

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 03, 2023, 08:59:31 am
content: I somewhat like the idea.To the 3.3V versus 5V argument relating speed, why is it then that the 3.3V 328P version is slower then the 5V version?But a problem I see with projects I do, is the need for a mix of 3.3V and 5V IO.As an example I made a proto to do some development using a STM32F103 based bluepill and a NRF905 transceiver module plus for debug info an I2C module for driving a 1602 display.The bluepill and the NRF905 module are 3.3V so direct connection, but the I2C module and the display are 5V. Even though the pins might be 5V tolerant I decided to use mosfet based level converters to interface between the two.The two 2N7000 mosfets provide the single transistor bidirectional digital level converters others wrote about. Might not work with high frequencies but have used it for I2C in several projects without problems.So having a faster 5V board sounds nice, but in this case would still need some level converters.

author: fchk
author_rank: Frequent Contributor
timestamp: February 03, 2023, 09:33:33 am
content: Quote from: pcprogrammer on February 03, 2023, 08:59:31 amBecause the 328 is manufactured in a rather old semiconductor process. The whole chip runs at the external Vcc level, and the transistors used there switch faster with higher voltages.Modern controllers like AVR128 or all PIC18F...J... and PIC18F...K... use a much lower voltage for the core and much smaller transistors (which are much faster because of less capacitance etc). Only the IO ring with the pin drivers runs at the external Vcc voltage. This is also much more energy efficient.fchk

author: djsb
author_rank: Super Contributor
timestamp: February 03, 2023, 12:07:42 pm
content: DC1MC,I think what you propose is a good idea. Not having to use the level shifters would help me a lot at work. We use the Arduino Nano and Uno and a 5V I/O compatible board which would save us money would be great. Making it compatible with BOTH 3.3v AND 5V would be even better (but you say the MCU is ALREADY usable with both). It would have to be COMPLETELY software compatible with the Nano/Uno codebase. The built in USB 2.0 interface would be a plus also.PS I'd go with a USB connector that is the most robust (so Type B as used on the UNO) or an option for this on the pcb.

author: DC1MC
author_rank: Super Contributor
timestamp: February 03, 2023, 12:23:39 pm
content: Quote from: djsb on February 03, 2023, 12:07:42 pmWell, I've decided in advance if I get ONE positive feedback, I will proceed, I'll try to make the BSP as compatible as possible with the exiting SW, some small changes may be needed, especially for projects that exploits the original 328P features, but this is life, blinky will work anyways.Now if you want to have an influence on the design, please do have a look at the data sheet (I'm thinking to do a Nano compatible with NUC029LEE and better but not-compatible variant with NUC029SEE, that will have a "classical" 8/16bit 6802 and friends bus, is a feature of SEE).Of course if you find on Nuvoton's offer a MCU that you consider to be more suitable, suggestions are welcome, it seems that no one likes USB-C connector, and I consider the Type B too bulky for Nano, maybe 4 the other one, so we meet in the middle with mini-USB like the original Nano.Cheers,DC1MC

author: tooki
author_rank: Super Contributor
timestamp: February 03, 2023, 05:25:27 pm
content: Quote from: DC1MC on February 02, 2023, 10:18:39 pmHuh? There are plenty of popular Arduino framework compatible 3.3V boards, including STM32 and ESP32 boards. Some are also physically compatible with Arduino (like the STM32 Nucleo series).5V is sometimes handy — and when I absolutely need that I will often grab an Arduino Uno — but most of the time, I just use 3.3V and call it a day.As for the port: first choice USB-C, second choice either micro-B or standard B. Just not mini-USB, which needs to shrivel up and die.

author: Psi
author_rank: Super Contributor
timestamp: February 04, 2023, 01:59:11 am
content: IO Expanders don't have to be annoying to use. If you pick one that can do SPI at the speed of your MCU, or near it with a couple of NOP()s, then you can simply clock data in or out in real-time as you want to read write it the pin.And you can setup macros to do it all for you so your code reads normal.IO Expanders can get annoying when you don't have the spare cycles to wait for the SPI/I2c data to clock out.So you have to use a function/macro that only schedules the SPI/i2c write which happens later via interrupt.Or when you need to put I2C/SPI/UART data on the IO Expander pins.

author: DC1MC
author_rank: Super Contributor
timestamp: February 04, 2023, 07:07:41 am
content: @tooki - no micro-USB will be in a design of mine, the Nano like board with LEE will have micro-USB like the original Nano, the "advanced" board, with SEE and 40 pins, will have USB C connector. The 3V3 variants that nobody cares, is not that they aren't significant or super widely used, nobody cares to make a new one because most of the sweet spots for that platform have been already reached.@psi - I have selected an MCU that works at 5V as well as 3V3, I'm interested in using it at 5V, you prefer 3V3, no problem, so for the moment this issue is solved. There is no need for I/O expanders to be used on base board, they can be added externaly if needed.Generally speaking, I'm planning two boards, one as much as possible compatible with Nano, with NUC029LEE (7x7mm LQFP44) and one, an extended version with 40pins and the EBI bus out with NUC029SEE ( 7x7mm LQFP64) and USB-C connector to make it a bit future proof. because the belly of the boards will be free from the USB-to-Serial programming chip, both boards will get a RTC battery holder (or soldered battery for really low budget), I'm open for suggestions of what to place on the rest of the belly area that will be uesfull but not increase the costs too much.Now that the 3V3 vs. 5V topic has beenuntil it become a hamburger patty, maybe we can let it rest and the knowledgeable people have a look at chosen MCU, eventually suggest another one from Nuvoton, that has a similar packaging, and better performance or peripherals (multimedia excluded).Why Nuvoton, one because is not Mainland Chinese or mainstream, two because I can get reasonably cheap and easy chips from their portfolio and three, and the most important, YOU can get reasonably cheap and easy chips. I tried to avoid either mainstream manufacturers, or the extreme obscure ones and I think that Nuvoton fits well the middle ground.Also when suggesting better alternatives IYNSHO, kindly please remember the scope of the project, that is practically a MCU on a PCB, attempting to be cheap, but with a bit of performance, avoid astronautic, automotive grade, mainstream stuff, that is plundered by everybody and unobtainable since 2020, also lets further restrict the architecture to ARM Cortex-M compatibles capable to run at 5V.Any useful advice or suggestion will be thanked and appreciated, any contrarian, "muddling the water" and "poisoning the well" shite will be ridiculed and/or ignored.Thanks and cheers,DC1MC

author: Psi
author_rank: Super Contributor
timestamp: February 04, 2023, 07:11:45 am
content: Quote from: DC1MC on February 04, 2023, 07:07:41 amI prefer to run it at whatever voltage makes sense for the circuit.But i don't really interact with many MCUs that can run at 5V and are also high speed, It's usually a decision between sub 20mhz and up to 5V or over 20mhz and under 3.4V. There are exceptions obviously.

author: DC1MC
author_rank: Super Contributor
timestamp: February 04, 2023, 07:32:59 am
content: Quote from: Psi on February 04, 2023, 07:11:45 amPlease, please, pretty please, with sugar on top, let the voltage shite restAlso, it is worth mentioning, for whom didn't realize yet, that the fact the core runs at a higher-speed, it doesn't mean that it HAS to run at that speed, but offers better latency at processing, lower jitter for RT tasks and the possibility to actually sustain comfortably the USB transfer rate. Yes, a 5V signal, given the same slew rate, will reach its logical 1 or 0 levels slower than a 3V3 logic, and even slower than a 2V5, 1V2 or 0V9, that's not the point, one could use LVDS if they need speed, we are talking here about improved Arduino-like stuff.

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 04, 2023, 07:55:15 am
content: You could also consider the M471 or the M4521 series of the Nuvoton MCU's. These are Cortex M4 which brings a bit more power to the table, which can make it interesting for people that need a bit of DSP. Did not look into availability and pricing, but they do run from 2.5V to 5.5V according to the website and there are versions with USB 2.0 FS host/device interfaces.https://www.nuvoton.com/products/microcontrollers/arm-cortex-m4-mcus/m471-series/https://www.nuvoton.com/products/microcontrollers/arm-cortex-m4-mcus/m4521-usb-series/Might even be that they are pin compatible with the ones you mention, which would be better, because the PCB can be the same for both versions.

author: DC1MC
author_rank: Super Contributor
timestamp: February 04, 2023, 10:06:40 am
content: Quote from: pcprogrammer on February 04, 2023, 07:55:15 amTHIS ^^^, exactly this is the type of reply I was expecting, the M4 and M4F cores looks nice, and the price difference from the original candidates for LQFP44 and LQFP64 packages is not big, I will make a list with "worthy candidates" and let discussion participants vote, eventually a qualified vote (with arguments, but sane.Thanks and cheers,DC1MC

author: DC1MC
author_rank: Super Contributor
timestamp: February 04, 2023, 12:44:19 pm
content: Dear thread participants and potential interested, I have shortlisted some device in an Excel file attached to the first post, unfortunately I could only attach two of the three datasheets, I'm attaching it the last one here for the 471 series.The prices are interesting and a bit unexpected, so please have a look, a good overview is in the Excel file, I think I was able to catch all the features, if is not there, it will probably doesn't have it.Many thanks,DC1MC

author: coromonadalix
author_rank: Super Contributor
timestamp: February 04, 2023, 01:07:16 pm
content: I too would need a more powerful "uino" variant 5vdc i/o tolerant, yeah 3.3v interfaces / levels shifter exists .... chice is made thks opbut i need simpler "direct" interfacingpricingi would go as far at 15-20$ cad / single board if the design is solid and practicalI have a mega, never played lot with it compared to 32u4 variants, or uno ..... even one with an real db9 serial port was fun (yeah they still exists loll)About time the use of an usb-c plug, and a rock solid one will be good, others are too easy to rip off the pcba good reset circutry once programmed, and the famous pin 13 led ....... if you get the idea, just put a way to recover the pin if we need it lolll say a smt jumper

author: ledtester
author_rank: Super Contributor
timestamp: February 04, 2023, 01:14:28 pm
content: WCH makes devices which operate at 5V with "GPIO synchronous supply voltage", e.g. the CH32F103* series:http://www.wch-ic.com/products/CH32F103.htmland also have a look at the CH32V003* which was featured recently in EEVblog 1524:https://www.eevblog.com/forum/blog/eevblog-1524-the-10-cent-risc-v-processor-ch32v003/The CH32V003 datasheet:http://www.wch-ic.com/products/CH32V003.htmlA quick perusal seems to indicate that the GPIO pins operate at the supply voltage.

author: coromonadalix
author_rank: Super Contributor
timestamp: February 04, 2023, 01:27:26 pm
content: The F4U6 or F4P6 seems pretty good ?

author: Messtechniker
author_rank: Frequent Contributor
timestamp: February 04, 2023, 01:41:13 pm
content: Quote from: djsb on February 03, 2023, 12:07:42 pmI would vote for the same. i.e. use the USB connector type with the higher number of mating cycles.

author: DC1MC
author_rank: Super Contributor
timestamp: February 04, 2023, 01:50:45 pm
content: Quote from: coromonadalix on February 04, 2023, 01:07:16 pmAny of the MCUs that you'd like to have ?

author: DC1MC
author_rank: Super Contributor
timestamp: February 04, 2023, 02:00:37 pm
content: Quote from: Messtechniker on February 04, 2023, 01:41:13 pmThe Wikipedia says the following:QuoteSo it may be that most suitable for you will be the Nanoton+, the C connector has a really massive mating cycles and is bidirectional. But I will keep the mini for the Nano look-alike for existing projects compatibility reasons.GENERAL question: For Nanonton+ do you thing is a good idea to make it 25 or 50mil wider, I'm trying to keep the original Nano width, but the 64pin MCU is a bit wider, it will make the board routing easier, but sticking it in a perf board will be hindered, usually they're pretty narow ?Cheers,DC1MC

author: coromonadalix
author_rank: Super Contributor
timestamp: February 04, 2023, 02:46:09 pm
content: of for the usb connector, ive seen some pcb pads for the "B" while you use anonther usb socket ? if you dont like it remove it ? and use the padsFactor size is indeed a problem, but if made larger it will fit other rows of joined breadboards, while not fitting on the same breadboard or enlarged enough just to leave 1 row of pins each side ??

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 04, 2023, 02:49:08 pm
content: Quote from: DC1MC on February 04, 2023, 02:00:37 pmSince it will have more pins then the nano, I think it is best to keep it on a 100mil boundary for the interface pins. This way it can still be used with prototype boards and breadboards. For the latter there should at leas be room on either side to insert a wire into the breadboard.On a prototype board there is room in the holes to mount the headers at an angle, but this only helps if the Nanoton+ comes without pre soldered headers.P.S. I see you using Nanoton+ and Nanonton+. I guess a typo?Quote from: coromonadalix on February 04, 2023, 02:46:09 pmThat is a good idea, because sometimes it is useful to have a header (solderd on the pads) for direct placing within a computer case and make use of the computers internal USB headers.

author: coromonadalix
author_rank: Super Contributor
timestamp: February 04, 2023, 02:51:39 pm
content: Usb ports yeah or even adding 4x header pins who could fit the usb standard ? +5vdc d+ d- ground, but an unpopulated usb B pads could be perfect loll"bigduino" would have been fine loll

author: djsb
author_rank: Super Contributor
timestamp: February 04, 2023, 02:56:29 pm
content: 0.1 inch pin row spacing multiples would be best. What is the priority? Strict Nano form factor, or will it fit into a breadboard? Depends on if you want to move easily from a breadboard to an adaptor board or if you can make a custom PCB for the non standard width. Could you make it the standard Arduino Nano width but with castellated pins so that theses flexypins can be usedhttps://hackaday.com/2022/03/07/flexypins-might-help-with-those-pesky-castellated-modules/

author: DC1MC
author_rank: Super Contributor
timestamp: February 04, 2023, 03:27:59 pm
content: The Nanonton (Nano loo-alike) will be fully size/pins/connector compatible, a drop-in replacement, the Nanonton+ (the new design with USB-C connector) will be 100mil wider to still fit in the breadboard, I 'll have to see if we can mix some C and B pads together on it to be able to solder one or the other, if not at least some non-connector footprint pads.The 6pin heade will get the SWD port signals, and it could be used for blanco and for people that hate bootloaders, even if I understood correctly the ICP should be possible with just BootROM and the USB. The SWD will be useful for debugging.No votes/opinions for the MCUs at all, don't make me choose, we/I may regret later, vote now !!!

author: djsb
author_rank: Super Contributor
timestamp: February 04, 2023, 03:56:40 pm
content: Please give us all time to read the datasheets properly. Thanks.

author: DC1MC
author_rank: Super Contributor
timestamp: February 04, 2023, 04:08:06 pm
content: Quote from: djsb on February 04, 2023, 03:56:40 pmSure, by all mean take your time and read the datasheets, at the time of the posting I've seen that they were only three downloads of the excel with the candidates, but I guess three is better than none.Thanks and cheers,DC1MC

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 04, 2023, 04:38:16 pm
content: I vote for the M471 or the M4521 since they seem to be pin compatible it does not matter that much which of the two.There is also the issue of the Arduino framework that needs to be looked at. I presume a lot of the work for the STM32 based MCU's could be reused to make it work. I myself won't use it for projects due to being more of a bare metal guy, and also won't be using a lot of them either. Just a hobbyist with some projects I would say

author: ledtester
author_rank: Super Contributor
timestamp: February 04, 2023, 04:46:41 pm
content: I am unable to open the zip file in the first post.On my Mac (running Big Sur) it reports that it is an unsupported format.My Chromebook says simply "Could not open NanotonProductSelection.zip".Update: Just thought of this... is the .zip file really an .xls file?Update 2: Ok, I uploaded the .xls as a Google sheet:(Nanoton Product Selection Guide)

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 04, 2023, 05:08:47 pm
content: Change .zip to .ods, worked for me on linux. Opened with libreoffice Calc

author: djsb
author_rank: Super Contributor
timestamp: February 04, 2023, 05:09:32 pm
content: The M471 looks quite feature rich with the software test library (not sure exactly how that helps, but it sounds good). The one with the 0.5mm pin pitch might help with routing (not sure, as I've never had to route such small parts on a PCB).

author: coromonadalix
author_rank: Super Contributor
timestamp: February 04, 2023, 06:29:41 pm
content: Quote from: pcprogrammer on February 04, 2023, 04:38:16 pmvery good pointIDE play an important role ... bootloader too if needed to be flashed too ?? thats why you had an second mcu on the arduino's, it could help flash the main mcu ??how to start the board from scratch ...for the form factor you could go as an "old uno" footprint / sizeif you get an mcu with all the gpio's, the design can be bigger ... do you require a reset button ??before ordering some pcb, you could output an 3d view to get an idea ??EDIT dont use castellation, it was a nightmare at my job, pcb quality was bad, they shorted themselves outstandard headers pinout spacing is ok, if someone need them, just add them / solder them

author: DC1MC
author_rank: Super Contributor
timestamp: February 04, 2023, 07:23:48 pm
content: GENERAL ANNOUNCEMENTS:To respond to a concern privately expressed: no, I'm not sponsored or affiliated with Nuvoton in any way, shape, or form, I'm not that smart for it, this project is a personal project, not any kind PR or marketing campaign (also no prizes for the winner but I will make sure that contributors will be offered a board of their choice at transport costs, DE free), but I welcome such a sponsorship of the project.Now it seems that for Nanoton+ the 471 is leading the race with 5421 willing to take its place. It can even do crystal-less USB device, now, who will take the Nanoton trophy, another 5421 or the venerable 029, stay tuned!!!I understand that castellation is not really loved, so it won't be in Ver. 1.0, object now or never !!!The BOM competition is starting to get hot, looking for 32768 crystals that you have experience with and can recommend. Also a proper 5V USB to 3V3 regulator of at least 1.2A.MANY THANKS TO ALL THAT OFFERED INSIGHT AND SUPPORT !!!!Cheers,DC1MC

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 05, 2023, 06:37:39 am
content: Quote from: coromonadalix on February 04, 2023, 06:29:41 pmWith SWD exposed on header pins there is no real need for a second MCU. ST-link v2 clones are still not to expensive and will most likely work with these MCU's too.It might also be that the M471 or M4521 has DFU ability.For Arduino framework compatibility I suppose a proper bootloader needs to be setup. Should not be that big of a problem.About the regulator, what I have seen used a lot is the AMS1117 3.3V, but the max current is 1A.http://www.advanced-monolithic.com/pdf/ds1117.pdfIs the additional 200mA a real need?Edit: noticed that I forgot to add additional before the 200mA

author: DC1MC
author_rank: Super Contributor
timestamp: February 05, 2023, 09:02:23 am
content: GENERAL:Quick question: where should we put the two serial blinky LEDs on Nanoton, on some separate I/O pins, or remove them all, there is no USB-Serial converter anymore ?The power LED stays I guess, the controllable LED for the most important sketch evershould be on separate I/O, or on an outside routed one, then we'll the known pin D13/SCK issue, is anyone's project depending on this LED being outside routed ?Also what LEDs (beside power) want to have on the Nanoton+ ?Cheers,DC1MC

author: djsb
author_rank: Super Contributor
timestamp: February 05, 2023, 09:34:09 am
content: Two blinky LED's are essential in my opinion to prove that the programming has worked. Maybe just one R G B could be provided (NOT a fancy addressable type), with each of the 3 separate LED's being on their own pins. Could a couple of momentary switches be squeezed in as well?

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 05, 2023, 09:58:58 am
content: A single led to allow a blinky sketch is enough I would say. A RGB led is just fancy extra, but if the board size and free pins allow for it why not, but having as much as possible pins routed to the outside is preferable, at least for the + version.One thing tho consider is the boot mode selection. The bluepill way is a bit bulky to my taste. Rather see some small buttons for it. But it depends on the MCU and how it wants it of course.Edit: I'm looking in the manuals about the boot mode, and it looks different to what I'm used to with the STM32 MCU's. Have to study it a bit more to understand what a bare chip brings.Edit2: The reference manual provides the needed information. Chapter 6.4 about the flash memory controller shows that it has either 128KB or 64KB of flash for the application program, an additional 4KB for a boot loader and a configuration part. It looks like there are no external select pins as on the STM32 MCU'shttps://www.nuvoton.com/export/resource-files/TRM_M471M_M471R1_M471S_Series_EN_Rev1.00.pdf

author: DC1MC
author_rank: Super Contributor
timestamp: February 05, 2023, 10:59:29 am
content: OK then, I'll route the LEDs on spare (not exported) I/O and try to do some blinkerei in the boot-loader to give a visual cue about loading, otherwise the LEDs will be free for use. Also on all the boards I will NOT route any led on the connector signals to not screw up the signalingOn Nanoton+ I will try besides the power LED to have an RGB led, the control pins will most likely PWM capable, so one could do a RainbowLED (TM)Also on Nanoton+, another switch besides the RST should be OK, or yet another one may prove useful ?Cheers,DC1MC

author: DC1MC
author_rank: Super Contributor
timestamp: February 05, 2023, 12:03:31 pm
content: So here we go, to keep it consistent M471SE6AE has won on BOTH categories, I was thinking the maybe on the Nano compatible one to use a 48pin package but it doesn't make sense, will get better software support and even qty. discounts for using the same MCU that seem to have a drop-in replacement as well. Sorry for the hand soldererswithout AmscopePlease re-read the first post, I've edited it to reflect the current situation.Now accepting suggestions of the pinout (both external and LED/buttons), a simple list is enough, an (editable) schematic will be lovely. Please try to keep Nanoton+ as compatible as possible to Nanonton just with extra pins (if possible and make sense, if not, go wild.Cheers,DC1MC

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 05, 2023, 12:32:07 pm
content: Did you look into the SWD programming?For what I found Nuvoton offers some tools on github (https://github.com/OpenNuvoton/Nuvoton_Tools) and mention openOCD, but the firmware for the interfaces seems to be closed source, and the NU-LINK2-PRO they point to is bloody expensive. Have not checked if there are cheaper options available.Pre loaded boards make it usable with Arduino framework and maybe usable for partial bare metal, but for those who do like full bare metal it would be nice if reusing ST-Link devices was possible.

author: DC1MC
author_rank: Super Contributor
timestamp: February 05, 2023, 12:44:18 pm
content: Quote from: pcprogrammer on February 05, 2023, 12:32:07 pmGood question, here's my solution:The development kit for the MCU, mentioned in the first post, costs 26USD + 20USD Shipping:https://direct.nuvoton.com/en/numaker-m471r1The devkit is panelized, like the ST Nucleo boards and it has aST-LinkNu-Linkprogrammer that can be detatched to be used for programming of the empty or software damaged boards.The "professional" NULink has strange features (like limiting the number of programing times on a specific device !!!) and I couldn't care less about it.I'll attempt of course to get a programming protocol documentation, or just observe it with LA to see how far away form the ST link is, I think as well that it may not be that far.For people that want to be involved in the software development and live in Germany or around, I can order a few extra devkits to spare the costs, or you can get them on your next Digikey order where is seem to be available.Even in EU but outside of DE, we should be able to find a cheaper shipping option.Cheers,DC1MC

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 05, 2023, 02:26:46 pm
content: I found this one on aliexpress. Not as cheap as an ST-link clone but way better than the USD 149 for the prohttps://nl.aliexpress.com/item/32815222785.htmlEdit: Also found the same as you mention but it is more expensive.https://nl.aliexpress.com/item/1005004788738430.htmlI do wonder if buying from nuvotondirect is charging TVA for selling in Europe. Could not find any info about it with a quick scan. If not you have to add the TVA and the duties the postman charges.

author: spostma
author_rank: Regular Contributor
timestamp: February 05, 2023, 03:21:24 pm
content: a tiny suggestion; also allow SMD mounting of the board by having one-and-a-half drilled hole(castellated 'post stamp' + through hole pads) like ESPxxx modules often have (detail attached)

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 05, 2023, 05:05:33 pm
content: On the subject of programming, it looks like it does work with the ST-Link device, at least according to this post:https://www.eevblog.com/forum/microcontrollers/any-experience-with-nuvoton-mcus/msg4315357/#msg4315357

author: DC1MC
author_rank: Super Contributor
timestamp: February 05, 2023, 07:21:04 pm
content: Quote from: pcprogrammer on February 05, 2023, 05:05:33 pmAs expected then, the SWD host is also interesting on those bakemons of a MCU, too bad they're 3V3, but maybe sometime we'll get some board with them as well, they're just a bit more expensive.In the meantime let's focus on our guys hereCheers,DC1MC

author: DC1MC
author_rank: Super Contributor
timestamp: February 05, 2023, 07:23:11 pm
content: Quote from: spostma on February 05, 2023, 03:21:24 pmWell, I was of the impression that most people doesn't lake castellation, and mind changes, I guess we could do it if JLCPCB offers it, in the end we are still taking about Arduino clones, hot high-end boards ?Cheers,DC1MC

author: tooki
author_rank: Super Contributor
timestamp: February 06, 2023, 09:06:49 am
content: Quote from: DC1MC on February 04, 2023, 07:07:41 amI assume you meant to say “no mini-USB will be in a design of mine”?Quote from: DC1MC on February 05, 2023, 07:23:11 pmThat’s a strange conclusion to arrive at, since two people spoke out in favor it it, and just one person spoke out against it (not because they don’t like the idea, but because it’s harder to manufacture).Quote from: DC1MC on February 05, 2023, 07:23:11 pm”High-end boards” like $3 ESP32 modules?!?It’s certainly not something limited to expensive boards.

author: DC1MC
author_rank: Super Contributor
timestamp: February 06, 2023, 09:44:02 am
content: @tooki - We'll give it a try, we couldn't dream to reach the volumes of the "$3 ESP32 modules", and JLPCB says that they have two castellation processes, the standard one, where they say errors may appear and a bit more expensive one that is quality guaranteed. We'll cross this bridge when we'll reach it, in the meantime and in the light of the latest developments (please see the edited first post), are there any suggestions for the pin assignments for both modules ?I really want to put this show on the road, so I'll start doing it myself if none jumps, but I want to avoid duplication of the effort, but if there are no volunteers until the evening I'll start working on it.Cheers,DC1MC

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 06, 2023, 10:33:20 am
content: For the plus version it does not matter I think. Keep the port order along the pins or maybe create a proper bus arrangement based on the EBI.It is the EBI bit that I find interesting as a way to allow reusing a lot of old 5V hardware I have lying around.The Arduino nano compatible version does not lure me at all.

author: DC1MC
author_rank: Super Contributor
timestamp: February 06, 2023, 05:45:23 pm
content: Quote from: pcprogrammer on February 06, 2023, 10:33:20 amPerfect, somebody gets it, so Nanoton+ will be born firstCheers,DC1MC

author: DC1MC
author_rank: Super Contributor
timestamp: February 07, 2023, 08:09:13 am
content: Hello, after looking a bit closer on the chip I have a couple of news for Nanoton+ and some questions and news:- First the bad news: 40pins are not covering enough of the features, is either 2x26 52 (ca. 66x25.4mm) for full coverage, or 2x32 64 (82x25.4mm) for eventual future expansion, please let me know your opinion about what you think is best and what you you'll prefer. Not very Nano anymore, but at least there will be enough place for LEDs and buttons (the sizes given are the max outline sizes).- A good news: There is an independent digital domain power pin Vddioand 6 I/O in this domain PE.13 to PE.8, the Vddiocan go in between 1V8 and 5V. As for the functionality one can configure there either a SPI port, a UART (with control signals) or an I2C, and so we can finally satisfy the people saying that "well, I like 5V but I have this 3V3 or 1V8 module...". Youpiee- A question: there is a band-gap analog reference of 1.21V for the ADC, should we leave it decoupled but un-exported, or should we export it, for people to do unspeakable things to it?-Last call for the forum members living in DE (5.99) or EU(13.99) that want to have a development kit and/or some parts, I will place the order tomorrow evening and find out the VAT situation, you can piggyback on my order if you like or I can piggyback on yours if you also plan.Cheers,DC1MC

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 07, 2023, 09:30:47 am
content: I opt for 2x26 pins to have full benefit of the MCU.The fact that 6 pins can work on a different voltage is very nice. What setup do you have in mind to control this voltage?About the ADC ref voltage I don't mind if it is only decoupled on the board and not available on the pins.I will wait for the finished board and it's pricing before jumping on the bandwagon.

author: djsb
author_rank: Super Contributor
timestamp: February 07, 2023, 09:44:42 am
content: I'm just keeping an eye on developments at the moment. Will this project be open source, and will it use KiCad for the PCB design? Will the source code also be open source? Are we free to download the design files for local adaptation?

author: DC1MC
author_rank: Super Contributor
timestamp: February 07, 2023, 09:49:20 am
content: Quote from: pcprogrammer on February 07, 2023, 09:30:47 amThe Vddiocan be either controlled from outside or tied to the 3V3 on-board LDO that I will put for the people that want to use the whole system at 3V3, I think (pins permitting) I will export it as well and put a big fat 0ohm R or a jumper, because the moment we'll make it permanent to 3V3, there will be voices asking for 2V5, 1V8 or even 5V, so rotating R will be (5V, 3V3, outside voltage).Also what about Vref?Cheers,DC1MC

author: DC1MC
author_rank: Super Contributor
timestamp: February 07, 2023, 01:21:21 pm
content: Quote from: djsb on February 07, 2023, 09:44:42 amQ1) Will this project be open source ?A1) Yes, open source as stated in the beginning.Q2) And will it use KiCad for the PCB design?A2) Maybe, if someone offers to help to do the design in Kicad, the friend that offered help is an Altium professional and is the only way to get the proper full manufacturing package for JLCPCB including BOM and technology stuff (castellation and so on), nobody offered here, I'll see about maybe someone will jump after the schematic solidifies. If someone offers to either import, or redo the project in Kicad is most welcome.Q3) Will the source code also be open source?A3) Yes, with GitHub page.Q4) Are we free to download the design files for local adaptation?A4) Yes, I'll be glad to have "baby projects" out of it, but please pay attention the OSHW license !!!Unasked Q1) How would you expect to make money out of it ?Unasked A1) Well, I really don't, is mostly and itch to scratch for me, but I'll do offer SW support, accept proprietary changes and maybe offer the boards in a commercial setup if they pick up speed, I do wish German government will be less bloody hostile to microcompanies, not anybody could be Zalando.Cheers,DC1MC

author: djsb
author_rank: Super Contributor
timestamp: February 07, 2023, 01:36:04 pm
content: I might have a go at importing the Altium files into Kicad 7.xx, and then they can be shared. What version of Altium Designer is going to be used? Thanks.

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 07, 2023, 02:28:04 pm
content: For a review by me or others on the forum, a pdf export of the schematic and pcb layers is probably the easiest.As a hobbyist I use EasyEDA to draw schematics and pcb's. Have used JLCPCB for making the pcb's, and that was easy since they are affiliated, but have no experience with their full assembly options, so no help there.

author: DC1MC
author_rank: Super Contributor
timestamp: February 07, 2023, 03:12:35 pm
content: Quote from: pcprogrammer on February 07, 2023, 02:28:04 pmPreliminary PDF files will definitely be published here for constructive criticism and improvements, until we reach a feature stable version agreed of most of the interested, then the PCB v1.0 will be produced.The MCU version with 0.8mm pitch is really in a BIG package, 14x14mm, and even with latest widened format it may prove difficult to route, it does have the advantage of still being able to be hand soldered without pasta, stencil and oven, the 0.4mm 7x7 intended to use originally is better left to machines. But in the rather unlikely eventuality that we'll be able to place the big guy, then I/you should be able to solder everything by hand if needed without the need to use assembly services.Cheers,DC1MCP.S @pcprogrammer: Would you like to use EasyEDA to design this stuff as well? Mostly asking for PCB.

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 07, 2023, 04:33:03 pm
content: Quote from: DC1MC on February 07, 2023, 03:12:35 pmSure, I can give it a try.

author: DC1MC
author_rank: Super Contributor
timestamp: February 07, 2023, 08:04:17 pm
content: This is my EBI-centric attempt to assign the pins in the 52-pin frame, if someone has any better, argumented proposal, kindly please edit and post, also if I forgot something obvious.nRESET 1 27 VINEBI_NCS0 PD.8 2 28 GNDEBI_ALE PD.9 3 SWD 29 3V3EBI_nRD PD.1 4 30 GNDEBI_nWR PD.2 5 31 VBATEBI_MCLK PD.3 6 32 GNDEBI_ADR16 PD.12 7 33 PD.0EBI_ADR17 PD.13 8 34 PB.15 EBI_NCS1EBI_ADR18 PD.14 9 35 PB.4 EBI_AD7EBI_ADR19 PD.15 10 36 PB.5 EBI_AD6EBI_AD8 PC.0 11 37 PB.6 EBI_AD5EBI_AD9 PC.1 12 38 PB.7 EBI_AD4EBI_AD10 PC.2 13 39 PA.3 EBI_AD3EBI_AD11 PC.3 14 40 PA.2 EBI_AD2EBI_AD12 PC.4 15 41 PA.1 EBI_AD1EBI_AD13 PC.5 16 42 PA.0 EBI_AD0EBI_AD14 PC.6 17 43 PB.0 EBI_nWRLEBI_AD15 PC.7 18 44 PB.1 EBI_nWRHPE.8 19 45 PB.2PE.9 20 46 PB.3 EBI_ALE*PE.10 21 47 PD.7 EBI_nRD*PE.11 22 48 PF2PE.12 23 49 3V3PE.13 24 50 PF.6 ICE_DATVDDIO 25 51 PF.5 ICE_CLKGND 26 USB 52 GND

author: DC1MC
author_rank: Super Contributor
timestamp: February 08, 2023, 08:42:34 am
content: No feedback on the pin assignment, should I proceed ?NEWS: Some MCUs and dev kit, ordered order is processing.Cheers,DC1MC

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 08, 2023, 12:24:10 pm
content: You seem to be in a rushDid not see your post about it untill this morning, due to my early bedtime, and had no time to respond due to other business.One thing about it is a missing 5V output/input pin, and what are the specs for the vin pin. For the rest it looks good.I know the idea is to have selectable supply voltage for the MCU, but I think it is best toward the outside world to have the voltages at fixed given levels on the pins.

author: DC1MC
author_rank: Super Contributor
timestamp: February 08, 2023, 03:26:55 pm
content: All pins will have fixed voltages, except Vin (2.5 -5.5V) main MCU power, and Vddio that will be selectable, by default tied to the MCU main power supply, the enterprising people will move Vddio to other provided powers moving the onboard R to one of the three positions.I think we can live with this, what say you gentlemen ?Cheers,DC1MC

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 08, 2023, 04:07:05 pm
content: So vin is the MCU supply and not like on the Arduino nano the allowed range 7V-12V to be regulated to 5V.I thought the idea was to have it run on either 5V or 3V3 with a jumper or 0 ohm resistor selector option.How do you see it in relation to the USB 5V supply?

author: DC1MC
author_rank: Super Contributor
timestamp: February 08, 2023, 06:24:07 pm
content: Sorry, fully confused, discard the previous answer, the Vin is indeed the unregulated unregulated supply as Arduino, the output is 5V and 3V3, the MCU could run at at 5 or 3.3V, the 3V3 will be exported for Vddio and external modules, onboard one could select the MCU in between 5/3.3V, the Vddio separately between 5/3V3/external and I will consider the USB as 5V, have to make a descriptor to request 1A and that's it. Maybe on a later variant I will put a real USB-C power management to request different voltage to feed some SMPS do get more power for the external modules, but for now I will stay with LDOs, to see how the SW and the whole MCU performs.Cheers,DC1MC

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 09, 2023, 12:44:55 pm
content: Added the MCU to the symbol lib.Attached is a picture of it.I filled in all the alternate functions and ordered the pins per port, which makes it big, but does provide more information then just PA.0, PA.1 etc.Still have to look into the footprint. Just hooked it onto a standard one from EasyEDA, but don't know if that is a good fit.

author: DC1MC
author_rank: Super Contributor
timestamp: February 09, 2023, 01:16:50 pm
content: @pcprogrammer - Thanks a lot, I will review it ASAP.General news: The dev kit and the few MCUs will arrive at 14.02 with DHL Express. I hope they will not rape my wallet for doing the "service" of paying VAT themselfs to the Zoll as I've heard. Let's see.Cheers,DC1MC

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 09, 2023, 02:41:10 pm
content: Quote from: DC1MC on February 09, 2023, 01:16:50 pmI would start saving some spare change if I was youIt was before the new VAT setup, but I had ordered a big bunch of PCB's from JLCPCB and they used DHL to ship them (Did not even have a choice in it due to the price) and because of the fact that it was over a certain amount, DHL charged not only VAT on the PCB's but also on the shipping costs and added an administrative fee as well. Was a bit of a downer, but the PCB's were still cheap.

author: DC1MC
author_rank: Super Contributor
timestamp: February 10, 2023, 08:54:57 am
content: I have decided that USB voltage is too crappy/dangerous to be considered a "proper" 5V.So I will merge (via Schottky diodes) Vusb and Vin, build an unregulated power rail out of it and (as much as I hate it) put it in a switcher capable to eat 3-12V and put out either 3V3 or 5V (and/or for dual output luxury variant). The problem is that I don't really know what device to use that is available, not obscenely priced and fit the bill.So kindly please offer your suggestions.Cheers,DC1MC

author: tooki
author_rank: Super Contributor
timestamp: February 10, 2023, 08:58:19 am
content: Quote from: DC1MC on February 10, 2023, 08:54:57 amThat’s ridiculous. Millions of Arduinos and clones (and countless other devices) successfully run off USB 5V.Quote from: DC1MC on February 10, 2023, 08:54:57 amDo that in a later version if it actually proves necessary.

author: ebclr
author_rank: Super Contributor
timestamp: February 10, 2023, 09:21:56 am
content: Maybe it is too late.But this CPU is capable of working directly on from 3.3 v to 5V and is exceptionally cheap, can be a good candidatehttp://wch-ic.com/products/CH32V103.html?

author: DC1MC
author_rank: Super Contributor
timestamp: February 10, 2023, 09:33:52 am
content: Quote from: ebclr on February 10, 2023, 09:21:56 amAlready widely available, no need to design anything for it:https://de.aliexpress.com/item/1005001474741936.html?gatewayAdapt=glo2deuAlso very easy to program in few simple steps for Windows using professionalsQuote

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 10, 2023, 12:35:05 pm
content: I agree with tooki. The USB provided voltage is fine for most usage, but having the ability to disconnect or overrule it is a good thing.So a diode in either supply chain or a cut able and resolder able can do the trick.

author: DC1MC
author_rank: Super Contributor
timestamp: February 11, 2023, 03:46:53 am
content: Well, the DHL Express inserted the tip only, for a 68EUR shipment got (and paid) the following lovely message:Quote

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 11, 2023, 05:31:40 am
content: Yep that looks like what I got when I was waiting for my PCB's.

author: DC1MC
author_rank: Super Contributor
timestamp: February 13, 2023, 05:26:16 pm
content: OK, the DHL Express inserted their tip a bit, but at least everything went flawless, so 10 guys waiting to volunteer for manual soldering and the devkit arrived as well in a nicereusableblister pack.Pictures added to the fist message.the only issue so far: both the dev board and the programmer have micro-USB connectors, but at least was cheap.I have a little bitte (please), if someone knows a bit of Kicad could quickly wipe for me LQFP64 7x7 0.4mm pitch fanout board, just to see if I can manually solder the MCU or do I need to get the assembly as well ?Now let's have some fun with the SOOOFTWAAARRREEEE !!!!Cheers,DC1MC

author: DC1MC
author_rank: Super Contributor
timestamp: February 13, 2023, 05:56:14 pm
content: So, the first fun with the development kit!!!Inserting it "as-is" on the device side gives us a Nuvoton USB mouse and the blinky LED !!!Code:usb 3-9.4.2: new full-speed USB device number 67 using xhci_hcdusb 3-9.4.2: New USB device found, idVendor=0416, idProduct=b001, bcdDevice= 0.00usb 3-9.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3usb 3-9.4.2: Product: HID Mouseusb 3-9.4.2: Manufacturer: Nuvotonusb 3-9.4.2: SerialNumber: A02008040114input: Nuvoton HID Mouse as /devices/pci0000:00/0000:00:14.0/usb3/3-9/3-9.4/3-9.4.2/3-9.4.2:1.0/0003:0416:B001.0011/input/input37hid-generic 0003:0416:B001.0011: input,hidraw3: USB HID v1.10 Mouse [Nuvoton HID Mouse] on usb-0000:00:14.0-9.4.2/input0Inserting it on the programmer side gives us a serial port and a nice virtual SD card:Code:usb 3-9.4.2: new high-speed USB device number 68 using xhci_hcdusb 3-9.4.2: New USB device found, idVendor=0416, idProduct=5200, bcdDevice= 0.00usb 3-9.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3usb 3-9.4.2: Product: Nu-Link2 CMSIS-DAPusb 3-9.4.2: Manufacturer: Nuvotonusb 3-9.4.2: SerialNumber: 130100000016001104481444000004C3cdc_acm 3-9.4.2:1.1: ttyACM1: USB ACM devicehid-generic 0003:0416:5200.0012: hiddev2,hidraw3: USB HID v1.10 Device [Nuvoton Nu-Link2 CMSIS-DAP] on usb-0000:00:14.0-9.4.2/input3usb-storage 3-9.4.2:1.4: USB Mass Storage device detectedscsi host6: usb-storage 3-9.4.2:1.4scsi 6:0:0:0: Direct-Access MBED microcontroller 1.00 PQ: 0 ANSI: 0sd 6:0:0:0: Attached scsi generic sg2 type 0sd 6:0:0:0:  8192 512-byte logical blocks: (4.19 MB/4.00 MiB)sd 6:0:0:0:  Write Protect is offsd 6:0:0:0:  Mode Sense: 03 00 00 00sd 6:0:0:0:  Write cache: enabled, read cache: enabled, doesn't support DPO or FUAsdc:sd 6:0:0:0:  Attached SCSI removable diskThe "SD card" has the following parameters (It activates and auto-mounts as VFAT in Linux when the Offline Program switch is clicked, the second LED of the programmer starts blinking):Code:Filesystem 1K-blocks Used Available Use% Mounted on/dev/sdc 4080 16 4064 1% /media/user/NuMicro MCUInside the ca. 4MB storage there is one file by default: NU_CFG.TXT with the following content:Code:Version=7215r[Interface configuration]CMSIS-DAP=0; 0 = disable; 1 = enableWonderin' if it's editable and what happens if I change the "CMSIS-DAP=0" to "CMSIS-DAP=1"Cheers,DC1MC

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 13, 2023, 07:23:18 pm
content: Is this what you need?Edit: I added the EasyEDA file too. (Remove the .txt before using it)

author: DC1MC
author_rank: Super Contributor
timestamp: February 13, 2023, 07:35:45 pm
content: Quote from: pcprogrammer on February 13, 2023, 07:23:18 pmYes sir, many thanks, if I don't find some Chinesian boards, I will order it these days. I'll see what comes faster while the main PCB is cooking.Cheers,DC1MC

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 13, 2023, 07:41:00 pm
content: You are welcomeKeep in mind that I just used the default pad and did not check the hole size for 2.54mm headers. It was just a quick draw to see if this is what you had in mind.Cheers,Peter

author: DC1MC
author_rank: Super Contributor
timestamp: February 13, 2023, 08:15:59 pm
content: Well, there is a distinct and disturbing lack of 0.4mm pitch QFN breakout boardsThe one and only I was able to found is this one:https://schmartboard.com/schmartboard-ez-qfp-64-100-pins-0-4mm-pitch-2-x-2-grid-202-0014-01/That is absolutely perfect, except is in bloody California, again with giant shipping cost and anal probing by whatever courier combined with the German Adler, no more. Why can't we have anything similar in EU, this deindustrialization shite is pissing me offAnyway, I can't pay you properly to replicate the above board, but it seems to be a market for them, really nowhere else to find stuff smaller then 0.5mm pitch. I guess I'll keep my meager resources for the actual boards and test on them, these enormous customs/VAT and shipping costs really kills anything innovative in EUSorry for rant, I'll go play with the devkit software, is actually not bad

author: DC1MC
author_rank: Super Contributor
timestamp: February 13, 2023, 08:26:13 pm
content: Mouser (where I order now and then and manage to get over the free shipping limit) did had it in stock some time, but is gone, most likely 4 everBut they do have a datasheet, if by some celestial wonder want to give it a try, the shape is better visible here:https://www.mouser.de/datasheet/2/356/202-0014-01-1201620.pdf

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 14, 2023, 06:15:44 am
content: I wonder if JLCPCB joined this VAT handling setup, and you don't get this delivery company ripoff bullshit.The circuit board you refer to is a bit more work to setup, and do you need the 100 pins option is the question. Without it is less work.But I thought the decision was made to use the bigger 0.8mm part on the PCB?

author: Zoli
author_rank: Frequent Contributor
timestamp: February 14, 2023, 07:23:59 am
content: Quote from: pcprogrammer on February 14, 2023, 06:15:44 amFor the last order I've paid taxes:

author: DC1MC
author_rank: Super Contributor
timestamp: February 14, 2023, 08:58:31 am
content: Quote from: pcprogrammer on February 14, 2023, 06:15:44 amSadly it was exactly viceversa with the pitch, and regarding taxes, I don't mind VAT, but the courier fees are pissing me off. JLCPCB at least joined the VAT kabalah and spared us the courier fees.Cheers,DC1MC

author: tooki
author_rank: Super Contributor
timestamp: February 14, 2023, 09:07:43 am
content: Quote from: DC1MC on February 14, 2023, 08:58:31 amAre you sure you don’t mean “cabal” (a secret group)? Kabbalah is a type of religious mysticism.

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 14, 2023, 10:03:47 am
content: Quote from: DC1MC on February 14, 2023, 08:58:31 amIf they were honest about it, I would neither, but they brought it as that it is to protect the domestic webshops, but instead it is just raking in money for the government.The fact that it is also applied to second hand goods pisses me of.

author: lastguy
author_rank: Contributor
timestamp: March 08, 2023, 11:40:32 pm
content: Not sure I can trust Microchip, I and my friend both have program fly off after 10 years.

author: pcprogrammer
author_rank: Super Contributor
timestamp: March 09, 2023, 06:41:20 am
content: @DC1MC, can you tell us the status of the project?

author: DC1MC
author_rank: Super Contributor
timestamp: March 09, 2023, 09:14:14 am
content: Sure, now I can, because I'm somehow recovered from some pretty bad covid shite and I can stay in the upright position without coughing my lungs out.I've put the hw issues for next week, when I'll be able to meet the friend that assist me on the issue. In the mean time I've discovered that Nuvoton has for a long time board definition and Arduino stuff for the M4 series, M460 and M480, just not M471. I've installed the stuff, corrected some issues with the file names capitalization under Linux and all the original boards are capable of building binaries with both versions of the Arduino IDE.Now I'm slowly try to integrate the M471 in the board definition archive, if someone wants to help, I can clone their repository somewhere else on GitHub and then even issue a pull request.The original Nuvoton repository and board definition:https://www.nuvoton.com/products/iot-solution/arduino-compatible-platform/specifically:https://raw.githubusercontent.com/OpenNuvoton/NuMaker-UNO/master/package_nuvoton_index.jsonOne interesting thing is that I've issued a full chip erase with their utility and somehow the empty chip does not show up as anything on the USB, I was expecting to go in some DFU or even proprietary mode, but it seems that a bootloader must be installed via the SWD programmer. I'm curious what is the situation with factory new chips if they do have some default bootloader.That's the updates so far, if there are volunteers for integrating M471 in the existing Nuvoton board definition, please let me know.Cheers,DC1MC

author: pcprogrammer
author_rank: Super Contributor
timestamp: March 09, 2023, 09:37:04 am
content: Oh, wow, well good to hear you are recovering.Damn, already forgot the setup of the boot process with this one. If I recall correctly it does not have the external select pins and a build in boot rom, so yeah SWD will be the way to go. I doubt that Nuvoton loads them with a bootloader, but since you have a bunch of them you will find out once you solder them to a board.As I'm not really interested in using Arduino for this I'm not volunteering, sorry.Happy to do work on schematic and pcb though.

author: bingo600
author_rank: Super Contributor
timestamp: March 10, 2023, 04:30:34 pm
content: I just got 4 x CH32F103 boards (Dual USB-C) from Ali , "Blinky" & USB "Hello world works fine" (Linux).Next ... Rip out the 3v3 regulator and run 5v/Bingo

author: DC1MC
author_rank: Super Contributor
timestamp: March 10, 2023, 05:45:01 pm
content: Quote from: bingo600 on March 10, 2023, 04:30:34 pmUhmmm... OK, say, how is this relevant to the topic ?

author: bingo600
author_rank: Super Contributor
timestamp: March 10, 2023, 08:24:23 pm
content: Quote from: DC1MC on March 10, 2023, 05:45:01 pmWellThey were mentioned several times above, and according to the DS they can run 5v , and they can run "Arduino".I thought it would be nice for the forum to know if they could run 5v wo. letting the magic smoke out.Why so grumpy M/Bingo

author: DC1MC
author_rank: Super Contributor
timestamp: March 11, 2023, 05:46:36 am
content: Quote from: bingo600 on March 10, 2023, 08:24:23 pm'cause I'm a grumpy old man, be merciful, btw, if you run these guys at 5V and use USB, it seems to need a "magic" register to be set.In the end, I do apologize because your post was looking like some previous posts "hey, I've got some RISC-V totally unrelated stuff...", kindly please let us know how good are they working at 5V, including the USB part (if you can measure some voltages on the USB side and see if they're in spec, that will be great).And finally do try to programmatically bit-bang an I/O (or more) as fast as possible at 5V and scope it (eventually with a bit of load) to see how it looks like. That will be indeed helpful and it will strongly attenuate my grumpinessCheers,DC1MC

author: bingo600
author_rank: Super Contributor
timestamp: March 11, 2023, 06:38:02 am
content: Quote from: DC1MC on March 11, 2023, 05:46:36 amYupp saw that ....I would also love to get a "Trustworthy" schematic of that board ...I see several versions out there ...Well my POI is especially the USB C connection to the regulator and/or MCU.The RM (Ressource Manual) has me a bit "worried" as it states that the USB5VSEL will be set to 1 , if the system is powered by 5v.I'm a bit afraid if this is a "translation error" .... Does that chip really have a 3v3/5v detection , and set USB5VSEL automatically ??Or is it a translation error where "will be set" should have been "must be set" ??I guess i'll have to connect it via Serial and read that bit a few times , using 3v3 & 5v VCC.Quote from: DC1MC on March 11, 2023, 05:46:36 amWill do , but might take a week or two./Bingo

author: bingo600
author_rank: Super Contributor
timestamp: March 17, 2023, 12:27:04 pm
content: Well i just made m first 5v run on the CH32F103 board.I removed:R10 - USB Pullup Resistor , that goes to VCCU1 - 3v3 Regulator - Didn't survice the pin lifting ... I did the surgery after soldering pins on the board, leaves very little working (solder) space.Hotglued a MIC2920-3v3 to some Kapton on the back, for the "Orange 3v3 wire".Fed the 2920 from the 5v Ceramic (C5) and soldered the "Red 5v wire to the cap to" - Yes i see the pointy solder blop on C5 plus side....I then connected a 3v3/5v switchable usb-ttl adapter to usart1 , and made a program using the CH32F103 StdPeriph lib - They had a program that could detect if you run 3v3 or 5v on VCC.Rewrote the serial output rotine , and printed the below stuff...As you can see the MCU does NOT automatically set the EXTEN-->USB5V bit in the register , despite the RM saying so ... (I suspect xlate error)Code:SystemClk:72000000Exten Reg:0x00000200USB5V Flag :0x00000000ADC Value: 9615VSystemClk:72000000Exten Reg:0x00000200USB5V Flag :0x00000000ADC Value: 9625VSystemClk:72000000Exten Reg:0x00000200USB5V Flag :0x00000000ADC Value: 9635VSystemClk:72000000Exten Reg:0x00000200USB5V Flag :0x00000000ADC Value: 9625VSystemClk:72000000Exten Reg:0x00000200USB5V Flag :0x00000000ADC Value: 9635VSystemClk:72000000Exten Reg:0x00000200USB5V Flag :0x00000000ADC Value: 9595VUSB has not yet been tested on VCC 5v.I have tested it on VCC 3v3 , using standard STM32duino.I had to do one mod though ... After removing R10 USB wouldn't be reckognized by Laptop (missing 1k5 USB+ pullup) - But you can enable the builtin USB Pullup in the EXTEN register.VCC 3v3 still works fine w. STM32duino, after enabling the builtin pullup.Next ....Connect an old USB HUB to the Laptop (Laptop USB port saver) - Connect ARM to HUBSet VCC 3v3Measure USB Data+ levels on 3v3Do some port toggling wo. load , and w 1K load.Switch to 5vSet USB5V-bit in EXTENRepeat above measurements.Then:It would be nice to autodetect 3v3 vs 5v , and set the USB5V-bit on startup , before enabling the USB periph.So ...Convert the attached CH32F103 Main.c to STM32 register & lib naming, so it can be used w. STM32Duino.The MCU might be compatible , but the STDPeriph naming is not ... It won't build in STM32Duino.Edit:The CH32F103 - Has a weird "encrypted"USB programming protocol, that has already been hackedProgramming MCUUSBUseisp55e0 -f Main.bin-https://github.com/frank-zago/isp55e0(udev script also in there ...) -USE Lower/Bottom USB plugWatch out when on VCC 5v - Since the chip didn't set the USB5V flag, chances are that the bottom USB in "Boot0" mode will not either ..... And you have no programming control in "Boot0" mode.SWDI haven't tried it yet, but if VCC 5v - Then it might blow your ST-Link clone unless the ST-Link pins used are 5v tolerant.DON'T connect USB & SWD VCC pin at the same time - You will have dual PSU's figthing or blow the SWD thingy if running 5v on the CH32Edit2:Arduino replacement ... depends ...The MCU has a Max powerusage of 50mA ob VCC & GND pins.And a pindrive of- 5..8mA - Though they mention 20mA w relaxed timing ... But remember the 50mA total usage.I suppose it might be somewhat the same as a "Bluepill, haven't checkked though.Bought mine on ALI for $2.6 - USB-C versionhttps://www.aliexpress.com/item/1005001936761405.htmlMake sure to get the "DUAL USB PLUG" version, no matter where you get it.TOP USB = Normal USB (STM compatible) - Works w STM32duinoBTM USB = USB Boot0 ISP + USB HOST (ST Doesn't have that one)I ordered 4 , and one is missing the top usb-c plug , the other 3 are fine.I have decided not to complain, what would i want in compensation ..... ?I got the board in a closed static bag from seller , must be a factory error./Bingo

author: DC1MC
author_rank: Super Contributor
timestamp: March 17, 2023, 04:29:37 pm
content: @bingo600 . now do the tightest loop ever and show us what a 5V capable pin is capable of doing

author: bingo600
author_rank: Super Contributor
timestamp: March 17, 2023, 04:50:16 pm
content: Will do in a short whileJust ran a STM32duino test on 5v , w. usb outputCode:PRE-Exten Reg:0x00000200Exten Reg:0x0000020aUSBPU Flag :0x00000002USB5V Flag :0x00000008Hello loop = 54**** EXTEN ***PRE-Exten Reg:0x00000200Exten Reg:0x0000020aUSBPU Flag :0x00000002USB5V Flag :0x00000008Hello loop = 55**** EXTEN ***PRE-Exten Reg:0x00000200Exten Reg:0x0000020aUSBPU Flag :0x00000002USB5V Flag :0x00000008Important part ...Pre exten = EXTEN register at bootExten = Exten register after running my modified (own added) -void SystemClock_Config(void)- Routine , that sets USB PU + 5V bits.So "duino is working on 5v"And the "Green Blinky LED" is mega bright now .../Bingo

author: bingo600
author_rank: Super Contributor
timestamp: March 17, 2023, 07:37:09 pm
content: I just diid a quickCode:do{digitalWriteFast(PA_0, HIGH);digitalWriteFast(PA_0, LOW);} while(1);And grabbed a scope pict - Some ringing , prob due to the ground clip well ....Seems like it uses 6 instructions for the "toggle + Loop"/BingoSince DC1MC was pushing so hard for a "Fast blinky" he's prob. going toAbsolutely Killthe CH32F103 performance with the Nuvo ....Well for $2.60 it's still a fun board, that can run 3v3 or 5vBut i might get a few of DC1MC's Nuvo's if they have the same form factor as a Nano3I have only used amicro subsetof the chip, w. STM32duino v 2.4.0.USB.Serial print & some blinky stuff.DON'T blame meif there are "quirks" in the ST/CH compatibilitySeems like i found a "quirk" - w. input from serial.usb - output works fineSerial(USB) read doesn't work.And - Ie.while(!SerialUSB.available());// Wait for USB ConnectHangs ..... Even if i can do serial print fine wo. probs./Bingo

author: DC1MC
author_rank: Super Contributor
timestamp: March 17, 2023, 07:48:13 pm
content: Quote from: bingo600 on March 17, 2023, 07:37:09 pmUuuuu,12MHzand nice flanks, where are the "assembly astronauts"to optimize this and reach 20MHz.Thanks and cheers,DC1MC