# Version of Core with multiple USARTs broken out?

**URL:** <https://community.particle.io/t/version-of-core-with-multiple-usarts-broken-out/3379>\
**Category:** Hardware\
**Created:** [March 12, 2014, 4:13am UTC](https://community.particle.io/t/version-of-core-with-multiple-usarts-broken-out/3379 "2014-03-12T04:13:20Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![notronrj](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/notronrj/32/20856_2.png) [@notronrj](https://community.particle.io/u/notronrj)\
**Post date:** [March 12, 2014, 4:13am UTC](https://community.particle.io/t/version-of-core-with-multiple-usarts-broken-out/3379/1 "2014-03-12T04:13:20Z")

</div>

Hello all,

I just stumbled upon this platform a few days ago and I’m evaluating it for use in our product.  
The one thing that could be a show stopper or only having access to 1 USART port. Our product at the moment really needs two USART ports as we don’t want to use a digital/analog multiplexer.

Will a version of the Core be made that breaks out another USART to another set of TX/RX pins?

Or, any ideas how to accomplish this without another USART port, and I’m not a fan of bit banging…

Thanks,  
Jim

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [March 12, 2014, 5:01am UTC](https://community.particle.io/t/version-of-core-with-multiple-usarts-broken-out/3379/2 "2014-03-12T05:01:20Z")

</div>

Theres are more than 1 hardware UART on the spark core and can be implemented by firmware changes.

> <https://github.com/particle-iot/device-os/issues/89>
>
> We've got a second UART available - let's make it accessible!

But im not sure of the progress as of now

---

<div class="post-metadata">

**Author:** ![timb](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/timb/32/1913_2.png) [@timb](https://community.particle.io/u/timb)\
**Post date:** [March 12, 2014, 11:55am UTC](https://community.particle.io/t/version-of-core-with-multiple-usarts-broken-out/3379/3 "2014-03-12T11:55:42Z")

</div>

Yup. If I remember correctly the I2C pins can be repurposed for UART duty. In fact, if you could get access to two timers you could make a highly reliable software UART as well.

Another option is to get a cheap $0.15 micro (like a PIC or MSP430) and make a Serial to I2C bridge. I’ve actually got this going with the 430 and it works brilliantly up to 115kbps.

---

<div class="post-metadata">

**Author:** ![BDub](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bdub/32/5137_2.png) [@BDub](https://community.particle.io/u/BDub)\
**Post date:** [March 12, 2014, 7:19pm UTC](https://community.particle.io/t/version-of-core-with-multiple-usarts-broken-out/3379/4 "2014-03-12T19:19:27Z")

</div>

> [@timb](#):
>
> Another option is to get a cheap $0.15 micro

Cheapest I see among PIC, ATTINY and MSP430 is about 35 cents. What's your source for a 15 cent micro??

---

<div class="post-metadata">

**Author:** ![timb](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/timb/32/1913_2.png) [@timb](https://community.particle.io/u/timb)\
**Post date:** [March 12, 2014, 8:09pm UTC](https://community.particle.io/t/version-of-core-with-multiple-usarts-broken-out/3379/5 "2014-03-12T20:09:55Z")

</div>

Oh, I’ve seen TI do .20~ on 1xxx and G2 series at 5k (might have been 10k) quantity. This was a couple of years ago, but I’m sure they still work deals.

Anyway, there are .05, .10 and .15 cent MCUs out there, you’ve just got to know where to look. What do you think they put in your electric toothbrush and universal remote? 😉

Give me a bit and I’ll get you a couple of links. There’s a whole world off cheap off-brand micros out there!

---

<div class="post-metadata">

**Author:** ![david\_s5](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@david\_s5](https://community.particle.io/u/david_s5)\
**Post date:** [March 12, 2014, 10:09pm UTC](https://community.particle.io/t/version-of-core-with-multiple-usarts-broken-out/3379/6 "2014-03-12T22:09:52Z")

</div>

@notronrj[Here](https://github.com/spark/core/blob/master/Pin%20mapping/core-pin-mapping-v1.xlsx) is the Pinout

What baud rates and hand shake lines do you need do you need?

![](https://sea2.discourse-cdn.com/flex026/uploads/particle/882/377ab14b49099090.png)

---

<div class="post-metadata">

**Author:** ![notronrj](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/notronrj/32/20856_2.png) [@notronrj](https://community.particle.io/u/notronrj)\
**Post date:** [March 13, 2014, 2:33am UTC](https://community.particle.io/t/version-of-core-with-multiple-usarts-broken-out/3379/7 "2014-03-13T02:33:19Z")

</div>

Hi, I’m looking for 8N1 9600 baud and don’t need hardware flow control. However if the pins for rx/TX are available shouldn’t the firmware / libraries be able to be updated to use them as Serial2 just as the first uart is supported in software?

The idea of using a small chip to cobble a second serial port together is interesting but seems less than optimal.

Are plans being made to support the second uart in the firmware?

Thanks everybody! !

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [March 13, 2014, 2:43am UTC](https://community.particle.io/t/version-of-core-with-multiple-usarts-broken-out/3379/8 "2014-03-13T02:43:22Z")

</div>

@notronrj the link i showed you in the earlier post is an ‘issue’ filed for the core-firmware.

Already in the plans to have it implemented but just not yet. 😄

It’s definitely going to happen but the :spark: team is focusing on the higher priority issues before the rest gets implemented

---

<div class="post-metadata">

**Author:** ![notronrj](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/notronrj/32/20856_2.png) [@notronrj](https://community.particle.io/u/notronrj)\
**Post date:** [March 13, 2014, 7:24pm UTC](https://community.particle.io/t/version-of-core-with-multiple-usarts-broken-out/3379/9 "2014-03-13T19:24:04Z")

</div>

Thank you Kenneth. Do you you know approximately when the core-firmware will have support for the second uart?

Cheers!  
Jim

---

<div class="post-metadata">

**Author:** ![david\_s5](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@david\_s5](https://community.particle.io/u/david_s5)\
**Post date:** [March 13, 2014, 9:30pm UTC](https://community.particle.io/t/version-of-core-with-multiple-usarts-broken-out/3379/10 "2014-03-13T21:30:29Z")

</div>

Hi,

@notronrj

Hi Jim,

If you want it ASAP and can build locally it can be done fairly quickly, (but not ideally from a space, maintainability perspective).

Replicate the current spark\_wiring\_usartserial.cpp file and change all the references to UART2 things to UART1, then in the begin, ensure to set the alternate pin functions so that D0, D1 are enabled to UART1

I would do it for you but, I am backed up on my client’s jobs at the moment.

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [March 14, 2014, 12:36am UTC](https://community.particle.io/t/version-of-core-with-multiple-usarts-broken-out/3379/11 "2014-03-14T00:36:27Z")

</div>

@david_s5 would that be so straight forward to implement?

What about the interrupts and all?

I won’t mind giving it a shot since it’s a backlog but it’s definitely going to have bugs lingering 😛

---

<div class="post-metadata">

**Author:** ![david\_s5](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@david\_s5](https://community.particle.io/u/david_s5)\
**Post date:** [March 14, 2014, 1:02am UTC](https://community.particle.io/t/version-of-core-with-multiple-usarts-broken-out/3379/12 "2014-03-14T01:02:45Z")

</div>

@kennethlimcp

Alright you made me look at the file. yep it does look that simple but I did not check the data sheet.

Also check Wiring\_USART1\_Interrupt\_Handler (Declared as weak in stm32\_it.cpp) if it is not there make it so.

If it is the same IRQ demux it in stm32\_it.cpp to Wiring\_USART1\_Interrupt\_Handler or Wiring\_USART2\_Interrupt\_Handler

Mind you, this is not the long term solution. You could even revert to the non - interrupt version of spark\_wiring\_usartserial.cpp and mod that file for a “Quick” fix.

---

<div class="post-metadata">

**Author:** ![notronrj](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/notronrj/32/20856_2.png) [@notronrj](https://community.particle.io/u/notronrj)\
**Post date:** [March 14, 2014, 2:26am UTC](https://community.particle.io/t/version-of-core-with-multiple-usarts-broken-out/3379/13 "2014-03-14T02:26:41Z")

</div>

Thanks everyone. I’m going to be buying a few of the Cores to experiment with and create a prototype board. Hopefully by the time I’m ready the firmware will officially support the second UART.

Who know, maybe I’ll end up with the time to work on the support and / or help finish it up.

Cheers,  
Jim
