Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE
I need to communicate with SDHC-card working in SPI-mode using McBSP. I adapted the sample application "Interfacing SD/MMC Cards With TMS320F28xxx DSCs" (spraao7) to work with McBSP with help of McBSP_SPI_DLB.c from C2000Ware_3_02_00_00.
I already got some responses from SD card and it looks like everything works fine but I see strange delays between writing data to DXR1 register and first edge on CLK line.
In my test setup I have the following code:
GpioDataRegs.GPACLEAR.bit.GPIO27 = 1;
McbspbRegs.DXR1.all = byte;
while( McbspbRegs.SPCR1.bit.RRDY == 0 ) {}
GpioDataRegs.GPASET.bit.GPIO27 = 1;
then I read data from DRR1 and repeat that sequence again.
Using logical analyzer I see that there is a quite big delay between falling edge on GPIO27 and rising edge on CLK line:

(first row - GPIO27, second - CLK)
The delay is about 6-7 CLK periods: if I change CLK frequency this delay changes accordingly.
I don't understand where this delay comes from.
Best regards,
Alex