Member | Action | Date |
---|---|---|
|
Replied
to
CP2130 delays problem
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: ![]() |
Aug 14 2018, 2:59 PM |
|
Updated
CP2130 delays problem on
Forum
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 |
Aug 13 2018, 1:21 PM |
|
Updated
CP2130 delays problem on
Forum
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 (_|`|_|`|_|`|_ ... _|`|_|`|_) but sometimes I got gaps. Any suggestions?
Best regards, SANEL |
Aug 13 2018, 1:20 PM |
|
Updated
CP2130 delays problem on
Forum
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 (_|`|_|`|_|`|_ ... _|`|_|`|_) but sometimes I got gaps. Any suggestions?
Best regards, SANEL |
Aug 13 2018, 1:19 PM |
|
Updated
CP2130 delays problem on
Forum
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);
I hoped to see meander on SCK (_|`|_|`|_|`|_ ... _|`|_|`|_) but sometimes I got gaps. Any suggestions?
Best regards, SANEL |
Aug 13 2018, 1:17 PM |
|
Posted
CP2130 delays problem on
Forum
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);
I hoped to see meander on SCK (_|`|_|`|_|`|_ ... _|`|_|`|_) but sometimes I got gaps. Any suggestions? Best regards, SANEL |
Aug 13 2018, 1:15 PM |
|
Updated
to
BLE1XX bonding/paring and encryption
Dear Dominika, Thank you for answer. Let's get it straight if I just call sm_encrypt_start(0, 0) => my devices will work out the temporary key and use it. If I call sm_set_bondable_mode(1) and call sm_encrypt_start(0, 1) => my devices will use long-term key. Right? Best regards, SANEL |
Aug 09 2018, 7:41 AM |
|
Replied
to
BLE1XX bonding/paring and encryption
Dear Dominika, Thank you for answer. Let's get it straight if I just call sm_encrypt_start(0, 0) => my devices will work out the temporary key and use it. If I call sm_set_bondable_mode(1) and call sm_encrypt_start(0, 1) => my devices will use long-term key. Right? Best regards, SANEL |
Aug 09 2018, 7:41 AM |
|
Updated
BLE1XX bonding/paring and encryption on
Forum
Good day!
This article is extremely valuable: But I still have a question. I'll try to describe it in details. In the system_boot event I issue "call sm_set_bondable_mode(1)". In the connection_status event I pair 2 devices using "call sm_encrypt_start(0, 1)" and I get second connection_status event with connection flags variable with bit 1 set => so connection encrypted. Then I get sm_bond_status event that tells me that bond handle is 0 and 2 devices have been worked out the long-term key. OK. Then I reset 2 devices. In system_boot event I see that each device has 1 bonding. OK. Then I get connection_status event but in connection flags variable there is NO bit 1 set => so connection is NOT encrypted. Why? 2 devices have the long-term key, so why don't they use encryption? I issue the "call sm_encrypt_start(0, 1)" myself and I get the connection flags variable with bit 1 => so connection is encrypted. But I have no idea whether 2 devices have been entering the re-paring procedure again and working out the new key or they use the old long-term key. I hope they use the old long-term key but I need clarification.
Best regards, SANEL
|
Aug 03 2018, 5:04 PM |
|
Updated
BLE1XX bonding/paring and encryption on
Forum
Good day!
This article is extremely valuable: But I still have a question. I'll try to describe it in details. In the system_boot event I issue "call sm_set_bondable_mode(1)". In the connection_status event I pair 2 devices using "call sm_encrypt_start(0, 1)" and I get second connection_status event with connection flags variable with bit 1 set => so connection encrypted. Then I get sm_bond_status event that tells me that bond handle is 0 and 2 devices have been worked out the long-term key. OK. Then I reset 2 devices. In system_boot event I see that each device has 1 bonding. OK. Then I get connection_status event but in connection flags variable there is NO bit 1 set => so connection is NOT encrypted. Why? 2 devices have the long-term key, so why don't they use encryption? I issue the "call sm_encrypt_start(0, 1)" myself and I get the connection flags variable with bit 1 => so connection is encrypted. But I have no idea whether 2 devices have beed entering the re-paring procedure again and working out the new key or they use the old long-term key. I hope they use the old long-term key but I need clarification.
Best regards, SANEL
|
Aug 03 2018, 1:35 PM |