SparkFun RED-V Thing Plus - SiFive RISC-V FE310 SoC  - Page 1
Forum section: electronics / general

author: netmonk
author_rank: Contributor
timestamp: May 25, 2020, 08:46:36 pm
content: I just bought two of them on mouser, after playing with longan nano for a few months now.I would like to know what is the use of the mk22fn128https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/k-series-cortex-m4/k2x-usb/kinetis-k22-120-mhz-cost-effective-full-speed-usb-microcontrollers-mcus-based-on-arm-cortex-m4-core:K22_120on it ?Just to deal with usb connexion ?

author: thm_w
author_rank: Super Contributor
timestamp: May 25, 2020, 10:39:02 pm
content: https://www.sparkfun.com/products/15799https://cdn.sparkfun.com/assets/a/c/3/e/4/RedVThingPlus.pdfQuoteThey are using it as a USB->JTAG interface, to be able to program and debug the FE310. It looks like a serial connection is there as well.FE310 doesn't appear to have any sort of USB interface:https://groupgets.com/campaigns/462-freedom-e310-fe310-mcu

author: netmonk
author_rank: Contributor
timestamp: May 25, 2020, 10:44:30 pm
content: Interesting, why such an mcu to act like a usb-serial interface ?

author: thm_w
author_rank: Super Contributor
timestamp: May 25, 2020, 11:21:04 pm
content: Not sure.Maybe they use it elsewhere, or already had USB JTAG code provided that would work on it, and need decent jtag performance?

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 26, 2020, 12:38:51 am
content: As said above, it's used both for JTAG and a general purpose serial interface.Obviously they already have working code for this MCU. The board has a compatibility layer for the Arduino environment.Yes Sparkfun likely uses this part already on a number of other boards.I don't see what exactly you'd find weird. You get this USB connectivity with JTAG+serial, and being an MCU, it's customizable enough to easily interface it with the Arduino IDE, and is just a few bucks. What's the problem?

author: PCB.Wiz
author_rank: Super Contributor
timestamp: May 26, 2020, 12:41:53 am
content: Quote from: netmonk on May 25, 2020, 10:44:30 pmYes, what they have chosen is neither small or very cheap, and seems to be only FS-USB speed too.As above, likely they already have code for the Freescale part, as it is mature. They may also have 'lots in stock' ....

author: netmonk
author_rank: Contributor
timestamp: May 26, 2020, 11:00:55 am
content: well what i find bizare is that this mcu seems as much powerfull than the risc mcu.And beside just using it as a usb/jtag bridge, it cannot be much used for other purposes.

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 26, 2020, 02:50:29 pm
content: Quote from: netmonk on May 26, 2020, 11:00:55 amIt's relatively cheap by quantities.Who cares if it's more powerful than the FE310? The board needed a JTAG interface, and it was likely (given their context) one of the cheapest ways to provide that while being flexible enough.In a similar idea, there are also a number of dev boards embedding a relatively powerful MCU to implement a licensed Segger J-link probe. Sometimes this MCU is "more powerful" than the evaluated MCU. What's the problem? It's just a tool.What would you have used instead?

author: netmonk
author_rank: Contributor
timestamp: May 26, 2020, 03:14:28 pm
content: I was just questionning the underlying logic to use such a powerfull side mcu just for jtag and usb bridge.As im pretty new to mcu, and mainly focused on esp32 board, i was accustomed to meet such CP2102/9 usb bridge, to do the job (not jtag it seems).But i was not aware of such practice to have a powerfull side mcu for usb/jtag bridging such as in this sparkfun board. i found it a little strange.Excuse my noobiness.

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 26, 2020, 04:00:27 pm
content: A simple serial channel would typically only allow uploading code to the target MCU, or program Flash... provided that said MCU has a serial bootloader. You usually can't use a debugger with just serial communication.AFAIK, the FE310 doesn't have a serial bootloader, so that wouldn't be workable (someone correct me if I missed it). Besides, with JTAG access you get access to a debugger, and can do a lot more.So, here you have your explanation why they chose this approach. (The ESP32 has a serial bootloader in its internal ROM.)As far as cost goes, for a dev board, it's really not a big deal. In quantities (at least through usual distributors), a CP2102 would be like ~$2 cheaper than the MCU they used on this board (but anyway, as I said, a CP2102 wouldn't be enough in this case.) So it's not as big a deal as you may imagine.

author: netmonk
author_rank: Contributor
timestamp: May 26, 2020, 04:22:51 pm
content: Thank you so far for your explanations. it's far more clear now.Im currently working an a drone firwmare esp32 based, i was curious to shift to riscV mcu, that's why i was questionning this sparkfun.I have two of them, time to play with them.

author: errorprone
author_rank: Contributor
timestamp: May 26, 2020, 04:35:47 pm
content: This microcontroller is a standard one for the ARM Daplink debugger and is used on a lot of Kinetis FRDM development boards. Probably easier to repurpose than to start fresh. The project is open sourcehttps://github.com/ARMmbed/DAPLink

author: PCB.Wiz
author_rank: Super Contributor
timestamp: May 27, 2020, 04:15:50 am
content: Quote from: netmonk on May 26, 2020, 11:00:55 amIt may seem strange at first glance, but it is actually becoming more common.I like to see a Debug Bridge part with a HS-USB link, as that makes the debug experience more responsive, and I think the newest ATTiny boards used a higher end Atmel MCU, that isfarmore powerful than the 8-bit part sat next to it.Likewise, the newest Nuvoton 8 bit MCU Eval boards have a HS-USB Arm 4 MCU as the bridge.Usually these better bridge parts also support a Serial COM port as well as the Debug-link.