not sure what really happens. It looks like that 0x55 is not written to the SCB SPI bus. Anyway, best thing would be that make an archive of the working and non-working version and provide it here, so other forum members can check the source code.
okay, so with those projects the behaviour can be checked. I don't have a 4247 device here, only a 4245, so I adapted the projects to this. From what I can see it seems that on the UDB SPI, the MOSI line goes low after the transmission. This is not the case for the SCB SPI.
However, in both cases the MOSI line is low before the first rising edge on the SPI SCLK signal. So, this is in contrast to the signals you provided - it seems the SCB block works differently between 4247 and 4245.
Maybe there's a forum member having a 4247 device and can check. For completeness, you wrote that your SPI slave is some kind of flash memory. Please provide information about this device, so we can check if there's a SCB configuration which will work with this device.
Thank u for your support , but this is regarding data byte sending over SCB SPI , basic library function to send data on SPI is not working properly for SCB block , i don't know why this is happening .
can anyone help me .??
i just want to send a byte over SCB SPI properly , i had just included Library function not done anything extra . but still the waveform is not proper (for sent data ), write now i have not connected any slave .
Following is the function that are used in my basic code .
SPI_1_Start(); // SPI SCB Start in Master Mode
CyGlobalIntEnable; /* Enable global interrupts. */
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
SW_Tx_UART_1_PutChar('A'); // Debug character
/* Place your application code here. */
SPI_1_SpiUartWriteTxData(0x55); // send data over SPI
// NOTE : THIS FUNCTION IS NOT SENDING DATA PROPERLY OVER SPI .
i have not connected any slave .
Then, how do you know that it's not working?
Previously , I wrote the driver to communicate with adesto flash IC , code worked perfectly with UDB SPI , then due to lack of UDB blocks for my application , I had to switch to SCB SPI Mode , which causes failure of data read/write into flash IC.
after debug I just found that SBC SPI Library is not working .
For debug :I just send a byte 0x55 to SPI SCB and observed the waveforms at DSO , which looks like that I have attached image in my first comment .
its my request to just create a project with SCB SPI , and check SPI transmission by sending a byte , and please verify its waveforms .
let me know that i'm doing it into wrong way or something else .
Early reply and help will be really beneficial for me .
Thanks and Regards
Can you share the project that you used to create the original scope shot? (The one that has a SCB and a UDB SPI master, started at the same time).
Or do a new scope shot, using exactly the WorkspaceSCB.cywrk.Archive.zip from above, showing the SCLK, SS and MOSI lines (and maybe the UART TX line too). If possible, try to have the waveform fill out the complete screen, do the photo directly from the front and upload higher quality photo (the original one does not provide enough detail to assess the problem).
Make sure nothing else is connected to the SPI pins on your PCB.
Your waveforms both seem to be correct. Can you additionally scope the ss-line? And can you please post your complete project so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
Previously , I wrote the driver to communicate with adesto flash IC , ...
...and please verify its waveforms .
...let me know that i'm doing it into wrong way or something else .
Early reply and help will be really beneficial for me .
The first thing you're doing wrong is that you don't provide necessary information even when asked for.
I asked you which memory device is not working, and you refuse to give details.
You ask for verifying waveforms - how should we check that the waveforms you provided in the first post are the cause of the error? There's no slave select signal shown - now, how should we check if it's maybe possible that the slave select signal is making trouble without having a datasheet to check against it? SPI interface handles data on rising/falling edges - the initial waveforms you provided should both work, since the data lines have the same value on the clock edge. So, maybe there's another thing which we currently cannot see.
So, best way is to additionally provide a project which does the first few memory accesses of your project.
You ask for early reply, but you're slowing down the process by yourself. So, once again: which memory device exactly, and how it's connected?
I have attached the code for interfacing of adesto flash IC . with both SPI component i.e UDB and SCB respectfully .
also attached the data sheet of adesto flash IC .
Please go though it .
i will be greatfull for your help .
thanks and regards
Since these are two different projects - how did you get them to be on the same scope photo? AFAIK for now the code behaves as intended on a '4245. So the reason might be in your board (is it a Cypress board, or something you made yourself?), or in the way you are using the scope.
Oh, and looking at the SCB project: this is not the one you have used to create that scope photo.
Looking at the code: before you do SPI_1_SpiUartReadRxData you need to check that the data transfer has actually finished, otherwise you might get garbage. And you need to send the dummy byte (the code you commented out).
I'am using CY8CKIT-042-BLE PIONEER BASEBOARD .
i think there is confusion, scope images are of different projects white wavefrom is taken as reference for UDB block , and yellow waveform are for SCB .
One component is taken at 1 time .
Yes , the scope images are taken after debugging they are only for single byte send .
At scope images , i have shown the comparison for UDB and SCB .
The problem is that we cannot see SCLK for the SCB version - thats what is interesting (together with SS). Can you do a (bertter quality) scope photo just for the SCB version transferring a 0x55?
Since I do own a CY8CKIT-042-BLE PIONEER board (not the A version, though), so I tried your WorkspaceSCB.cywrk.Archive.zip (the one that should transfer a 0x55 over SPI). This is what I got on my scope:
Looks as if it works as intended. If you cannot get that one to work, you have either a problem in your board, in something you have attached to it, or with your scope setup.