MKR1000 SPI issues

Hi everyone,

I have FT813 graphics chip which works just great in Zero. (ICSP header)

BUT, in MKR1000 and MKRZero i get tons of issues. It seems that the data transfers are broken, so if i look at textures, i see a lot of missing pixels data, and some commands missing too. It is randomly happening from the first transfer.

As far as i know, there is no difference in the Zero and the MKRZero or the MKR1000, so what the issue could be with the MKRs?

I've checked various wiring and also soldered the wires directly to the MKRs, and still no luck at all.

Thanks in advance to everyone here :)

There is a great difference between the Zero and the MKR1000 (other processor) but not that much between the MKRZero and the Zero. One exception is the SD card interface. But both (MKR1000 and MKRZero) have already an onboard device on the SPI bus, so you may have to pull SS down and use a different pin for you chip select. Did you do that?

Yes, I've tried almost any pin as SS/CS, still no luck. BTW, from my investigation, in the MKRs, the SD/WiFi are used with another SPI bus (the SAM D21G18 have 2 SPI buses), so it seems that it is not the issue.

BTW, why you think that there is difference from the zero? All of them use the SAM D21G18A as far as i know, do you know something else?

Thanks for your support

BTW, why you think that there is difference from the zero? All of them use the SAM D21G18A as far as i know, do you know something else?

The MKR1000 uses an ATMEL SAMW25 CPU. It’s based on the SAM D21 series but it’s not exactly the same CPU.

BTW, from my investigation, in the MKRs, the SD/WiFi are used with another SPI bus (the SAM D21G18 have 2 SPI buses), so it seems that it is not the issue.

The SAM D21G18 has up to 6 SPI buses depending on the CPU configuration. It has 6 serial communication units configurable as either UART, I2C or SPI. According to the Arduino board page the MKR1000 has configured only 1 SPI bus.
You’re right that the WiFi part is accessed by SPI1 not SPI, this is according to the variants.h file of the current IDE.

How did you connect the graphics chip to the MKRs? Please describe every wire or post a wiring diagram.

OK, but if you'll look at atmel's official info, the ATMEL SAMW25 uses SAM D21G18A CPU, so it is identical. Also, Even if you think the 1000 have different CPU, then what about the MKRZero?

My connection is simple: FT813's MISO -> MISO in the MKRs (pin 10) FT813's SCK -> SCK in the MKRs (pin 9) FT813's MOSI -> MOSI in MKRs (pin 8 ) FT813's CS -> any pin and configuring in the code (Mostly I've tried pin 3) FT813's 3v3 -> VCC in MKRs FT813's GND -> GND in MKRs FT813's PD# -> any pin and configuring in the code (Mostly I've tried pin 4)

I've tried using breadboard, and direct wiring, and as last chance soldered a short wires directly.

No Luck.

How much current does the FT813 display consume? That voltage regulator (3V3) of the MKR1000 and the MKRzero are identiical (AP7215-33YG-13, delivering 600mA) while the Zero has a TS1117 which delivers about 1.1A, almost twice as much.

Hi pylon, sorry for the late reply, just was out of reach internet connection (weekend nature travel, was awesome (: ).

Anyway, the display logic consume 110mA, while the backlight consume MAX 540 mA, BUT! before you claim this is the issue, I’ve used external power supply for the backlight, and after no luck, I’ve connected my MKRs to 3V3 power supply using the VIN pin and the display logic was connected either to this VIN or VCC pins, and no luck again, so this is not the issue i believe, or you want to surprise me? :slight_smile:

Thanks a lot for your help!!!

Just Got Adafruit Feather M0, and it works just great as with the zero, so what's wrong with the MKRs? Any help?

Zero and Adafruit Feather M0 works great, MKR1000/MKRZero is not working properly.

Thanks in advance!!!

BUMP

Anyway, the display logic consume 110mA, while the backlight consume MAX 540 mA, BUT! before you claim this is the issue, I've used external power supply for the backlight, and after no luck, I've connected my MKRs to 3V3 power supply using the VIN pin and the display logic was connected either to this VIN or VCC pins, and no luck again, so this is not the issue i believe, or you want to surprise me?

The VIN pin must be powered with a voltage of 5V or above to power the MKRs, otherwise the USB power is used. In any case the 3V3 is powered by the internal voltage regulator. I don't understand how you connected the power. Please post a wiring diagram!

I still think the power supply part is the best candidate for the cause of the problems you experience. Both MKR have circuitry to support power from a battery with several MOSFETs. I haven't completely analyzed that part of the schemata. If your power supply is providing a stable 3V3 at more than 1A, try powering the display and the MKR with it, and don't use the VIN pin but the 3V3/Vcc pin.

You're right, the VIN is 5V, i forgot what I've done exactly. So i user 5V supply to MKR and the display backlight which is a huge consumer, while the FT8xx controller took power from the internal regulator (VCC pin), this didn't worked.

I will try your idea to supply power (3V3) directly towards the MCU without using the voltage regulator and try, i will post my results soon.

Thanks again pylon!!

OK, here's my results. Arduino team put a diode maybe to prevent feeding the board by 3V3 VCC pin. So, your idea is not an option at the moment. How do you suggest to try to overcome this?

Arduino team put a diode maybe to prevent feeding the board by 3V3 VCC pin.

If that's correct, they forgot to update the schematics. There I cannot find a diode from the 3V3 pin to the Vcc pin of the processor. What label has that diode?

I didn't found it, I just assume that. The fact is: If I connect ground and 3V3 to VCC the board is not starting up When I connect the same 3V3 to the VIN, it starts up

So that's are my assumption that there is a diode there.

If I connect ground and 3V3 to VCC the board is not starting up When I connect the same 3V3 to the VIN, it starts up

How do you check if it starts up? The green LED will never light up if you don't supply the 5V side. But the processor should work anyway.

Haha, OK, I didn't thought about it. I will check it deeper and will post my results.

Thanks again!! :)

ok, so you was right. the led just didn't came on, but the beard is functional. Anyway, the issues are persists even using my own regulator which can supply up to 1.5A.

So this is definitely is not the issue, any idea?

Thanks a lot!!! Arye

I guess you have to connect a scope and check the signal curve. I'm out of ideas for simpler checks. Maybe a simple decoupling capacitor but it can also be a very complex problem that occurs just in your special setup. If you have the possibility to get a scope for some time, connect it to SCKL and MOSI or SCKL and MISO. Check the how steep the rising edge is and how fast it's falling. I guess that there will be signals that are very close to the limits somewhere but it's you who have to do the investigations.

I will try to obtain an scope for that, but i don't really understand why this issue is, I'm using adafruit feather m0 wifi units, and they're works perfect, super weird.

How the circuit you suggest for coupling capacitor? on which lines?

Thanks!!!

A decoupling capacitor should be very close to every chip on a board between Vcc and GND. It flattens the supply voltage and provides current if the chip has a short spike. That's not the first check I would make, that's to check if you see strange voltage changes on the supply voltage with the scope.