I would like my CP2130 device to transmit 1000 '0x01' bytes constantly without any delays (inter-byte, post-assert and pre-assert). I use API of the CP2130 Interface Library. When I initialize my device I:
The data to be written will be split into multiple small packets with max. size of 64/32/16/8 bytes depending on the SPI speed setting.
Could you please check if the gap always happens between certain number of bytes?
0
SPI clock frequency is 93.75 kHz. Gap is at every 8th byte. Today I use another oscilloscope simultaneously. On the old one oscilloscope I get the same result as I had yesterday:
On the new oscilloscope I get different result.It's more appropriate but still I want to see meander:
0
SPI clock frequency is 93.75 kHz. Gap is at every 8th byte. Today I use another oscilloscope simultaneously. On the old one oscilloscope I get the same result as I had yesterday:
On the new oscilloscope I get different result.It's more appropriate but still I want to see meander:
0
Thanks for the update.
When using SPI clock frequency 187 kHz or 93.8 kHz, data will be split into multiple sub-packets with size of 8 bytes. If you test using higher SPI speed, you may see the gap at a larger size of data bytes, if so, I believe this is due to the interval of each sub-packet. Unfortunately this cannot be eliminated, the packet size can be up to 64 bytes when increasing SPI clock to 1.5 MHz or above.
CP2130 delays problem
Good day!
I would like my CP2130 device to transmit 1000 '0x01' bytes constantly without any delays (inter-byte, post-assert and pre-assert). I use API of the CP2130 Interface Library. When I initialize my device I:
- call CP213x_SetSpiDelay(CP2130, CP213x_INDEX_GPIO_0, SPI_INTERBYTE_DELAY_MASK | SPI_CS_POSTASSERT_DELAY_MASK | SPI_CS_PREDEASSERT_DELAY_MASK, 0, 0, 0);
or just (it doesn't matter - I tried both):
- call CP213x_SetSpiDelay(CP2130, CP213x_INDEX_GPIO_0, 0, 0, 0, 0);
and then I call the following functions in button click event to transmit data:
call CP213x_SetChipSelect(CP2130, CS_CML_LEFT_GI, CSMODE_ACTIVE_OTHERS_IDLE);
call CP213x_TransferWrite(CP2130, &OutDataBuf[0], 1000, true, 100, &BytesActuallyTransfer); //OutDataBuf contains 1000 '0x01' byte
I hoped to see meander on SCK pin (_|`|_|`|_|`|_ ... _|`|_|`|_) but sometimes I got gaps. Any suggestions?
Best regards,
SANEL
Which SPI clock frequency are you using?
The data to be written will be split into multiple small packets with max. size of 64/32/16/8 bytes depending on the SPI speed setting.
Could you please check if the gap always happens between certain number of bytes?
SPI clock frequency is 93.75 kHz. Gap is at every 8th byte. Today I use another oscilloscope simultaneously. On the old one oscilloscope I get the same result as I had yesterday:
On the new oscilloscope I get different result.It's more appropriate but still I want to see meander:
SPI clock frequency is 93.75 kHz. Gap is at every 8th byte. Today I use another oscilloscope simultaneously. On the old one oscilloscope I get the same result as I had yesterday:
On the new oscilloscope I get different result.It's more appropriate but still I want to see meander:
Thanks for the update.
When using SPI clock frequency 187 kHz or 93.8 kHz, data will be split into multiple sub-packets with size of 8 bytes. If you test using higher SPI speed, you may see the gap at a larger size of data bytes, if so, I believe this is due to the interval of each sub-packet. Unfortunately this cannot be eliminated, the packet size can be up to 64 bytes when increasing SPI clock to 1.5 MHz or above.