Looking for ARM MCU with IO interconnect routing options - Page 1
Forum section: electronics / general

author: RolfNoot
author_rank: Contributor
timestamp: March 25, 2023, 05:45:08 am
content: Hi all,I am looking for an MCU which can internally route IO input pins to IO output pins.I have a device with a processor connected to SPI flash and I want to make a board with a MCU that ‘hooks onto’ the SPI lines, act as sniffer and is able to disconnect the SPI flash from the device’s processor and inject data to both the processor as the SPI flash.Basically, it ‘sits’ between the device processor and SPI flash, can sniff and inject data both ways.I know I could easily do this with PSoC, however Infineon has completely killed the PSoC by pricing it out of the market. The PSoC was promoted for a sub 1 dollar ARM M0 MCU and now you’re lucky if you can buy it for 4 dollar. The higher end PSoC devices went from 4 USD to over 15 USD in just a few yearsI don’t want additional circuitry (multiplexers, transistors etc), so I’m hoping to find a good chip!Regards,Rolf

author: pcprogrammer
author_rank: Super Contributor
timestamp: March 25, 2023, 07:35:59 am
content: Maybe the RP2040 (Raspberry Pico) can do this. It has some programmable IO setup, but I'm not up to speed with it, so not sure.

author: wek
author_rank: Frequent Contributor
timestamp: March 25, 2023, 07:51:15 am
content: > I know I could easily do this with PSoCThen do it easily with PSoC.Prices went up because of shortage and will go down a bit. They won't return to pre-shortage levels, but other manufacturers' chips won't either. How many of them you plan to use and for what timeframe? (I am not curious, this is just to say that you should ask yourself these questions).As for alternatives, the STM32L1xx line has a set of interesting internal interconnections which maybe could and maybe couldn't be abused for this purpose. Its original purpose is to provide touchscreen support, but they are just analog switches controllable by both directly using registers, and also from timers. I never gotten so far that I would understand all the minutiae of this arrangement, and now the 'L1 are NRND although ST promises they will be around for the next 8 years or so.JW

author: Siwastaja
author_rank: Super Contributor
timestamp: March 25, 2023, 09:43:20 am
content: nRF52, but if you don't need the 2.45GHz radio, the main selling point, it would be a pretty weird choice, I admit that. This being said, I have used it in non-radio applications lately, too, because I like the simplicity and flexibility of the peripheral system (although it's lacking some features compared to higher end STM32 for example). Nearly full IO connection matrix is one of such features, you indeed can route SPI peripheral to any set of digital IO pins. Other similar features are arbitrary logical interconnections between any peripherals using their EVENT / TASK inputs/outputs, and easier-than-anything-else DMA. Really simple microcontroller to understand and use, and really simple to program in register level.

author: RolfNoot
author_rank: Contributor
timestamp: March 25, 2023, 11:12:37 am
content: Quote from: pcprogrammer on March 25, 2023, 07:35:59 amThanks, the RP2040 seems interesting, as it has an USB and QSPI interface. Will check if the interconnectable IOs can be routed to the SPI interfaces as well.Quote from: wek on March 25, 2023, 07:51:15 amI would do if prices were acceptable. Price increase way too high even if it goes down 50%.Quote from: wek on March 25, 2023, 07:51:15 amThanks, will look into these chips. Not sure if the analog switches can drive the high speed SPI signals well.Quote from: Siwastaja on March 25, 2023, 09:43:20 amThanks, I guess I have some nRF52 kits laying around, will check these out!

author: JPortici
author_rank: Super Contributor
timestamp: March 25, 2023, 05:43:35 pm
content: does it have to be ARM?this could be done with any microchip part with PPS and CLC (PPS Input to both SPI and CLC, the CLC configured as a passthrough) which means any PIC16/PIC18/PIC24/dsPIC introduced in the last 4-5 years. Probably some of the newest ATSAM as well (and PIC32C which are rebranded ATSAMs)

author: RolfNoot
author_rank: Contributor
timestamp: March 25, 2023, 09:35:41 pm
content: Quote from: JPortici on March 25, 2023, 05:43:35 pmI used to work with Microchip but I abandoned it because of the wacky behavior of MPlab and the debugging tools. That was 20 years ago and I tried 4 years ago, nothing changed. Seems that the harmony API is sucking as well. I don't know how it is right now but I prefer to work with a more open and smooth environment. I use a custom VSCode setup using GNU/GCC/OpenOCD for 95% of my designs which runs super smooth.Thanks for your suggestion anyway!PS: Recently I did a ATSAM54 ethernet project with the VSCode setup, so any info on ATSAM with this kind of configurability would be very welcome!

author: errorprone
author_rank: Contributor
timestamp: March 26, 2023, 01:01:12 am
content: Some of the LPC800 and LPC5500 can do it with their PLU peripheral as well.

author: RolfNoot
author_rank: Contributor
timestamp: March 26, 2023, 10:09:46 am
content: PLU seems interesting! I also see a connection matrix. Can someone elaborate on this? How flexible is it, can the connecting matrix on itself take a gpio as input and route it to an gpio output and a peripheral input? Or does it take the PLU as well to do this?

author: errorprone
author_rank: Contributor
timestamp: March 26, 2023, 12:17:59 pm
content: I don’t think you can route directly from input to output. I think it has to go through the LUTs or flip flops. User manual mentioned that it can be programmed using their SW tool or verilog.

author: tooki
author_rank: Super Contributor
timestamp: March 27, 2023, 07:36:07 pm
content: Quote from: RolfNoot on March 25, 2023, 05:45:08 amI think the PIC I used recently in a project, the PIC16F18857, can do this, using its “configurable logic cell” feature.I don’t know what it is you consider “wacky”, but that project was my first time touching a PIC and MPLAB X, and I had no trouble getting it up and running. Everything worked smoothly, including debugging.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: March 27, 2023, 07:47:29 pm
content: Quote from: RolfNoot on March 25, 2023, 05:45:08 amThat sounds like a nightmare in latency issues.Is this for volume production, or for a development lab ?If you want a subset of what you describe, eg a Test/pgm MCU that can program/verify flash, and load small test programs to the host, that might be possible with some software rules on the host.To PGM flash, you hold the host in reset and can simply tap into the lines.To mimic flash, you can disable chip select, but the small MCU may struggle to keep up with the host loader speed, and it may not manage random-read flash.Boot replace is simpler, if the host always reads from a fixed FLASH address, you can ignore the address value and spend that time getting ready to send data.Good FIFOs will help here, and ideally you want a SPI that can preload TX FIFO and wait for SS =\_ so it has more chance of emulating flash read.Addit:The EFM8BB52 has good SPI-CLU connection options, that may manage the test flows I gave above, tho it may be a bit small for you ? It certainly is cheap.

author: RolfNoot
author_rank: Contributor
timestamp: March 30, 2023, 05:24:19 pm
content: That’s why I need the digital logic. Using PSoC, I am able to route MO to SI and SO to MI without need to sync to PSoC clock (few nS delay only) while tapping on these lines as well.seems hard to find alternatives

author: RolfNoot
author_rank: Contributor
timestamp: March 31, 2023, 02:11:08 pm
content: Quote from: tooki on March 27, 2023, 07:36:07 pmGood to hear everything went well. I've worked approx. 10 years with PIC (started with 16C54 with the UV erasable eprom). Initially the tools were okay but the tools went worse IMHO. ICD2, ICD3, PicKit are unstable, some needed modifications to work well. I want the development environment to be smooth and running, not spending time to solve IDE related issues.Here just a few screenshots on issues I communicated with Microchip and never got an answer.

author: RolfNoot
author_rank: Contributor
timestamp: March 31, 2023, 02:43:33 pm
content: See the attached circuit, still looking for alternatives to implement this functionality (without external components).

author: janoc
author_rank: Super Contributor
timestamp: March 31, 2023, 07:37:20 pm
content: Why not use a small FPGA/CPLD for the interfacing instead and any micro you are comfortable with?

author: PCB.Wiz
author_rank: Super Contributor
timestamp: April 01, 2023, 03:31:51 am
content: Quote from: RolfNoot on March 31, 2023, 02:43:33 pmHow much code size do you need in the MCU ? I'm assuming you drop in some board test code ?The attached EFM8BB52 CLUmighthave enough SPI connectivity, with some careful pin placement to work with the crossbar ?It can do (some)pins -> CLUnOUT and SPI to CLU and CLU to SPI.

author: westfw
author_rank: Super Contributor
timestamp: April 01, 2023, 08:40:01 am
content: QuoteWouldn't that be pretty easy to implement with a bit of MSI external logic? SPI is what, a max of 6 signals for QSPI? So a couple of bus transceivers? That would make you pretty CPU independent; normally a nice place to be.