Jeff-
I finally found that the delay was caused by a "printf" I included in the code.
A silly thing that makes me loose some time. However, it has been a good idea to
toggle a GPIO line to understand the SPI transfer behavior.
Thanks a lot for your answers.
best regards,
Alvaro
Hi,
>
>I´m new in DSP programming. I´m trying to connect a C6727 DSP
(master) with a CC2430EM transceiver (slave) through SPI in 4-lines with CS
mode, on a custom board. With a very simple code that just sets the SPI
registers and make a continuous transfer loop, the communication looks good on
the scope. However, there is a delay between transfers of 200ms. I´m not
using the WDELAY field of the SPIDAT1 register (spru718), because of the errata
commented in sprz232f, and no other delays are used.
>
>So, any suggestions to have a smaller delay between transfers?
>
>Another question regarding this issue is that I am sending one byte each time I
write SPIDAT0 register, but I do not know how to send several bytes together,
something like a byte stream.
>
>My setup: CCS Version: 4.1.0.02006; SD XDS510USB JTAG emulator.
>
>thanks in advance!
>
>_____________________________________
_____________________________________
C6727 SPI Delays
Started by ●April 13, 2011
Reply by ●April 29, 20112011-04-29
Reply by ●April 29, 20112011-04-29
Alvaro-
> I finally found that the delay was caused by a "printf" I included
> in the code. A silly thing that makes me loose some time. However,
> it has been a good idea to toggle a GPIO line to understand the
> SPI transfer behavior.
> Thanks a lot for your answers.
That's good work, glad you solved it.
Yes, printf() are very slow, because they use JTAG to communicate with CCS on the
PC. Not exactly real-time performance :-) That's also true for CCS-based file I/O.
-Jeff
> Hi,
> >
> >I´m new in DSP programming. I´m trying to connect a C6727 DSP (master) with a CC2430EM transceiver (slave) through SPI in 4-lines with CS mode, on a custom board. With a very simple code that just sets the SPI registers and make a continuous transfer loop, the communication looks good on the scope. However, there is a delay between transfers of 200ms. I´m not using the WDELAY field of the SPIDAT1 register (spru718), because of the errata commented in sprz232f, and no other delays are used.
> >
> >So, any suggestions to have a smaller delay between transfers?
> >
> >Another question regarding this issue is that I am sending one byte each time I write SPIDAT0 register, but I do not know how to send several bytes together, something like a byte stream.
> >
> >My setup: CCS Version: 4.1.0.02006; SD XDS510USB JTAG emulator.
> >
> >thanks in advance!
_____________________________________
> I finally found that the delay was caused by a "printf" I included
> in the code. A silly thing that makes me loose some time. However,
> it has been a good idea to toggle a GPIO line to understand the
> SPI transfer behavior.
> Thanks a lot for your answers.
That's good work, glad you solved it.
Yes, printf() are very slow, because they use JTAG to communicate with CCS on the
PC. Not exactly real-time performance :-) That's also true for CCS-based file I/O.
-Jeff
> Hi,
> >
> >I´m new in DSP programming. I´m trying to connect a C6727 DSP (master) with a CC2430EM transceiver (slave) through SPI in 4-lines with CS mode, on a custom board. With a very simple code that just sets the SPI registers and make a continuous transfer loop, the communication looks good on the scope. However, there is a delay between transfers of 200ms. I´m not using the WDELAY field of the SPIDAT1 register (spru718), because of the errata commented in sprz232f, and no other delays are used.
> >
> >So, any suggestions to have a smaller delay between transfers?
> >
> >Another question regarding this issue is that I am sending one byte each time I write SPIDAT0 register, but I do not know how to send several bytes together, something like a byte stream.
> >
> >My setup: CCS Version: 4.1.0.02006; SD XDS510USB JTAG emulator.
> >
> >thanks in advance!
_____________________________________