Saturday, February 25, 2017

RA8875 LCD Flash share with Arduino

Hi!
For some time I have fun with 7" LCD display from Waveshare built on RAiO RA8875 controller chip. One of RA8875 great features is DMA support to load images from onboard flash chip.
Real trouble that there is no way to reprogram flash chip after soldering it to board.
Thanks to Waveshare engineers made header for dedicated flash SPI interface! There is no need to solder flash chip to display PCB, you can connect it to this header.

Idea! RA8875 does not use dedicated SPI all the time, only while DMA transfer is active. So why not share flash chip between two SPI buses: RA internal and Arduino?

There are cool IC's: 74LVC1G3157, single analog/digital SPDT switches. So, almost all time flash chip is connected to RAiO SPI, but when needed, it can be switched to Arduino's SPI bus. Switch control pins are connected to Arduino's CS pin.

Monday, February 20, 2017

Fixing Arduino Due R3 not starting bug

Arduino Due is a cool board with ATSAM3X8E microcontroller. But R3 version has a bug: on first power-up (or if power was turned off for more than ~5sec) board mostly will not start, and you have to push "Reset" button to make your sketch work.
I have two R3 boards with same issue. And it's annoying to push button every time =)
Today I've tried to use voltage control supervisor to automate power-on reset process.

We need:

  • MCP100-315 supervisor (I have some of them, another not tested)
  • 1N4148 diode (MCP100 series have totem pole reset output)

Pros. of MCP100 series: cheap, TO-92 case available, and 350ms delay before reset pin becomes high.

So here it is:
Connections
First I tried to connect Vdd pin of MCP100 to 3.3V pin. But threshold was too little and in most case board was in reset state for infinite. I think that MCP100-300 will work fine with 3.3V.

Conclusion.
I've made this fix for all two my R3 DUE's. All of them now start OK.

P.S. People say this bug was fixed in a new version: R3-E.