This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf52 spi reads extra zero

Hi.

I'm using nrf52 as slave for another device. I'm reading test string from the nrf buffer and I can see extra zero (rest of the content is then offset by one -> corruption). However I cannot see this extra clock in the bus when I check it with scope.

The data should be:

0x6a (0110 1010)
0x65 (0110 0101)
0x73 (0111 0011)

however in the buffer it's

0x35 (0011 0101)
0x32 (0011 0010)
0xb9 (1011 1001)

As you can see there's extra 0 and offset. In below scope picture there's only one zero.

scope image

nrf52 setup as follows:

  • SPIS0 enabled and used with default config
  • CS used
  • SPIS clock mode is 0 (default, so active high, rising edge)

I set both buffers at the same time like this: APP_ERROR_CHECK(nrf_drv_spis_buffers_set(&spis, (uint8_t *)m_tx_buf, strlen(m_tx_buf), m_rx_buf, SPI_RX_BUF_SIZE));

buffer should be in heap: static char m_tx_buf[] = "nrf_test\r\n"; /**< TX buffer. */

We can see the same phenomenon on two different master devices from different manufacturers.

EDIT: corrected stuff removed.

Parents Reply Children
No Data
Related