Hi,
I have a problem of 52832's SPI interface. Please find following description:
1. My test code is come from "spi" example code, by modify the SPI ping setting (please find sdk_config.h) and NRF_DRV_SPI_DEFAULT_CONFIG in nrf_drv_spi.h, please find following attach file
#define NRF_DRV_SPI_DEFAULT_CONFIG \ { \ .sck_pin = NRF_DRV_SPI_PIN_NOT_USED, \ .mosi_pin = NRF_DRV_SPI_PIN_NOT_USED, \ .miso_pin = NRF_DRV_SPI_PIN_NOT_USED, \ .ss_pin = NRF_DRV_SPI_PIN_NOT_USED, \ .irq_priority = SPI_DEFAULT_CONFIG_IRQ_PRIORITY, \ .orc = 0xFF, \ .frequency = NRF_SPI_FREQ_500K, \ .mode = NRF_DRV_SPI_MODE_2, \ .bit_order = NRF_DRV_SPI_BIT_ORDER_MSB_FIRST, \ }
2. There have four 4.7K pull-up register between SPI CS, CLK, MOSI, MISO and Vcc.
Following screen is the SPI wave-form when the program send one byte to SPI interface. There have two problem in following screen.
a. The sending data is ASCII '1', it's hex code is 0x31. but the data which get from “Logic analyzer" get "0x72" in MOSI pin. why?
b. The program only send one byte data, but "Logic analyzer" had found 2 byte data "0x72 and 0x00" in MOSI, there also have 16 clock in CLK pin.
Would you please tell me how to fix this problem?
Thank you,
Chianglin