SPI Serial Flash not working

Discussion around products based on ARM Cortex-A5 core.

Moderator: nferre

er_pawan82@rediffmail.com
Posts: 7
Joined: Fri Aug 05, 2016 1:55 pm

SPI Serial Flash not working

Tue Aug 30, 2016 10:48 am

I have Ronetix and Embest/Flextronics boards for SAMA5D3X evaluation kit.
I was trying to init serial flash using SAM-BA GUI.But i failed.Unknown device error is returned.
I checked the schematic and device availability on boards. All seems fine.

I checked with 2-3 boards but failed to access the SPI serial flash.
After doing many experiments, finally i put low pass filter (RC) on SPI clock line and then only serial flash chip started responding

Is it known behaviour of the boards?
blue_z
Location: USA
Posts: 1509
Joined: Thu Apr 19, 2007 10:15 pm

Re: SPI Serial Flash not working

Thu Sep 01, 2016 12:48 am

er_pawan82@rediffmail.com wrote:I was trying to init serial flash using SAM-BA GUI.But i failed.Unknown device error is returned.
Is that the exact (and complete) error message?
Summarizing and/or paraphrasing the message instead of accurately reporting it is misleading.
I can (intentionally) generate a somewhat similar "Can't detect known device" error message.

I only have one Flextronics module with a SAMA5D36.
SAM-BA 2.16 has no issues initializing the serial Dataflash on SPI.

Regards
er_pawan82@rediffmail.com
Posts: 7
Joined: Fri Aug 05, 2016 1:55 pm

Re: SPI Serial Flash not working

Wed Sep 07, 2016 8:34 am

Hi,thanks for reply
Here are the details (story) of issue:

I have board SAMA5D36 based processor board from flextronics.

The main board (motherboard) is different compared to SAMA5Dx eval kit.

I started accessing memories using SAM-BA 2.16.
I was able to access memories except SPI serial flash AT25SF321.

I started probing the SPI pins using Logic analyser and found that MISO is not working as expected. I was trying to read manufacturer ID of SPI flash.

I removed the serial flash from the processor board and connected the chip using long wires (about 6 inch long). Surprisingly the SPI flash started working fine with no issue.

I re-soldered the chip on processor board and tried to tweek the driver of SPI flash for:

-SPI clock freq reduced.
-Clock polarity changed.
-Use of pullup/pull downs on the SPI lines.
-Change the drive strength of pins.
-replaced the chip with new one.
-Double verified the SPI waveform timing.

various combinations of above were tried but no success.

After further playing with hardware, i found that if i am putting Logic analyser probes on the SPI clock line, the device responds well.

Based on this clue, i put RC low pass filter on clock line, then everything started working fine.

---So here matter is not of exact error message. I went little deeper during debugging, the situation is independent of higher level scrips and all.

If waveform on SPI lines are OK (except MISO) then why MISO is not responding...

Without use of RC on clock line, i tried to access SPI using Ubuntu SPI driver, Self created Bit-banging driver and Atmel driver. None of them was able to fetch data from MISO.

With the use of RC on SPI clock, all drivers were working fine.


Now, my question is, what are the things that are impacting SPI functionality:

is it noise on SPI bus? (not observed on DSO).
Is it something related to slew rate of the SPI clock?

I have attached some waveform of SPI for reference...

I am unable to reach at some logical conclusion....
blue_z
Location: USA
Posts: 1509
Joined: Thu Apr 19, 2007 10:15 pm

Re: SPI Serial Flash not working

Thu Sep 08, 2016 2:32 am

First you wrote:
er_pawan82@rediffmail.com wrote:I have Ronetix and Embest/Flextronics boards for SAMA5D3X evaluation kit.
Then you clarified that with
er_pawan82@rediffmail.com wrote:The main board (motherboard) is different compared to SAMA5Dx eval kit.
My WAG is that your SPI clock line is not properly terminated (i.e. there's signal reflection) on your mainboard.
I'm not a circuit board designer, but I've seen a few cases of bad board design (e.g. a scope probe on the line would make the problem go away).

Regards
er_pawan82@rediffmail.com
Posts: 7
Joined: Fri Aug 05, 2016 1:55 pm

Re: SPI Serial Flash not working

Thu Sep 08, 2016 7:26 am

Ok, thanks...
ngr.init
Posts: 4
Joined: Sat Sep 17, 2016 11:52 am

Re: SPI Serial Flash not working

Sun Sep 18, 2016 9:04 pm

i work fine with sam-ba 3.1.3 and a sama5d2 board
http://www.atmel.com/tools/atmelsam-bai ... ammer.aspx

Return to “SAMA5D Cortex-A5 MPU”

Who is online

Users browsing this forum: No registered users and 1 guest