Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPI Interface error with CC3200 and ArduMini 2MP (OV2640) #49

Open
aelkman opened this issue May 28, 2016 · 4 comments
Open

SPI Interface error with CC3200 and ArduMini 2MP (OV2640) #49

aelkman opened this issue May 28, 2016 · 4 comments

Comments

@aelkman
Copy link

aelkman commented May 28, 2016

My problem is that I'm getting different read values than what I am writing:

If I write "1010101" I get back "110011" which results in the Interface error.
Getting close, just need some advice.

SPI Read Error

"The ArduCAM SPI slave interface is fixed SPI mode 0 with POL = 0 and PHA = 1."

This is confusing to me, for the CC3200 mode 0 is POL = 0, PHA = 0. I have tried both mode 1 and mode 0 and still no success with correct read. I get more consistent results with POL=0 and PHA=0 of course it is still wrong, reading '11000111'.

@aelkman aelkman closed this as completed May 28, 2016
@aelkman aelkman reopened this May 28, 2016
@aelkman
Copy link
Author

aelkman commented May 30, 2016

Hey I'm having further issues, nowhere online does there seem to be replicated problems of what I'm experiencing, maybe you can help me debug:

Write (top) then read (bottom): http://imgur.com/mUkv8Po
Signal for write looks 100% correct.

SPI Settings: http://i.imgur.com/YFd67BW.png
Note I am using Mode 1 since the device says to use POL=0, PHA=1
@4Mhz (ArduCAM has a max clock freq of 8MHz should not be an issue)

Test sketch to try and echo SPI in/out signal: http://i.imgur.com/KeZ7IiT.png
Shows the 0x67 DATA write command at ADDR 0x00

Results on terminal from the sketch: http://i.imgur.com/B0Mm2E2.png
The results are varying, sometimes 0 sometimes 111111 and sometimes just 1111

I've talked to 3 other people about this, no one has any clue what could be wrong.

@ArduCAM
Copy link
Owner

ArduCAM commented May 30, 2016

@aelkman, I think you should SPI mode 0 which is POL = 0, and PHA = 0, there is a mistake on the document.

@aelkman
Copy link
Author

aelkman commented May 30, 2016

Ok I am using Mode 0 now. The signal looks even better. The MISO looks 100% correct now to me unless that is a problem that it is sending data during the CMD phase? It says it should be blank in the technical document. Yet the terminal data keeps appearing wrong.

Here is the write: http://i.imgur.com/UiUWeLS.png
Here is the read: http://i.imgur.com/bGMV3Y7.png
Terminal Output: http://i.imgur.com/8N7bNsV.png

I suppose I should say I am confused in the highest degree. I have done several projects with SPI on the CC3200 launchpad with success. There seems to be some hardware error with the ArduCAM that is not allowing it to work with my board. What's even more puzzling is that the signal coming out of the line looks fine. This is quite daunting for me as I have a project due this week for class, and I have posted in multiple forums, no one has any idea.

The weirder thing is I see no reason why this SPI connection is having so much trouble. If the MISO signal is correct, my board should read it correctly no problem.

On top of that, I had to modify the SPI.cpp from the Energia lib, and ArduCAM.cpp files quite a lot just to get the SPI to appear on my analyzer. The fact that you say the CC3200 Launchpad is supported (and that there are files for it) is a bit misleading.

@aelkman aelkman closed this as completed May 30, 2016
@aelkman aelkman reopened this May 30, 2016
@connorhart
Copy link

I used to work with old generic floppies (5 1/4) on the 1541 hd for commodore64. I was in 7th grade and the projects were my own. I just wanted to write an array, read it back, make changes to the data, write it, and when read back have consistency as would be expected. I returned to that little project many times over the months and never no matter how much I simplified the elements of what was needed could I get consistent results. Time passed..years..but I just morphed with collected data that most maybe every single routine I wrote worked perfectly. One spot on the very cheap floppies and it failed..the 1541 drive was probably not the best at hitting the target which was poorly marked too..it wasn't me it was the faulty equipment even maybe multiple faults...so, look for faults in equipment not your design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants