Typical errors regarding SPI: each write is also a read, so it produces an entry in the RX FIFO. Also, you need to wait for the SPI transfer to finish before you read the Rx FIFO. And when the SPI clock is fast enough, you might not fill the TX buffer fast enough so it disabled the SELECT signal inside of a transmission.
Best is to check the signal lines with a logic analyzer or a scope.
Okay about that im aware.
I connected the reader without the chip select to the SCB Block. I control the CS pin seperate in code.
So i pull the CS low ( Active LOW ) then i make the TX WRITE wait until TX finished and then i Release CS back to HIGH ( CS_Write(1))
They do it the same in the Arduino Source.
I found also in a different post a Sniped for Readback the Value directly while sending but this also dont work as expected.
Tomorrow Ill walk over to the ETHZ ( University here ) and ask in the Laboratory for a hint with the Logic Analyser.
I think ill build myself a tiny one to check it. I got a nice Sourcecode for a PSOC5 Variant with included Scope from Someone AKA hlipka Maybe i get it only as LOGIC ANALYSER working. with the SSD1306 it would be awesome. little scale but AWESOME. Ah and the code is well readable.
Ill post it if i have further news.
I think I really need to port that project over to the PSoC5LP and make sure it runs there. Making the display code easily to change might also be helpful...
One note: since it samples with at most 500kHz, reduce the SPI clock in your project to about 100kHz to be able to use it.
As an aside a cheap but very good logic analyzer, I have 2 of them,
they work great.
On the logic analyzer does it have software or do you need to download one of the programs from the site on the next line from the web posting?
Yes, you have to download the software from the second link.
reducing the speed did the trick. i saw on the scope also a weak connection on the MOSI wire ^.^ could happen. even it alwas read 0 ohms on the meter ?.? okay now i get the status messages from the rc522. When i transfered all the Libraries to the PSOC Ill post it back here or on my page and a Link here. I can tell You. THIS IS FREAKIN AWESOME. ^.^
Ah @hli are You hlipka ??
Nice. Ill have a look what the max speed is which is supported by the rc522 but im glad that this is working.
One question. I only need the logic analyser part of your firmware which parts are they ?? Or where should i look in ? Because all is wonderfull divided into seperate parts and so there are many different files.
I would just keep the analog stuff in there, it doesn't hurt. Maybe its not obvious, but you can use it with a client for the openlogic sniffer (Jawi OLS is the best one available right now) too, instead of the GLCD.
If you really want to create a LA out of it: start with ripping out the SAR ADCs, their DAM and their input handling (the PGAs). Then look at the triggers. From there you need to clean the source code from all unreferenced stuff (most of it should be in scope.c/.h). Next would be DMA.c, and from there you will see that the display code in main.c needs to be touched. Also look at the menu code in handler_local.c to remove all the analog setup stuff. When you do that, you can probably increase the frequency options since the ports can run faster than the ADCs.
As I said, its easier to keep it in there :)
@lexarion - did you ever build a Psoc lib for the MFRC522? I'm a psoc newbie and trying to port over some MFRC522 code to Cypress devkit. Or if you got the reader working I would love to take a peek at your code kind sir :)